From b74d71c337df2f33471ac5881872f40aea11bdb9 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 9 Mar 2023 16:10:02 +0200 Subject: [PATCH 01/17] health insights sdk for python --- .../CHANGELOG.md | 5 + .../LICENSE | 21 + .../MANIFEST.in | 7 + .../README.md | 172 ++ .../azure/__init__.py | 1 + .../azure/healthinsights/__init__.py | 1 + .../cancerprofiling/__init__.py | 26 + .../healthinsights/cancerprofiling/_client.py | 80 + .../cancerprofiling/_configuration.py | 69 + .../cancerprofiling/_model_base.py | 714 ++++++ .../cancerprofiling/_operations/__init__.py | 19 + .../_operations/_operations.py | 362 +++ .../cancerprofiling/_operations/_patch.py | 20 + .../healthinsights/cancerprofiling/_patch.py | 20 + .../cancerprofiling/_serialization.py | 1996 +++++++++++++++++ .../healthinsights/cancerprofiling/_vendor.py | 26 + .../cancerprofiling/_version.py | 9 + .../cancerprofiling/aio/__init__.py | 23 + .../cancerprofiling/aio/_client.py | 80 + .../cancerprofiling/aio/_configuration.py | 69 + .../aio/_operations/__init__.py | 19 + .../aio/_operations/_operations.py | 319 +++ .../cancerprofiling/aio/_operations/_patch.py | 20 + .../cancerprofiling/aio/_patch.py | 20 + .../cancerprofiling/aio/_vendor.py | 26 + .../cancerprofiling/models/__init__.py | 61 + .../cancerprofiling/models/_enums.py | 82 + .../cancerprofiling/models/_models.py | 705 ++++++ .../cancerprofiling/models/_patch.py | 20 + .../healthinsights/cancerprofiling/py.typed | 1 + .../dev_requirements.txt | 4 + .../samples/README.md | 55 + .../samples/sample_infer_cancer_profiling.py | 192 ++ .../setup.py | 71 + .../tests/__init__.py | 0 .../tests/conftest.py | 52 + ...tCancerProfilingtest_cancer_profiling.json | 655 ++++++ .../tests/test_cancer_profiling.py | 62 + .../CHANGELOG.md | 5 + .../LICENSE | 21 + .../MANIFEST.in | 7 + .../README.md | 175 ++ .../azure/__init__.py | 1 + .../azure/healthinsights/__init__.py | 1 + .../clinicalmatching/__init__.py | 26 + .../clinicalmatching/_client.py | 82 + .../clinicalmatching/_configuration.py | 69 + .../clinicalmatching/_model_base.py | 714 ++++++ .../clinicalmatching/_operations/__init__.py | 19 + .../_operations/_operations.py | 362 +++ .../clinicalmatching/_operations/_patch.py | 20 + .../healthinsights/clinicalmatching/_patch.py | 20 + .../clinicalmatching/_serialization.py | 1996 +++++++++++++++++ .../clinicalmatching/_vendor.py | 26 + .../clinicalmatching/_version.py | 9 + .../clinicalmatching/aio/__init__.py | 23 + .../clinicalmatching/aio/_client.py | 82 + .../clinicalmatching/aio/_configuration.py | 69 + .../aio/_operations/__init__.py | 19 + .../aio/_operations/_operations.py | 319 +++ .../aio/_operations/_patch.py | 20 + .../clinicalmatching/aio/_patch.py | 20 + .../clinicalmatching/aio/_vendor.py | 26 + .../clinicalmatching/models/__init__.py | 109 + .../clinicalmatching/models/_enums.py | 162 ++ .../clinicalmatching/models/_models.py | 1431 ++++++++++++ .../clinicalmatching/models/_patch.py | 20 + .../healthinsights/clinicalmatching/py.typed | 1 + .../dev_requirements.txt | 4 + .../samples/README.md | 63 + .../samples/match_trial_fhir_data.txt | 1 + .../samples/sample_match_trials_fhir.py | 143 ++ ..._match_trials_structured_coded_elements.py | 149 ++ ...h_trials_structured_coded_elements_sync.py | 125 ++ ...match_trials_unstructured_clinical_note.py | 248 ++ .../setup.py | 71 + .../tests/__init__.py | 0 .../tests/conftest.py | 52 + ...ls.pyTestMatchTrialstest_match_trials.json | 369 +++ .../tests/test_match_trials.py | 101 + sdk/healthinsights/ci.yml | 37 + shared_requirements.txt | 6 + 82 files changed, 13307 insertions(+) create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/LICENSE create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/MANIFEST.in create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_configuration.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_serialization.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_vendor.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_version.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_configuration.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_vendor.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_enums.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/py.typed create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/dev_requirements.txt create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/recordings/test_cancer_profiling.pyTestCancerProfilingtest_cancer_profiling.json create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/LICENSE create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/MANIFEST.in create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_configuration.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_serialization.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_vendor.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_version.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_configuration.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_vendor.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_enums.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/py.typed create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/dev_requirements.txt create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/__init__.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py create mode 100644 sdk/healthinsights/ci.yml diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md new file mode 100644 index 000000000000..628743d283a9 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/LICENSE b/sdk/healthinsights/azure-healthinsights-cancerprofiling/LICENSE new file mode 100644 index 000000000000..63447fd8bbbf --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/MANIFEST.in b/sdk/healthinsights/azure-healthinsights-cancerprofiling/MANIFEST.in new file mode 100644 index 000000000000..8b79b480cd58 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include LICENSE +include azure/healthinsights/cancerprofiling/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/healthinsights/__init__.py \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md new file mode 100644 index 000000000000..5609eef2e818 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -0,0 +1,172 @@ +# Azure Cognitive Services Health Insights Cancer Profiling client library for Python +Remove comment + + +## Getting started + +### Prerequisites + +- Python 3.7 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Cognitive Services Health Insights instance. + + +### Install the package + +```bash +python -m pip install azure-healthinsights-cancerprofiling +``` + +This table shows the relationship between SDK versions and supported API versions of the service: + +|SDK version|Supported API version of service | +|-------------|---------------| +|1.0.0b1 | 2023-03-01-preview| + + +### Authenticate the client + +#### Get the endpoint + +You can find the endpoint for your Health Insights service resource using the +***[Azure Portal](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights) +or [Azure CLI](https://learn.microsoft.com/cli/azure/): + +```bash +# Get the endpoint for the Health Insights service resource +az cognitiveservices account show --name "resource-name" --resource-group "resource-group-name" --query "properties.endpoint" +``` + +#### Get the API Key + +You can get the **API Key** from the Health Insights service resource in the Azure Portal. +Alternatively, you can use **Azure CLI** snippet below to get the API key of your resource. + +```PowerShell +az cognitiveservices account keys list --resource-group --name +``` + +#### Create a CancerProfilingClient with an API Key Credential + +Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter +to authenticate the client: + +```python +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling import CancerProfilingClient + +credential = AzureKeyCredential("") +client = CancerProfilingClient(endpoint="https://.cognitiveservices.azure.com/", credential=credential) +``` + +### Long-Running Operations + +Long-running operations are operations which consist of an initial request sent to the service to start an operation, +followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has +succeeded, to get the result. + +Methods that support healthcare analysis, custom text analysis, or multiple analyses are modeled as long-running operations. +The client exposes a `begin_` method that returns a poller object. Callers should wait +for the operation to complete by calling `result()` on the poller object returned from the `begin_` method. +Sample code snippets are provided to illustrate using long-running operations [below](#examples "Examples"). + +## Key concepts + +The Cancer Profiling model allows you to infer cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from unstructured clinical documents. + +## Examples + +- [Infer Cancer Profiling](#cancer_profiling) + +### Cancer Profiling + +Infer key cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from a patient's unstructured clinical documents. + +```python +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling import CancerProfilingClient + + +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] +TIME_SERIES_DATA_PATH = os.path.join("sample_data", "request-data.csv") +client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) + +poller = client.begin_infer_cancer_profile(data) +response = poller.result() + +if response.status == JobStatus.SUCCEEDED: + results = response.results + for patient_result in results.patients: + print(f"\n==== Inferences of Patient {patient_result.id} ====") + for inference in patient_result.inferences: + print( + f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + ConfidenceScore: {inference.confidence_score} ===") + for evidence in inference.evidence: + data_evidence = evidence.patient_data_evidence + print( + f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + {data_evidence.text}") +else: + errors = response.errors + if errors is not None: + for error in errors: + print(f"{error.code} : {error.message}") + +``` + +## Troubleshooting + +### General + +Health Insights Cancer Profiling client library will raise exceptions defined in [Azure Core](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions). + +### Logging + +This library uses the standard [logging](https://docs.python.org/3/library/logging.html) library for logging. + +Basic information about HTTP sessions (URLs, headers, etc.) is logged at `INFO` level. + +Detailed `DEBUG` level logging, including request/response bodies and **unredacted** +headers, can be enabled on the client or per-operation with the `logging_enable` keyword argument. + +See full SDK logging documentation with examples [here](https://learn.microsoft.com/azure/developer/python/sdk/azure-sdk-logging). + +### Optional Configuration + +Optional keyword arguments can be passed in at the client and per-operation level. +The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. + +## Next steps + +### Additional documentation + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[azure_sub]: https://azure.microsoft.com/free/ \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/__init__.py new file mode 100644 index 000000000000..1beba7098df2 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._client import CancerProfilingClient +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "CancerProfilingClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py new file mode 100644 index 000000000000..2d21a0c6bd32 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any + +from azure.core import PipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import CancerProfilingClientConfiguration +from ._operations import CancerProfilingClientOperationsMixin +from ._serialization import Deserializer, Serializer + + +class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """CancerProfilingClient. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + _endpoint = "{endpoint}/healthinsights" + self._config = CancerProfilingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> "CancerProfilingClient": + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_configuration.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_configuration.py new file mode 100644 index 000000000000..81364c5be4f2 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from ._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + +class CancerProfilingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for CancerProfilingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + super(CancerProfilingClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "healthinsights-cancerprofiling/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy( + self.credential, "Ocp-Apim-Subscription-Key", **kwargs + ) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py new file mode 100644 index 000000000000..c6fcd9a18c25 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py @@ -0,0 +1,714 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except +# pyright: reportGeneralTypeIssues=false + +import functools +import sys +import logging +import base64 +import re +import copy +import typing +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import NULL as AzureCoreNull + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["NULL", "AzureJSONEncoder", "Model", "rest_field", "rest_discriminator"] + + +class _Null(object): + """To create a Falsy object""" + + def __bool__(self): + return False + + __nonzero__ = __bool__ # Python2 compatibility + + +NULL = _Null() +""" +A falsy sentinel object which is supposed to be used to specify attributes +with no data. This gets serialized to `null` on the wire. +""" + +TZ_UTC = timezone.utc + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + + return "P" + date_str + time_str + + +def _datetime_as_isostr(dt: typing.Union[datetime, date, time, timedelta]) -> str: + """Converts a datetime.(datetime|date|time|timedelta) object into an ISO 8601 formatted string + + :param timedelta dt: The date object to convert + :rtype: str + :return: ISO8601 version of this datetime + """ + # First try datetime.datetime + if hasattr(dt, "year") and hasattr(dt, "hour"): + dt = typing.cast(datetime, dt) + # astimezone() fails for naive times in Python 2.7, so make make sure dt is aware (tzinfo is set) + if not dt.tzinfo: + iso_formatted = dt.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = dt.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + try: + dt = typing.cast(typing.Union[date, time], dt) + return dt.isoformat() + # Last, try datetime.timedelta + except AttributeError: + dt = typing.cast(timedelta, dt) + return _timedelta_as_isostr(dt) + + +def _serialize_bytes(o) -> str: + return base64.b64encode(o).decode() + + +def _serialize_datetime(o): + if hasattr(o, "year") and hasattr(o, "hour"): + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._readonly # pylint: disable=protected-access + except AttributeError: + return False + + +class AzureJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + readonly_props = [ + p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p) + ] # pylint: disable=protected-access + return {k: v for k, v in o.items() if k not in readonly_props} + if isinstance(o, (bytes, bytearray)): + return base64.b64encode(o).decode() + if o is AzureCoreNull: + return None + try: + return super(AzureJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o) + try: + # First try datetime.datetime + return _serialize_datetime(o) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(AzureJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: deserialize_bytes, + timedelta: deserialize_duration, + typing.Any: lambda x: x, +} + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + module = sys.modules[module_end] + models.update({k: v for k, v in module.__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = copy.deepcopy(data) + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + try: + return self[key] + except KeyError: + return default + + @typing.overload # type: ignore + def pop(self, key: str) -> typing.Any: # pylint: disable=no-member + ... + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: + ... + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + return self._data.popitem() + + def clear(self) -> None: + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + self._data.update(*args, **kwargs) + + @typing.overload # type: ignore + def setdefault(self, key: str) -> typing.Any: + ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: + ... + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o): + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o) + try: + # First try datetime.datetime + return _serialize_datetime(o) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + return _deserialize(rf._type, value) if (rf and rf._is_model) else _serialize(value) + + +class Model(_MyMutableMapping): + _is_model = True + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update({self._attr_to_rest_field[k]._rest_name: _serialize(v) for k, v in kwargs.items()}) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> "Model": # pylint: disable=unused-argument + # we know the last three classes in mro are going to be 'Model', 'dict', and 'object' + mros = cls.__mro__[:-3][::-1] # ignore model, dict, and object parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") # pylint: disable=no-member + for k, v in mro_class.__annotations__.items() # pylint: disable=no-member + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + + return super().__new__(cls) # pylint: disable=no-value-for-parameter + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): # pylint: disable=no-member + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member + + @classmethod + def _get_discriminator(cls) -> typing.Optional[str]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator: # pylint: disable=protected-access + return v._rest_name # pylint: disable=protected-access + return None + + @classmethod + def _deserialize(cls, data): + if not hasattr(cls, "__mapping__"): # pylint: disable=no-member + return cls(data) + discriminator = cls._get_discriminator() + mapped_cls = cls.__mapping__.get(data.get(discriminator), cls) # pylint: disable=no-member + if mapped_cls == cls: + return cls(data) + return mapped_cls._deserialize(data) # pylint: disable=protected-access + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements + annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation or annotation in [int, float]: + return None + + try: + if module and _is_model(_get_model(module, annotation)): + if rf: + rf._is_model = True + + def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + return functools.partial(_deserialize_model, _get_model(module, annotation)) + except Exception: + pass + + # is it a literal? + try: + if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports + else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + if annotation.__origin__ == Literal: + return None + except AttributeError: + pass + + if getattr(annotation, "__origin__", None) is typing.Union: + + def _deserialize_with_union(union_annotation, obj): + for t in union_annotation.__args__: + try: + return _deserialize(t, obj, module) + except DeserializationError: + pass + raise DeserializationError() + + return functools.partial(_deserialize_with_union, annotation) + + # is it optional? + try: + # right now, assuming we don't have unions, since we're getting rid of the only + # union we used to have in msrest models, which was union of str and enum + if any(a for a in annotation.__args__ if a == type(None)): + + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf + ) + + def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + except AttributeError: + pass + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) + + try: + if annotation._name == "Dict": + key_deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[0], module, rf) + value_deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[1], module, rf) + + def _deserialize_dict( + key_deserializer: typing.Optional[typing.Callable], + value_deserializer: typing.Optional[typing.Callable], + obj: typing.Dict[typing.Any, typing.Any], + ): + if obj is None: + return obj + return { + _deserialize(key_deserializer, k, module): _deserialize(value_deserializer, v, module) + for k, v in obj.items() + } + + return functools.partial( + _deserialize_dict, + key_deserializer, + value_deserializer, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: + if len(annotation.__args__) > 1: + + def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], obj + ): + if obj is None: + return obj + return type(obj)( + _deserialize(deserializer, entry, module) + for entry, deserializer in zip(obj, entry_deserializers) + ) + + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) for dt in annotation.__args__ + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers) + deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[0], module, rf) + + def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + obj, + ): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + return functools.partial(_deserialize_sequence, deserializer) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + annotation, + deserializer_from_mapping, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(annotation, obj) + except Exception: + pass + return _deserialize_with_callable(deserializer_from_mapping, obj) + + return functools.partial(_deserialize_default, annotation, _DESERIALIZE_MAPPING.get(annotation)) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], value: typing.Any +): + try: + if value is None: + return None + if deserializer is None: + return value + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value) # type: ignore + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize(deserializer: typing.Any, value: typing.Any, module: typing.Optional[str] = None) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + deserializer = _get_deserialize_callable_from_annotation(deserializer, module) + return _deserialize_with_callable(deserializer, value) + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + readonly: bool = False, + default: typing.Any = _UNSET, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._readonly = readonly + self._is_model = False + self._default = default + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + return _deserialize(self._type, _serialize(item)) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model and not _is_model(value): + obj.__setitem__(self._rest_name, _deserialize(self._type, value)) + obj.__setitem__(self._rest_name, _serialize(value)) + + def _get_deserialize_callable_from_annotation( # pylint: disable=redefined-builtin + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + readonly: bool = False, + default: typing.Any = _UNSET, +) -> typing.Any: + return _RestField(name=name, type=type, readonly=readonly, default=default) + + +def rest_discriminator( + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/__init__.py new file mode 100644 index 000000000000..9d4dc7d0b198 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import CancerProfilingClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "CancerProfilingClientOperationsMixin", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py new file mode 100644 index 000000000000..433560af91dc --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py @@ -0,0 +1,362 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import json +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.polling.base_polling import LROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict + +from .. import models as _models +from .._model_base import AzureJSONEncoder, _deserialize +from .._serialization import Serializer +from .._vendor import CancerProfilingClientMixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_cancer_profiling_infer_cancer_profile_request( + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: Literal["2023-03-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-03-01-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/oncophenotype/jobs" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if repeatability_request_id is not None: + _headers["Repeatability-Request-ID"] = _SERIALIZER.header( + "repeatability_request_id", repeatability_request_id, "str" + ) + if repeatability_first_sent is not None: + _headers["Repeatability-First-Sent"] = _SERIALIZER.header( + "repeatability_first_sent", repeatability_first_sent, "iso-8601" + ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class CancerProfilingClientOperationsMixin(CancerProfilingClientMixinABC): + def _infer_cancer_profile_initial( + self, + body: Union[_models.OncoPhenotypeData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> Optional[_models.OncoPhenotypeResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.OncoPhenotypeResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _content = json.dumps(body, cls=AzureJSONEncoder) # type: ignore + + request = build_cancer_profiling_infer_cancer_profile_request( + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = _deserialize(_models.OncoPhenotypeResult, response.json()) + + if response.status_code == 202: + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Repeatability-Result"] = self._deserialize( + "str", response.headers.get("Repeatability-Result") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + @overload + def begin_infer_cancer_profile( + self, + body: _models.OncoPhenotypeData, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeData + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns OncoPhenotypeResult. The OncoPhenotypeResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_infer_cancer_profile( + self, + body: JSON, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: JSON + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns OncoPhenotypeResult. The OncoPhenotypeResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_infer_cancer_profile( + self, + body: IO, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns OncoPhenotypeResult. The OncoPhenotypeResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_infer_cancer_profile( + self, + body: Union[_models.OncoPhenotypeData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> LROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Is one of the following types: OncoPhenotypeData, JSON, IO Required. + :type body: ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeData or JSON or IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body parameter Content-Type. Known values are: application/json. Default + value is None. + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns OncoPhenotypeResult. The OncoPhenotypeResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OncoPhenotypeResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._infer_cancer_profile_initial( + body=body, + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OncoPhenotypeResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_serialization.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_serialization.py new file mode 100644 index 000000000000..f17c068e833e --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_serialization.py @@ -0,0 +1,1996 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str + unicode_str = str + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset # type: ignore +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Dict[str, Any] = {} + for k in kwargs: + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node.""" + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to azure from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + Remove the polymorphic key from the initial data. + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + """ + return key.replace("\\.", ".") + + +class Serializer(object): + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is AzureCoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map # type: ignore + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_vendor.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_vendor.py new file mode 100644 index 000000000000..d1be71598b68 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import CancerProfilingClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import PipelineClient + + from ._serialization import Deserializer, Serializer + + +class CancerProfilingClientMixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "PipelineClient" + _config: CancerProfilingClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_version.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_version.py new file mode 100644 index 000000000000..be71c81bd282 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/__init__.py new file mode 100644 index 000000000000..3d699c5b937a --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._client import CancerProfilingClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "CancerProfilingClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py new file mode 100644 index 000000000000..990db21b2aea --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable + +from azure.core import AsyncPipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._serialization import Deserializer, Serializer +from ._configuration import CancerProfilingClientConfiguration +from ._operations import CancerProfilingClientOperationsMixin + + +class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """CancerProfilingClient. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + _endpoint = "{endpoint}/healthinsights" + self._config = CancerProfilingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "CancerProfilingClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_configuration.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_configuration.py new file mode 100644 index 000000000000..9bbb5f047bd0 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from .._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + +class CancerProfilingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for CancerProfilingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + super(CancerProfilingClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "healthinsights-cancerprofiling/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy( + self.credential, "Ocp-Apim-Subscription-Key", **kwargs + ) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/__init__.py new file mode 100644 index 000000000000..9d4dc7d0b198 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import CancerProfilingClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "CancerProfilingClientOperationsMixin", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py new file mode 100644 index 000000000000..9cf09e362695 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py @@ -0,0 +1,319 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import json +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict + +from ... import models as _models +from ..._model_base import AzureJSONEncoder, _deserialize +from ..._operations._operations import build_cancer_profiling_infer_cancer_profile_request +from .._vendor import CancerProfilingClientMixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class CancerProfilingClientOperationsMixin(CancerProfilingClientMixinABC): + async def _infer_cancer_profile_initial( + self, + body: Union[_models.OncoPhenotypeData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> Optional[_models.OncoPhenotypeResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.OncoPhenotypeResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _content = json.dumps(body, cls=AzureJSONEncoder) # type: ignore + + request = build_cancer_profiling_infer_cancer_profile_request( + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = _deserialize(_models.OncoPhenotypeResult, response.json()) + + if response.status_code == 202: + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Repeatability-Result"] = self._deserialize( + "str", response.headers.get("Repeatability-Result") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + @overload + async def begin_infer_cancer_profile( + self, + body: _models.OncoPhenotypeData, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeData + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns OncoPhenotypeResult. The + OncoPhenotypeResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_infer_cancer_profile( + self, + body: JSON, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: JSON + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns OncoPhenotypeResult. The + OncoPhenotypeResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_infer_cancer_profile( + self, + body: IO, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Required. + :type body: IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns OncoPhenotypeResult. The + OncoPhenotypeResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_infer_cancer_profile( + self, + body: Union[_models.OncoPhenotypeData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.OncoPhenotypeResult]: + """Create Onco Phenotype job. + + Creates an Onco Phenotype job with the given request body. + + :param body: Is one of the following types: OncoPhenotypeData, JSON, IO Required. + :type body: ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeData or JSON or IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body parameter Content-Type. Known values are: application/json. Default + value is None. + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns OncoPhenotypeResult. The + OncoPhenotypeResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.OncoPhenotypeResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._infer_cancer_profile_initial( + body=body, + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.OncoPhenotypeResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_vendor.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_vendor.py new file mode 100644 index 000000000000..7ba47a5ea7bb --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import CancerProfilingClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import AsyncPipelineClient + + from .._serialization import Deserializer, Serializer + + +class CancerProfilingClientMixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "AsyncPipelineClient" + _config: CancerProfilingClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/__init__.py new file mode 100644 index 000000000000..a962e8202086 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/__init__.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models import ClinicalCodedElement +from ._models import ClinicalNoteEvidence +from ._models import DocumentContent +from ._models import Error +from ._models import InferenceEvidence +from ._models import InnerError +from ._models import OncoPhenotypeData +from ._models import OncoPhenotypeInference +from ._models import OncoPhenotypeModelConfiguration +from ._models import OncoPhenotypePatientResult +from ._models import OncoPhenotypeResult +from ._models import OncoPhenotypeResults +from ._models import PatientDocument +from ._models import PatientInfo +from ._models import PatientRecord + +from ._enums import ClinicalDocumentType +from ._enums import DocumentContentSourceType +from ._enums import DocumentType +from ._enums import JobStatus +from ._enums import OncoPhenotypeInferenceType +from ._enums import PatientInfoSex +from ._enums import RepeatabilityResultType +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClinicalCodedElement", + "ClinicalNoteEvidence", + "DocumentContent", + "Error", + "InferenceEvidence", + "InnerError", + "OncoPhenotypeData", + "OncoPhenotypeInference", + "OncoPhenotypeModelConfiguration", + "OncoPhenotypePatientResult", + "OncoPhenotypeResult", + "OncoPhenotypeResults", + "PatientDocument", + "PatientInfo", + "PatientRecord", + "ClinicalDocumentType", + "DocumentContentSourceType", + "DocumentType", + "JobStatus", + "OncoPhenotypeInferenceType", + "PatientInfoSex", + "RepeatabilityResultType", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_enums.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_enums.py new file mode 100644 index 000000000000..82887a036e6b --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_enums.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class ClinicalDocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the clinical document.""" + + CONSULTATION = "consultation" + DISCHARGE_SUMMARY = "dischargeSummary" + HISTORY_AND_PHYSICAL = "historyAndPhysical" + PROCEDURE = "procedure" + PROGRESS = "progress" + IMAGING = "imaging" + LABORATORY = "laboratory" + PATHOLOGY = "pathology" + + +class DocumentContentSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the content's source. + In case the source type is 'inline', the content is given as a string (for instance, text). + In case the source type is 'reference', the content is given as a URI. + """ + + INLINE = "inline" + REFERENCE = "reference" + + +class DocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON + document). + """ + + NOTE = "note" + FHIR_BUNDLE = "fhirBundle" + DICOM = "dicom" + GENOMIC_SEQUENCING = "genomicSequencing" + + +class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the processing job.""" + + NOT_STARTED = "notStarted" + RUNNING = "running" + SUCCEEDED = "succeeded" + FAILED = "failed" + PARTIALLY_COMPLETED = "partiallyCompleted" + + +class OncoPhenotypeInferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the Onco Phenotype inference.""" + + TUMOR_SITE = "tumorSite" + HISTOLOGY = "histology" + CLINICAL_STAGE_T = "clinicalStageT" + CLINICAL_STAGE_N = "clinicalStageN" + CLINICAL_STAGE_M = "clinicalStageM" + PATHOLOGIC_STAGE_T = "pathologicStageT" + PATHOLOGIC_STAGE_N = "pathologicStageN" + PATHOLOGIC_STAGE_M = "pathologicStageM" + + +class PatientInfoSex(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The patient's sex.""" + + FEMALE = "female" + MALE = "male" + UNSPECIFIED = "unspecified" + + +class RepeatabilityResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of RepeatabilityResultType.""" + + ACCEPTED = "accepted" + REJECTED = "rejected" diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py new file mode 100644 index 000000000000..f91de6cc4e79 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py @@ -0,0 +1,705 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, List, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .. import _model_base +from .._model_base import rest_field + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models + + +class ClinicalCodedElement(_model_base.Model): + """A piece of clinical information, expressed as a code in a clinical coding system. + + All required parameters must be populated in order to send to Azure. + + :ivar system: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. + :vartype system: str + :ivar code: The code within the given clinical coding system. Required. + :vartype code: str + :ivar name: The name of this coded concept in the coding system. + :vartype name: str + :ivar value: A value associated with the code within the given clinical coding system. + :vartype value: str + """ + + system: str = rest_field() + """The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. """ + code: str = rest_field() + """The code within the given clinical coding system. Required. """ + name: Optional[str] = rest_field() + """The name of this coded concept in the coding system. """ + value: Optional[str] = rest_field() + """A value associated with the code within the given clinical coding system. """ + + @overload + def __init__( + self, + *, + system: str, + code: str, + name: Optional[str] = None, + value: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalNoteEvidence(_model_base.Model): + """A piece of evidence from a clinical note (text document). + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identifier of the document containing the evidence. Required. + :vartype id: str + :ivar text: The actual text span which is evidence for the inference. + :vartype text: str + :ivar offset: The start index of the evidence text span in the document (0 based). Required. + :vartype offset: int + :ivar length: The length of the evidence text span. Required. + :vartype length: int + """ + + id: str = rest_field() + """The identifier of the document containing the evidence. Required. """ + text: Optional[str] = rest_field() + """The actual text span which is evidence for the inference. """ + offset: int = rest_field() + """The start index of the evidence text span in the document (0 based). Required. """ + length: int = rest_field() + """The length of the evidence text span. Required. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + offset: int, + length: int, + text: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class DocumentContent(_model_base.Model): + """The content of the patient document. + + All required parameters must be populated in order to send to Azure. + + :ivar source_type: The type of the content's source. + In case the source type is 'inline', the content is given as a string (for instance, text). + In case the source type is 'reference', the content is given as a URI. Required. Known values + are: "inline" and "reference". + :vartype source_type: str or + ~azure.healthinsights.cancerprofiling.models.DocumentContentSourceType + :ivar value: The content of the document, given either inline (as a string) or as a reference + (URI). Required. + :vartype value: str + """ + + source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") + """The type of the content's source. In case the source type is 'inline', the content is given as a string (for + instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values + are: \"inline\" and \"reference\". """ + value: str = rest_field() + """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ + + @overload + def __init__( + self, + *, + source_type: Union[str, "_models.DocumentContentSourceType"], + value: str, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class Error(_model_base.Model): + """The error object. + + All required parameters must be populated in order to send to Azure. + + :ivar code: One of a server-defined set of error codes. Required. + :vartype code: str + :ivar message: A human-readable representation of the error. Required. + :vartype message: str + :ivar target: The target of the error. + :vartype target: str + :ivar details: An array of details about specific errors that led to this reported error. + Required. + :vartype details: list[~azure.healthinsights.cancerprofiling.models.Error] + :ivar innererror: An object containing more specific information than the current object about + the error. + :vartype innererror: ~azure.healthinsights.cancerprofiling.models.InnerError + """ + + code: str = rest_field() + """One of a server-defined set of error codes. Required. """ + message: str = rest_field() + """A human-readable representation of the error. Required. """ + target: Optional[str] = rest_field() + """The target of the error. """ + details: List["_models.Error"] = rest_field() + """An array of details about specific errors that led to this reported error. Required. """ + innererror: Optional["_models.InnerError"] = rest_field() + """An object containing more specific information than the current object about the error. """ + + @overload + def __init__( + self, + *, + code: str, + message: str, + details: List["_models.Error"], + target: Optional[str] = None, + innererror: Optional["_models.InnerError"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class InferenceEvidence(_model_base.Model): + """A piece of evidence corresponding to an inference. + + :ivar patient_data_evidence: A piece of evidence from a clinical note (text document). + :vartype patient_data_evidence: + ~azure.healthinsights.cancerprofiling.models.ClinicalNoteEvidence + :ivar patient_info_evidence: A piece of clinical information, expressed as a code in a clinical + coding + system. + :vartype patient_info_evidence: + ~azure.healthinsights.cancerprofiling.models.ClinicalCodedElement + :ivar importance: A value indicating how important this piece of evidence is for the inference. + :vartype importance: float + """ + + patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = rest_field(name="patientDataEvidence") + """A piece of evidence from a clinical note (text document). """ + patient_info_evidence: Optional["_models.ClinicalCodedElement"] = rest_field(name="patientInfoEvidence") + """A piece of clinical information, expressed as a code in a clinical coding +system. """ + importance: Optional[float] = rest_field() + """A value indicating how important this piece of evidence is for the inference. """ + + @overload + def __init__( + self, + *, + patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = None, + patient_info_evidence: Optional["_models.ClinicalCodedElement"] = None, + importance: Optional[float] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class InnerError(_model_base.Model): + """An object containing more specific information about the error. As per Microsoft One API + guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + All required parameters must be populated in order to send to Azure. + + :ivar code: One of a server-defined set of error codes. Required. + :vartype code: str + :ivar innererror: Inner error. + :vartype innererror: ~azure.healthinsights.cancerprofiling.models.InnerError + """ + + code: str = rest_field() + """One of a server-defined set of error codes. Required. """ + innererror: Optional["_models.InnerError"] = rest_field() + """Inner error. """ + + @overload + def __init__( + self, + *, + code: str, + innererror: Optional["_models.InnerError"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class OncoPhenotypeData(_model_base.Model): + """OncoPhenotypeData. + + All required parameters must be populated in order to send to Azure. + + :ivar patients: The list of patients, including their clinical information and data. Required. + :vartype patients: list[~azure.healthinsights.cancerprofiling.models.PatientRecord] + :ivar configuration: Configuration affecting the Onco Phenotype model's inference. + :vartype configuration: + ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeModelConfiguration + """ + + patients: List["_models.PatientRecord"] = rest_field() + """The list of patients, including their clinical information and data. Required. """ + configuration: Optional["_models.OncoPhenotypeModelConfiguration"] = rest_field() + """Configuration affecting the Onco Phenotype model's inference. """ + + @overload + def __init__( + self, + *, + patients: List["_models.PatientRecord"], + configuration: Optional["_models.OncoPhenotypeModelConfiguration"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class OncoPhenotypeInference(_model_base.Model): + """An inference made by the Onco Phenotype model regarding a patient. + + All required parameters must be populated in order to send to Azure. + + :ivar type: The type of the Onco Phenotype inference. Required. Known values are: "tumorSite", + "histology", "clinicalStageT", "clinicalStageN", "clinicalStageM", "pathologicStageT", + "pathologicStageN", and "pathologicStageM". + :vartype type: str or ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeInferenceType + :ivar value: The value of the inference, as relevant for the given inference type. Required. + :vartype value: str + :ivar description: The description corresponding to the inference value. + :vartype description: str + :ivar confidence_score: Confidence score for this inference. + :vartype confidence_score: float + :ivar evidence: The evidence corresponding to the inference value. + :vartype evidence: list[~azure.healthinsights.cancerprofiling.models.InferenceEvidence] + :ivar case_id: An identifier for a clinical case, if there are multiple clinical cases + regarding the same patient. + :vartype case_id: str + """ + + type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() # pylint: disable=redefined-builtin + """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", + \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", + and \"pathologicStageM\". """ + value: str = rest_field() + """The value of the inference, as relevant for the given inference type. Required. """ + description: Optional[str] = rest_field() + """The description corresponding to the inference value. """ + confidence_score: Optional[float] = rest_field(name="confidenceScore") + """Confidence score for this inference. """ + evidence: Optional[List["_models.InferenceEvidence"]] = rest_field() + """The evidence corresponding to the inference value. """ + case_id: Optional[str] = rest_field(name="caseId") + """An identifier for a clinical case, if there are multiple clinical cases regarding the same patient. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.OncoPhenotypeInferenceType"], # pylint: disable=redefined-builtin + value: str, + description: Optional[str] = None, + confidence_score: Optional[float] = None, + evidence: Optional[List["_models.InferenceEvidence"]] = None, + case_id: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class OncoPhenotypeModelConfiguration(_model_base.Model): + """Configuration affecting the Onco Phenotype model's inference. + + :ivar verbose: An indication whether the model should produce verbose output. + :vartype verbose: bool + :ivar include_evidence: An indication whether the model's output should include evidence for + the inferences. + :vartype include_evidence: bool + :ivar inference_types: A list of inference types to be inferred for the current request. + This could be used if only part of the Onco Phenotype inferences are required. + If this list is omitted or empty, the model will return all the inference types. + :vartype inference_types: list[str or + ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeInferenceType] + :ivar check_for_cancer_case: An indication whether to perform a preliminary step on the + patient's documents to determine whether they relate to a Cancer case. + :vartype check_for_cancer_case: bool + """ + + verbose: bool = rest_field(default=False) + """An indication whether the model should produce verbose output. """ + include_evidence: bool = rest_field(name="includeEvidence", default=True) + """An indication whether the model's output should include evidence for the inferences. """ + inference_types: Optional[List[Union[str, "_models.OncoPhenotypeInferenceType"]]] = rest_field( + name="inferenceTypes" + ) + """A list of inference types to be inferred for the current request. +This could be used if only part of the Onco Phenotype inferences are required. +If this list is omitted or empty, the model will return all the inference types. """ + check_for_cancer_case: bool = rest_field(name="checkForCancerCase", default=False) + """An indication whether to perform a preliminary step on the patient's documents to determine whether they + relate to a Cancer case. """ + + @overload + def __init__( + self, + *, + verbose: bool = False, + include_evidence: bool = True, + inference_types: Optional[List[Union[str, "_models.OncoPhenotypeInferenceType"]]] = None, + check_for_cancer_case: bool = False, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class OncoPhenotypePatientResult(_model_base.Model): + """The results of the model's work for a single patient. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identifier given for the patient in the request. Required. + :vartype id: str + :ivar inferences: The model's inferences for the given patient. Required. + :vartype inferences: list[~azure.healthinsights.cancerprofiling.models.OncoPhenotypeInference] + """ + + id: str = rest_field() + """The identifier given for the patient in the request. Required. """ + inferences: List["_models.OncoPhenotypeInference"] = rest_field() + """The model's inferences for the given patient. Required. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + inferences: List["_models.OncoPhenotypeInference"], + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class OncoPhenotypeResult(_model_base.Model): + """The response for the Onco Phenotype request. + + Readonly variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_id: A processing job identifier. Required. + :vartype job_id: str + :ivar created_date_time: The date and time when the processing job was created. Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: The date and time when the processing job is set to expire. + Required. + :vartype expiration_date_time: ~datetime.datetime + :ivar last_update_date_time: The date and time when the processing job was last updated. + Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: The status of the processing job. Required. Known values are: "notStarted", + "running", "succeeded", "failed", and "partiallyCompleted". + :vartype status: str or ~azure.healthinsights.cancerprofiling.models.JobStatus + :ivar errors: An array of errors, if any errors occurred during the processing job. + :vartype errors: list[~azure.healthinsights.cancerprofiling.models.Error] + :ivar results: The inference results for the Onco Phenotype request. + :vartype results: ~azure.healthinsights.cancerprofiling.models.OncoPhenotypeResults + """ + + job_id: str = rest_field(name="jobId", readonly=True) + """A processing job identifier. Required. """ + created_date_time: datetime.datetime = rest_field(name="createdDateTime", readonly=True) + """The date and time when the processing job was created. Required. """ + expiration_date_time: datetime.datetime = rest_field(name="expirationDateTime", readonly=True) + """The date and time when the processing job is set to expire. Required. """ + last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) + """The date and time when the processing job was last updated. Required. """ + status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", + \"failed\", and \"partiallyCompleted\". """ + errors: Optional[List["_models.Error"]] = rest_field(readonly=True) + """An array of errors, if any errors occurred during the processing job. """ + results: Optional["_models.OncoPhenotypeResults"] = rest_field(readonly=True) + """The inference results for the Onco Phenotype request. """ + + +class OncoPhenotypeResults(_model_base.Model): + """The inference results for the Onco Phenotype request. + + All required parameters must be populated in order to send to Azure. + + :ivar patients: Results for the patients given in the request. Required. + :vartype patients: + list[~azure.healthinsights.cancerprofiling.models.OncoPhenotypePatientResult] + :ivar model_version: The version of the model used for inference, expressed as the model date. + Required. + :vartype model_version: str + """ + + patients: List["_models.OncoPhenotypePatientResult"] = rest_field() + """Results for the patients given in the request. Required. """ + model_version: str = rest_field(name="modelVersion") + """The version of the model used for inference, expressed as the model date. Required. """ + + @overload + def __init__( + self, + *, + patients: List["_models.OncoPhenotypePatientResult"], + model_version: str, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientDocument(_model_base.Model): + """A clinical document related to a patient. Document here is in the wide sense - not just a text + document (note). + + All required parameters must be populated in order to send to Azure. + + :ivar type: The type of the patient document, such as 'note' (text document) or 'fhirBundle' + (FHIR JSON document). Required. Known values are: "note", "fhirBundle", "dicom", and + "genomicSequencing". + :vartype type: str or ~azure.healthinsights.cancerprofiling.models.DocumentType + :ivar clinical_type: The type of the clinical document. Known values are: "consultation", + "dischargeSummary", "historyAndPhysical", "procedure", "progress", "imaging", "laboratory", and + "pathology". + :vartype clinical_type: str or + ~azure.healthinsights.cancerprofiling.models.ClinicalDocumentType + :ivar id: A given identifier for the document. Has to be unique across all documents for a + single patient. Required. + :vartype id: str + :ivar language: A 2 letter ISO 639-1 representation of the language of the document. + :vartype language: str + :ivar created_date_time: The date and time when the document was created. + :vartype created_date_time: ~datetime.datetime + :ivar content: The content of the patient document. Required. + :vartype content: ~azure.healthinsights.cancerprofiling.models.DocumentContent + """ + + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ + clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", + \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ + id: str = rest_field() + """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ + language: Optional[str] = rest_field() + """A 2 letter ISO 639-1 representation of the language of the document. """ + created_date_time: Optional[datetime.datetime] = rest_field(name="createdDateTime") + """The date and time when the document was created. """ + content: "_models.DocumentContent" = rest_field() + """The content of the patient document. Required. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + id: str, # pylint: disable=redefined-builtin + content: "_models.DocumentContent", + clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, + language: Optional[str] = None, + created_date_time: Optional[datetime.datetime] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientInfo(_model_base.Model): + """Patient structured information, including demographics and known structured clinical + information. + + :ivar sex: The patient's sex. Known values are: "female", "male", and "unspecified". + :vartype sex: str or ~azure.healthinsights.cancerprofiling.models.PatientInfoSex + :ivar birth_date: The patient's date of birth. + :vartype birth_date: ~datetime.date + :ivar clinical_info: Known clinical information for the patient, structured. + :vartype clinical_info: list[~azure.healthinsights.cancerprofiling.models.ClinicalCodedElement] + """ + + sex: Optional[Union[str, "_models.PatientInfoSex"]] = rest_field() + """The patient's sex. Known values are: \"female\", \"male\", and \"unspecified\".""" + birth_date: Optional[datetime.date] = rest_field(name="birthDate") + """The patient's date of birth. """ + clinical_info: Optional[List["_models.ClinicalCodedElement"]] = rest_field(name="clinicalInfo") + """Known clinical information for the patient, structured. """ + + @overload + def __init__( + self, + *, + sex: Optional[Union[str, "_models.PatientInfoSex"]] = None, + birth_date: Optional[datetime.date] = None, + clinical_info: Optional[List["_models.ClinicalCodedElement"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientRecord(_model_base.Model): + """A patient record, including their clinical information and data. + + All required parameters must be populated in order to send to Azure. + + :ivar id: A given identifier for the patient. Has to be unique across all patients in a single + request. Required. + :vartype id: str + :ivar info: Patient structured information, including demographics and known structured + clinical information. + :vartype info: ~azure.healthinsights.cancerprofiling.models.PatientInfo + :ivar data: Patient unstructured clinical data, given as documents. + :vartype data: list[~azure.healthinsights.cancerprofiling.models.PatientDocument] + """ + + id: str = rest_field() + """A given identifier for the patient. Has to be unique across all patients in a single request. Required. """ + info: Optional["_models.PatientInfo"] = rest_field() + """Patient structured information, including demographics and known structured clinical information. """ + data: Optional[List["_models.PatientDocument"]] = rest_field() + """Patient unstructured clinical data, given as documents. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + info: Optional["_models.PatientInfo"] = None, + data: Optional[List["_models.PatientDocument"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/py.typed b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/dev_requirements.txt b/sdk/healthinsights/azure-healthinsights-cancerprofiling/dev_requirements.txt new file mode 100644 index 000000000000..ff12ab35dd01 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/dev_requirements.txt @@ -0,0 +1,4 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md new file mode 100644 index 000000000000..ffd9f6131743 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md @@ -0,0 +1,55 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-cognitive-services + - azure-healthinsights-cancerprofiling +urlFragment: healthinsights-cancerprofiling-samples +--- + +# Samples for Health Insights Cancer Profiling client library for Python + +These code samples show common scenario operations with the Health Insights Cancer Profiling client library. + +These sample programs show common scenarios for the Health Insights Cancer Profiling client's offerings. + +|**File Name**|**Description**| +|----------------|-------------| +|[sample_infer_cancer_profiling.py][sample_infer_cancer_profiling] |Infer cancer profiling.| + +## Prerequisites +* Python 2.7 or 3.5 or higher is required to use this package. +* The Pandas data analysis library. +* You must have an [Azure subscription][azure_subscription] and an +[Azure Health Insights account][azure_healthinsights_account] to run these samples. + +## Setup + +1. Install the Azure Health Insights Cancer Profiling client library for Python with [pip][pip]: + +```bash +pip install azure-healthinsights-cancerprofiling +``` + +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file, e.g. `python sample_infer_cancer_profiling.py` + +## Next steps + +Check out the [API reference documentation][python-fr-ref-docs] to learn more about +what you can do with the Health Insights client library. + +[pip]: https://pypi.org/project/pip/ +[azure_subscription]: https://azure.microsoft.com/free/cognitive-services + diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py new file mode 100644 index 000000000000..956186662f00 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -0,0 +1,192 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling.models import * # type: ignore +from azure.healthinsights.cancerprofiling.aio import CancerProfilingClient + +""" +FILE: sample_infer_cancer_profiling.py + +DESCRIPTION: + Infer key cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM + categories from a patient's unstructured clinical documents. + + OncoPhenotype model enables cancer registrars and clinical researchers to infer key cancer attributes from + unstructured clinical documents along with evidence relevant to those attributes. This model can help reduce the + manual time spent combing through large amounts of patient documentation. + + +USAGE: + python sample_infer_cancer_profiling.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def infer_cancer_profiling(self): + KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" + ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + + # Create an Onco Phenotype client + # + cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Construct patient + # + patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) + patient1 = PatientRecord(id="patient_id", info=patient_info) + # + + # Add document list + # + doc_content1 = "15.8.2021" \ + + "Jane Doe 091175-8967" \ + + "42 year old female, married with 3 children, works as a nurse. " \ + + "Healthy, no medications taken on a regular basis." \ + + "PMHx is significant for migraines with aura, uses Mirena for contraception." \ + + "Smoking history of 10 pack years (has stopped and relapsed several times)." \ + + "She is in c/o 2 weeks of productive cough and shortness of breath." \ + + "She has a fever of 37.8 and general weakness. " \ + + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. " \ + + "On PE:" \ + + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. " \ + + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing." \ + + " No crackles, rales, and wheezes. Resonant percussion. " \ + + "PLAN: " \ + + "Will be referred for a chest x-ray. " \ + + "======================================" \ + + "CXR showed mild nonspecific opacities in right lung base. " \ + + "PLAN:" \ + + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a " \ + + "follow-up CXR in 2 weeks. " + + patient_document1 = PatientDocument(type=DocumentType.NOTE, + id="doc1", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content1), + clinical_type=ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15)) + + doc_content2 = "Oncology Clinic " \ + + "20.10.2021" \ + + "Jane Doe 091175-8967" \ + + "42-year-old healthy female who works as a nurse in the ER of this hospital. " \ + + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children." \ + + "Didn’t breastfeed. " \ + + "Contraception- Mirena." \ + + "Smoking- 10 pack years. " \ + + "Mother- Belarusian. Father- Georgian. " \ + + "About 3 months prior to admission, she stated she had SOB and was febrile. " \ + + "She did a CXR as an outpatient which showed a finding in the base of the right lung- " \ + + "possibly an infiltrate." \ + + "She was treated with antibiotics with partial response. " \ + + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. " \ + + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right " \ + + "breast, lymph nodes on the right a few areas in the lungs and liver. " \ + + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic " \ + + "testing has not been done thus far. " \ + + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, " \ + + "and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). " \ + + "She is planned to undergo genetic tests because the aggressive course of the disease, " \ + + "and her young age. " \ + + "Impression:" \ + + "Stage 4 triple negative breast adenocarcinoma. " \ + + "Could benefit from biological therapy. " \ + + "Different treatment options were explained- the patient wants to get a second opinion." + + patient_document2 = PatientDocument(type=DocumentType.NOTE, + id="doc2", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content2), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20)) + + doc_content3 = "PATHOLOGY REPORT" \ + + " Clinical Iדדnformation" \ + + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC" \ + + " Diagnosis" \ + + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:" \ + + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1" \ + + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; " \ + + " total score; 5/9)" \ + + " Fragments involved by invasive carcinoma: 2" \ + + " Largest measurement of invasive carcinoma on a single fragment: 7 mm" \ + + " Ductal carcinoma in situ (DCIS): Present" \ + + " Architectural pattern: Cribriform" \ + + " Nuclear grade: 2-" \ + + " -intermediate" \ + + " Necrosis: Not identified" \ + + " Fragments involved by DCIS: 1" \ + + " Largest measurement of DCIS on a single fragment: Span 2 mm" \ + + " Microcalcifications: Present in benign breast tissue and invasive carcinoma" \ + + " Blocks with invasive carcinoma: A1" \ + + " Special studies: Pending" + + patient_document3 = PatientDocument(type=DocumentType.NOTE, + id="doc3", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content3), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1)) + + patient_doc_list = [patient_document1, patient_document2, patient_document3] + patient1.data = patient_doc_list + # <\DocumentList> + + # Set configuration to include evidence for the cancer staging inferences + configuration = OncoPhenotypeModelConfiguration(include_evidence=True) + + # Construct the request with the patient and configuration + cancer_profiling_data = OncoPhenotypeData(patients=[patient1], configuration=configuration) + + # Health Insights Infer Oncology Phenotyping + try: + poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) + cancer_profiling_result = await poller.result() + self.print_inferences(cancer_profiling_result) + except Exception as ex: + print(str(ex)) + return + + # print the inferences + def print_inferences(self, cancer_profiling_result): + if cancer_profiling_result.status == JobStatus.SUCCEEDED: + results = cancer_profiling_result.results + for patient_result in results.patients: + print(f"\n==== Inferences of Patient {patient_result.id} ====") + for inference in patient_result.inferences: + print( + f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + ConfidenceScore: {inference.confidence_score} ===") + for evidence in inference.evidence: + data_evidence = evidence.patient_data_evidence + print( + f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + {data_evidence.text}") + else: + errors = cancer_profiling_result.errors + if errors is not None: + for error in errors: + print(f"{error.code} : {error.message}") + + +async def main(): + sample = HealthInsightsSamples() + await sample.infer_cancer_profiling() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py new file mode 100644 index 000000000000..308c772ce75f --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/setup.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-healthinsights-cancerprofiling" +PACKAGE_PPRINT_NAME = "None" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft None Client Library for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.healthinsights", + ] + ), + include_package_data=True, + package_data={ + "pytyped": ["py.typed"], + }, + install_requires=[ + "isodate<1.0.0,>=0.6.1", + "azure-core<2.0.0,>=1.24.0", + "typing-extensions>=4.3.0; python_version<'3.8.0'", + ], + python_requires=">=3.7", +) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/__init__.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py new file mode 100644 index 000000000000..ce09206dd299 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/conftest.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# coding=utf-8 + +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import os +import platform +import pytest +import sys + +from dotenv import load_dotenv + +from devtools_testutils import test_proxy, add_general_regex_sanitizer + +load_dotenv() + + +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + healthinsights_endpoint = os.environ.get( + "HEALTHINSIGHTS_ENDPOINT", "https://fake_ad_resource.cognitiveservices.azure.com/" + ) + healthinsights_key = os.environ.get("HEALTHINSIGHTS_KEY", "00000000000000000000000000000000") + add_general_regex_sanitizer( + regex=healthinsights_endpoint, value="https://fake_ad_resource.cognitiveservices.azure.com/" + ) + add_general_regex_sanitizer( + regex=healthinsights_key, value="00000000000000000000000000000000" + ) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/recordings/test_cancer_profiling.pyTestCancerProfilingtest_cancer_profiling.json b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/recordings/test_cancer_profiling.pyTestCancerProfilingtest_cancer_profiling.json new file mode 100644 index 000000000000..39b7c8ffaa6f --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/recordings/test_cancer_profiling.pyTestCancerProfilingtest_cancer_profiling.json @@ -0,0 +1,655 @@ +{ + "Entries": [ + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/oncophenotype/jobs?api-version=2023-03-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Content-Length": "776", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-healthinsights-CancerProfiling/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": { + "configuration": { + "checkForCancerCase": true, + "verbose": false, + "includeEvidence": true + }, + "patients": [ + { + "id": "patient1", + "data": [ + { + "kind": "note", + "clinicalType": "pathology", + "id": "document1", + "language": "en", + "createdDateTime": "2022-01-01T00:00:00", + "content": { + "sourceType": "inline", + "value": "Laterality: Left \n Tumor type present: Invasive duct carcinoma; duct carcinoma in situ \n Tumor site: Upper inner quadrant \n Invasive carcinoma \n Histologic type: Ductal \n Size of invasive component: 0.9 cm \n Histologic Grade - Nottingham combined histologic score: 1 out of 3 \n In situ carcinoma (DCIS) \n Histologic type of DCIS: Cribriform and solid \n Necrosis in DCIS: Yes \n DCIS component of invasive carcinoma: Extensive \n" + } + } + ] + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "f5580474-ed64-4ee8-8b56-96a3511fed6d", + "Content-Length": "0", + "Date": "Mon, 06 Mar 2023 15:34:46 GMT", + "Operation-Location": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/oncophenotype/jobs/941a4d55-b2f5-4b2b-89ac-796a75615ca3?api-version=2023-03-01-preview", + "Retry-After": "5", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/oncophenotype/jobs/941a4d55-b2f5-4b2b-89ac-796a75615ca3?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-healthinsights-CancerProfiling/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5bd1b000-e6f7-4d7e-b47a-c1e674e24159", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:46 GMT", + "Retry-After": "3", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "941a4d55-b2f5-4b2b-89ac-796a75615ca3", + "createdDateTime": "2023-03-06T15:34:46Z", + "expirationDateTime": "2023-03-06T15:51:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:46Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/oncophenotype/jobs/941a4d55-b2f5-4b2b-89ac-796a75615ca3?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-healthinsights-CancerProfiling/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2da6f984-9cb5-44f7-a7b5-6756e09c6d16", + "Content-Length": "6742", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "results": { + "patients": [ + { + "id": "patient1", + "inferences": [ + { + "type": "tumorSite", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Upper inner", + "offset": 108, + "length": 11 + }, + "importance": 0.5563 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "duct", + "offset": 68, + "length": 4 + }, + "importance": 0.0156 + } + ], + "value": "C50.2", + "description": "BREAST", + "confidenceScore": 0.9214 + }, + { + "type": "histology", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Ductal", + "offset": 174, + "length": 6 + }, + "importance": 0.2937 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct", + "offset": 43, + "length": 13 + }, + "importance": 0.2439 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 193, + "length": 8 + }, + "importance": 0.1588 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "duct", + "offset": 68, + "length": 4 + }, + "importance": 0.1483 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "solid", + "offset": 368, + "length": 5 + }, + "importance": 0.0694 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Cribriform", + "offset": 353, + "length": 10 + }, + "importance": 0.043 + } + ], + "value": "8500", + "confidenceScore": 0.9973 + }, + { + "type": "clinicalStageT", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct carcinoma; duct", + "offset": 43, + "length": 29 + }, + "importance": 0.2613 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 193, + "length": 8 + }, + "importance": 0.1341 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Laterality: Left", + "offset": 0, + "length": 17 + }, + "importance": 0.0874 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive", + "offset": 133, + "length": 8 + }, + "importance": 0.0722 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "situ", + "offset": 86, + "length": 4 + }, + "importance": 0.0651 + } + ], + "value": "T1", + "confidenceScore": 0.9956 + }, + { + "type": "clinicalStageN", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct carcinoma; duct carcinoma in situ", + "offset": 43, + "length": 47 + }, + "importance": 0.1529 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive carcinoma: Extensive", + "offset": 423, + "length": 30 + }, + "importance": 0.0782 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive", + "offset": 133, + "length": 8 + }, + "importance": 0.0715 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 95, + "length": 5 + }, + "importance": 0.0513 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Left", + "offset": 13, + "length": 4 + }, + "importance": 0.0325 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 22, + "length": 5 + }, + "importance": 0.0174 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Histologic", + "offset": 156, + "length": 10 + }, + "importance": 0.0066 + } + ], + "value": "N0", + "confidenceScore": 0.9931 + }, + { + "type": "clinicalStageM", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Laterality: Left", + "offset": 0, + "length": 17 + }, + "importance": 0.1579 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct", + "offset": 43, + "length": 13 + }, + "importance": 0.1493 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Histologic Grade - Nottingham", + "offset": 225, + "length": 29 + }, + "importance": 0.1038 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive", + "offset": 133, + "length": 8 + }, + "importance": 0.089 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "duct carcinoma", + "offset": 68, + "length": 14 + }, + "importance": 0.0807 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 423, + "length": 8 + }, + "importance": 0.057 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Extensive", + "offset": 444, + "length": 9 + }, + "importance": 0.0494 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 22, + "length": 5 + }, + "importance": 0.0311 + } + ], + "value": "None", + "confidenceScore": 0.5217 + }, + { + "type": "pathologicStageT", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct", + "offset": 43, + "length": 13 + }, + "importance": 0.3125 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Left", + "offset": 13, + "length": 4 + }, + "importance": 0.201 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 193, + "length": 8 + }, + "importance": 0.1244 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 423, + "length": 8 + }, + "importance": 0.0961 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive", + "offset": 133, + "length": 8 + }, + "importance": 0.0623 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 22, + "length": 5 + }, + "importance": 0.0583 + } + ], + "value": "T1", + "confidenceScore": 0.9477 + }, + { + "type": "pathologicStageN", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive component:", + "offset": 193, + "length": 19 + }, + "importance": 0.1402 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Nottingham combined histologic score:", + "offset": 244, + "length": 37 + }, + "importance": 0.1096 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive carcinoma", + "offset": 133, + "length": 18 + }, + "importance": 0.1067 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Ductal", + "offset": 174, + "length": 6 + }, + "importance": 0.0896 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct carcinoma;", + "offset": 43, + "length": 24 + }, + "importance": 0.0831 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Histologic", + "offset": 156, + "length": 10 + }, + "importance": 0.0447 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "in situ", + "offset": 83, + "length": 7 + }, + "importance": 0.042 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 22, + "length": 5 + }, + "importance": 0.0092 + } + ], + "value": "N0", + "confidenceScore": 0.7927 + }, + { + "type": "pathologicStageM", + "evidence": [ + { + "patientDataEvidence": { + "id": "document1", + "text": "In situ carcinoma (DCIS)", + "offset": 298, + "length": 24 + }, + "importance": 0.1111 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Nottingham combined histologic", + "offset": 244, + "length": 30 + }, + "importance": 0.0999 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive carcinoma:", + "offset": 423, + "length": 19 + }, + "importance": 0.0787 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "invasive", + "offset": 193, + "length": 8 + }, + "importance": 0.0617 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive duct carcinoma;", + "offset": 43, + "length": 24 + }, + "importance": 0.0594 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 22, + "length": 5 + }, + "importance": 0.0579 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "of DCIS:", + "offset": 343, + "length": 8 + }, + "importance": 0.0483 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Laterality:", + "offset": 0, + "length": 11 + }, + "importance": 0.0324 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Invasive carcinoma", + "offset": 133, + "length": 18 + }, + "importance": 0.0269 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "carcinoma in", + "offset": 73, + "length": 12 + }, + "importance": 0.0202 + }, + { + "patientDataEvidence": { + "id": "document1", + "text": "Tumor", + "offset": 95, + "length": 5 + }, + "importance": 0.0112 + } + ], + "value": "M0", + "confidenceScore": 0.9208 + } + ] + } + ], + "modelVersion": "2022-01-01-preview" + }, + "jobId": "941a4d55-b2f5-4b2b-89ac-796a75615ca3", + "createdDateTime": "2023-03-06T15:34:46Z", + "expirationDateTime": "2023-03-06T15:51:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:47Z", + "status": "succeeded" + } + } + ], + "Variables": {} +} diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py new file mode 100644 index 000000000000..27aefb6357e1 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py @@ -0,0 +1,62 @@ +import functools +import json +import os + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling import CancerProfilingClient + +from devtools_testutils import ( + AzureRecordedTestCase, + PowerShellPreparer, + recorded_by_proxy, +) + +HealthInsightsEnvPreparer = functools.partial( + PowerShellPreparer, + "healthinsights", + healthinsights_endpoint="https://fake_ad_resource.cognitiveservices.azure.com/", + healthinsights_key="00000000000000000000000000000000", +) + + +class TestCancerProfiling(AzureRecordedTestCase): + + @HealthInsightsEnvPreparer() + @recorded_by_proxy + def test_cancer_profiling(self, healthinsights_endpoint, healthinsights_key): + cancer_profiling_client = CancerProfilingClient(healthinsights_endpoint, AzureKeyCredential(healthinsights_key)) + + assert cancer_profiling_client is not None + + data = { + "configuration": { + "checkForCancerCase": True, + "verbose": False, + "includeEvidence": True + }, + "patients": [ + { + "id": "patient1", + "data": [ + { + "kind": "note", + "clinicalType": "pathology", + "id": "document1", + "language": "en", + "createdDateTime": "2022-01-01T00:00:00", + "content": { + "sourceType": "inline", + "value": "Laterality: Left \n Tumor type present: Invasive duct carcinoma; duct carcinoma in situ \n Tumor site: Upper inner quadrant \n Invasive carcinoma \n Histologic type: Ductal \n Size of invasive component: 0.9 cm \n Histologic Grade - Nottingham combined histologic score: 1 out of 3 \n In situ carcinoma (DCIS) \n Histologic type of DCIS: Cribriform and solid \n Necrosis in DCIS: Yes \n DCIS component of invasive carcinoma: Extensive \n" + } + } + ] + } + ] + } + + poller = cancer_profiling_client.begin_infer_cancer_profile(data) + results = poller.result() + + assert len(results.results.patients[0].inferences) is not 0 + + diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md new file mode 100644 index 000000000000..628743d283a9 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/LICENSE b/sdk/healthinsights/azure-healthinsights-clinicalmatching/LICENSE new file mode 100644 index 000000000000..63447fd8bbbf --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/MANIFEST.in b/sdk/healthinsights/azure-healthinsights-clinicalmatching/MANIFEST.in new file mode 100644 index 000000000000..44211a4ff5cd --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include LICENSE +include azure/healthinsights/clinicalmatching/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/healthinsights/__init__.py \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md new file mode 100644 index 000000000000..f362839e9fa9 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md @@ -0,0 +1,175 @@ +# Azure Cognitive Services Health Insights Clinical Matching client library for Python +Remove comment + + +## Getting started + +### Prerequisites + +- Python 3.7 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Cognitive Services Health Insights instance. + + +### Install the package + +```bash +python -m pip install azure-healthinsights-clinicalmatching +``` + +This table shows the relationship between SDK versions and supported API versions of the service: + +|SDK version|Supported API version of service | +|-------------|---------------| +|1.0.0b1 | 2023-03-01-preview| + + +### Authenticate the client + +#### Get the endpoint + +You can find the endpoint for your Health Insights service resource using the +***[Azure Portal](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights) +or [Azure CLI](https://learn.microsoft.com/cli/azure/): + +```bash +# Get the endpoint for the Health Insights service resource +az cognitiveservices account show --name "resource-name" --resource-group "resource-group-name" --query "properties.endpoint" +``` + +#### Get the API Key + +You can get the **API Key** from the Health Insights service resource in the Azure Portal. +Alternatively, you can use **Azure CLI** snippet below to get the API key of your resource. + +```PowerShell +az cognitiveservices account keys list --resource-group --name +``` + +#### Create a CancerProfilingClient with an API Key Credential + +Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter +to authenticate the client: + +```python +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient + +credential = AzureKeyCredential("") +client = ClinicalMatchingClient(endpoint="https://.cognitiveservices.azure.com/", credential=credential) +``` + +### Long-Running Operations + +Long-running operations are operations which consist of an initial request sent to the service to start an operation, +followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has +succeeded, to get the result. + +Methods that support healthcare analysis, custom text analysis, or multiple analyses are modeled as long-running operations. +The client exposes a `begin_` method that returns a poller object. Callers should wait +for the operation to complete by calling `result()` on the poller object returned from the `begin_` method. +Sample code snippets are provided to illustrate using long-running operations [below](#examples "Examples"). + +## Key concepts + +Trial Matcher provides the user of the services two main modes of operation: patients centric and clinical trial centric. +- On patient centric mode, the Trial Matcher model bases the patient matching on the clinical condition, location, priorities, eligibility criteria, and other criteria that the patient and/or service users may choose to prioritize. The model helps narrow down and prioritize the set of relevant clinical trials to a smaller set of trials to start with, that the specific patient appears to be qualified for. +- On clinical trial centric, the Trial Matcher is finding a group of patients potentially eligible to a clinical trial. The Trial Matcher narrows down the patients, first filtered on clinical condition and selected clinical observations, and then focuses on those patients who met the baseline criteria, to find the group of patients that appears to be eligible patients to a trial. + +## Examples + +- [Match Trials - Find potential eligible trials for a patient](#match-trials) + +### Match trials + +Finding potential eligible trials for a patient. + +```python +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient + +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] +TIME_SERIES_DATA_PATH = os.path.join("sample_data", "request-data.csv") +client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) + +poller = client.begin_match_trials(data) +response = poller.result() + +if response.status == JobStatus.SUCCEEDED: + results = response.results + for patient_result in results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") +else: + errors = response.errors + if errors is not None: + for error in errors: + print(f"{error.code} : {error.message}") + +``` + +## Troubleshooting + +### General + +Health Insights Clinical Matching client library will raise exceptions defined in [Azure Core](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions). + +### Logging + +This library uses the standard [logging](https://docs.python.org/3/library/logging.html) library for logging. + +Basic information about HTTP sessions (URLs, headers, etc.) is logged at `INFO` level. + +Detailed `DEBUG` level logging, including request/response bodies and **unredacted** +headers, can be enabled on the client or per-operation with the `logging_enable` keyword argument. + +See full SDK logging documentation with examples [here](https://learn.microsoft.com/azure/developer/python/sdk/azure-sdk-logging). + +### Optional Configuration + +Optional keyword arguments can be passed in at the client and per-operation level. +The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. + +## Next steps + +### Additional documentation + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[azure_sub]: https://azure.microsoft.com/free/ \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/__init__.py new file mode 100644 index 000000000000..b22f7308b471 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._client import ClinicalMatchingClient +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClinicalMatchingClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py new file mode 100644 index 000000000000..e1660a68e86a --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any + +from azure.core import PipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import ClinicalMatchingClientConfiguration +from ._operations import ClinicalMatchingClientOperationsMixin +from ._serialization import Deserializer, Serializer + + +class ClinicalMatchingClient( + ClinicalMatchingClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClinicalMatchingClient. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + _endpoint = "{endpoint}/healthinsights" + self._config = ClinicalMatchingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> "ClinicalMatchingClient": + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_configuration.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_configuration.py new file mode 100644 index 000000000000..d0c367f193a9 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from ._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + +class ClinicalMatchingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ClinicalMatchingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + super(ClinicalMatchingClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "healthinsights-clinicalmatching/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy( + self.credential, "Ocp-Apim-Subscription-Key", **kwargs + ) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py new file mode 100644 index 000000000000..cedbc25ec4df --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py @@ -0,0 +1,714 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except +# pyright: reportGeneralTypeIssues=false + +import functools +import sys +import logging +import base64 +import re +import copy +import typing +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import NULL as AzureCoreNull + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["NULL", "AzureJSONEncoder", "Model", "rest_field", "rest_discriminator"] + + +class _Null(object): + """To create a Falsy object""" + + def __bool__(self): + return False + + __nonzero__ = __bool__ # Python2 compatibility + + +NULL = _Null() +""" +A falsy sentinel object which is supposed to be used to specify attributes +with no data. This gets serialized to `null` on the wire. +""" + +TZ_UTC = timezone.utc + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + + return "P" + date_str + time_str + + +def _datetime_as_isostr(dt: typing.Union[datetime, date, time, timedelta]) -> str: + """Converts a datetime.(datetime|date|time|timedelta) object into an ISO 8601 formatted string + + :param timedelta dt: The date object to convert + :rtype: str + :return: ISO8601 version of this datetime + """ + # First try datetime.datetime + if hasattr(dt, "year") and hasattr(dt, "hour"): + dt = typing.cast(datetime, dt) + # astimezone() fails for naive times in Python 2.7, so make make sure dt is aware (tzinfo is set) + if not dt.tzinfo: + iso_formatted = dt.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = dt.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + try: + dt = typing.cast(typing.Union[date, time], dt) + return dt.isoformat() + # Last, try datetime.timedelta + except AttributeError: + dt = typing.cast(timedelta, dt) + return _timedelta_as_isostr(dt) + + +def _serialize_bytes(o) -> str: + return base64.b64encode(o).decode() + + +def _serialize_datetime(o): + if hasattr(o, "year") and hasattr(o, "hour"): + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._readonly # pylint: disable=protected-access + except AttributeError: + return False + + +class AzureJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + readonly_props = [ + p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p) + ] # pylint: disable=protected-access + return {k: v for k, v in o.items() if k not in readonly_props} + if isinstance(o, (bytes, bytearray)): + return base64.b64encode(o).decode() + if o is AzureCoreNull: + return None + try: + return super(AzureJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o) + try: + # First try datetime.datetime + return _serialize_datetime(o) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(AzureJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: deserialize_bytes, + timedelta: deserialize_duration, + typing.Any: lambda x: x, +} + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + module = sys.modules[module_end] + models.update({k: v for k, v in module.__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = copy.deepcopy(data) + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + try: + return self[key] + except KeyError: + return default + + @typing.overload # type: ignore + def pop(self, key: str) -> typing.Any: # pylint: disable=no-member + ... + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: + ... + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + return self._data.popitem() + + def clear(self) -> None: + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + self._data.update(*args, **kwargs) + + @typing.overload # type: ignore + def setdefault(self, key: str) -> typing.Any: + ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: + ... + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o): + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o) + try: + # First try datetime.datetime + return _serialize_datetime(o) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + return _deserialize(rf._type, value) if (rf and rf._is_model) else _serialize(value) + + +class Model(_MyMutableMapping): + _is_model = True + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update({self._attr_to_rest_field[k]._rest_name: _serialize(v) for k, v in kwargs.items()}) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> "Model": # pylint: disable=unused-argument + # we know the last three classes in mro are going to be 'Model', 'dict', and 'object' + mros = cls.__mro__[:-3][::-1] # ignore model, dict, and object parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") # pylint: disable=no-member + for k, v in mro_class.__annotations__.items() # pylint: disable=no-member + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + + return super().__new__(cls) # pylint: disable=no-value-for-parameter + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): # pylint: disable=no-member + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member + + @classmethod + def _get_discriminator(cls) -> typing.Optional[str]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator: # pylint: disable=protected-access + return v._rest_name # pylint: disable=protected-access + return None + + @classmethod + def _deserialize(cls, data): + if not hasattr(cls, "__mapping__"): # pylint: disable=no-member + return cls(data) + discriminator = cls._get_discriminator() + mapped_cls = cls.__mapping__.get(data.get(discriminator), cls) # pylint: disable=no-member + if mapped_cls == cls: + return cls(data) + return mapped_cls._deserialize(data) # pylint: disable=protected-access + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements + annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation or annotation in [int, float]: + return None + + try: + if module and _is_model(_get_model(module, annotation)): + if rf: + rf._is_model = True + + def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + return functools.partial(_deserialize_model, _get_model(module, annotation)) + except Exception: + pass + + # is it a literal? + try: + if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports + else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + if annotation.__origin__ == Literal: + return None + except AttributeError: + pass + + if getattr(annotation, "__origin__", None) is typing.Union: + + def _deserialize_with_union(union_annotation, obj): + for t in union_annotation.__args__: + try: + return _deserialize(t, obj, module) + except DeserializationError: + pass + raise DeserializationError() + + return functools.partial(_deserialize_with_union, annotation) + + # is it optional? + try: + # right now, assuming we don't have unions, since we're getting rid of the only + # union we used to have in msrest models, which was union of str and enum + if any(a for a in annotation.__args__ if a == type(None)): + + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf + ) + + def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + except AttributeError: + pass + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) + + try: + if annotation._name == "Dict": + key_deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[0], module, rf) + value_deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[1], module, rf) + + def _deserialize_dict( + key_deserializer: typing.Optional[typing.Callable], + value_deserializer: typing.Optional[typing.Callable], + obj: typing.Dict[typing.Any, typing.Any], + ): + if obj is None: + return obj + return { + _deserialize(key_deserializer, k, module): _deserialize(value_deserializer, v, module) + for k, v in obj.items() + } + + return functools.partial( + _deserialize_dict, + key_deserializer, + value_deserializer, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: + if len(annotation.__args__) > 1: + + def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], obj + ): + if obj is None: + return obj + return type(obj)( + _deserialize(deserializer, entry, module) + for entry, deserializer in zip(obj, entry_deserializers) + ) + + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) for dt in annotation.__args__ + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers) + deserializer = _get_deserialize_callable_from_annotation(annotation.__args__[0], module, rf) + + def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + obj, + ): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + return functools.partial(_deserialize_sequence, deserializer) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + annotation, + deserializer_from_mapping, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(annotation, obj) + except Exception: + pass + return _deserialize_with_callable(deserializer_from_mapping, obj) + + return functools.partial(_deserialize_default, annotation, _DESERIALIZE_MAPPING.get(annotation)) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], value: typing.Any +): + try: + if value is None: + return None + if deserializer is None: + return value + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value) # type: ignore + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize(deserializer: typing.Any, value: typing.Any, module: typing.Optional[str] = None) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + deserializer = _get_deserialize_callable_from_annotation(deserializer, module) + return _deserialize_with_callable(deserializer, value) + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + readonly: bool = False, + default: typing.Any = _UNSET, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._readonly = readonly + self._is_model = False + self._default = default + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + return _deserialize(self._type, _serialize(item)) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model and not _is_model(value): + obj.__setitem__(self._rest_name, _deserialize(self._type, value)) + obj.__setitem__(self._rest_name, _serialize(value)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + readonly: bool = False, + default: typing.Any = _UNSET, +) -> typing.Any: + return _RestField(name=name, type=type, readonly=readonly, default=default) + + +def rest_discriminator( + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/__init__.py new file mode 100644 index 000000000000..dd05452272e2 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import ClinicalMatchingClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClinicalMatchingClientOperationsMixin", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py new file mode 100644 index 000000000000..f9fddf946835 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py @@ -0,0 +1,362 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import json +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.polling.base_polling import LROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict + +from .. import models as _models +from .._model_base import AzureJSONEncoder, _deserialize +from .._serialization import Serializer +from .._vendor import ClinicalMatchingClientMixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_clinical_matching_match_trials_request( + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: Literal["2023-03-01-preview"] = kwargs.pop( + "api_version", _params.pop("api-version", "2023-03-01-preview") + ) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/trialmatcher/jobs" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if repeatability_request_id is not None: + _headers["Repeatability-Request-ID"] = _SERIALIZER.header( + "repeatability_request_id", repeatability_request_id, "str" + ) + if repeatability_first_sent is not None: + _headers["Repeatability-First-Sent"] = _SERIALIZER.header( + "repeatability_first_sent", repeatability_first_sent, "iso-8601" + ) + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ClinicalMatchingClientOperationsMixin(ClinicalMatchingClientMixinABC): + def _match_trials_initial( + self, + body: Union[_models.TrialMatcherData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> Optional[_models.TrialMatcherResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.TrialMatcherResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _content = json.dumps(body, cls=AzureJSONEncoder) # type: ignore + + request = build_clinical_matching_match_trials_request( + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = _deserialize(_models.TrialMatcherResult, response.json()) + + if response.status_code == 202: + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Repeatability-Result"] = self._deserialize( + "str", response.headers.get("Repeatability-Result") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + @overload + def begin_match_trials( + self, + body: _models.TrialMatcherData, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: ~azure.healthinsights.clinicalmatching.models.TrialMatcherData + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns TrialMatcherResult. The TrialMatcherResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_match_trials( + self, + body: JSON, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: JSON + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns TrialMatcherResult. The TrialMatcherResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_match_trials( + self, + body: IO, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns TrialMatcherResult. The TrialMatcherResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_match_trials( + self, + body: Union[_models.TrialMatcherData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> LROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Is one of the following types: TrialMatcherData, JSON, IO Required. + :type body: ~azure.healthinsights.clinicalmatching.models.TrialMatcherData or JSON or IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body parameter Content-Type. Known values are: application/json. Default + value is None. + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns TrialMatcherResult. The TrialMatcherResult is + compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TrialMatcherResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._match_trials_initial( + body=body, + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.TrialMatcherResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_serialization.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_serialization.py new file mode 100644 index 000000000000..f17c068e833e --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_serialization.py @@ -0,0 +1,1996 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str + unicode_str = str + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset # type: ignore +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Dict[str, Any] = {} + for k in kwargs: + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node.""" + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to azure from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + Remove the polymorphic key from the initial data. + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + """ + return key.replace("\\.", ".") + + +class Serializer(object): + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is AzureCoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map # type: ignore + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_vendor.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_vendor.py new file mode 100644 index 000000000000..aca32d36529c --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ClinicalMatchingClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import PipelineClient + + from ._serialization import Deserializer, Serializer + + +class ClinicalMatchingClientMixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "PipelineClient" + _config: ClinicalMatchingClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_version.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_version.py new file mode 100644 index 000000000000..be71c81bd282 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/__init__.py new file mode 100644 index 000000000000..186129ff5060 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._client import ClinicalMatchingClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClinicalMatchingClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py new file mode 100644 index 000000000000..cf7ecdb394c1 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable + +from azure.core import AsyncPipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._serialization import Deserializer, Serializer +from ._configuration import ClinicalMatchingClientConfiguration +from ._operations import ClinicalMatchingClientOperationsMixin + + +class ClinicalMatchingClient( + ClinicalMatchingClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClinicalMatchingClient. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + _endpoint = "{endpoint}/healthinsights" + self._config = ClinicalMatchingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ClinicalMatchingClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_configuration.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_configuration.py new file mode 100644 index 000000000000..314f7a586354 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_configuration.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import sys +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from .._version import VERSION + +if sys.version_info >= (3, 8): + from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports +else: + from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports + + +class ClinicalMatchingClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ClinicalMatchingClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus2.api.cognitive.microsoft.com). Required. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential + :keyword api_version: The API version to use for this operation. Default value is + "2023-03-01-preview". Note that overriding this default value may result in unsupported + behavior. + :paramtype api_version: str + """ + + def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: + super(ClinicalMatchingClientConfiguration, self).__init__(**kwargs) + api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "healthinsights-clinicalmatching/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AzureKeyCredentialPolicy( + self.credential, "Ocp-Apim-Subscription-Key", **kwargs + ) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/__init__.py new file mode 100644 index 000000000000..dd05452272e2 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import ClinicalMatchingClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClinicalMatchingClientOperationsMixin", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py new file mode 100644 index 000000000000..9d0489d6c845 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py @@ -0,0 +1,319 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +import json +import sys +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict + +from ... import models as _models +from ..._model_base import AzureJSONEncoder, _deserialize +from ..._operations._operations import build_clinical_matching_match_trials_request +from .._vendor import ClinicalMatchingClientMixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ClinicalMatchingClientOperationsMixin(ClinicalMatchingClientMixinABC): + async def _match_trials_initial( + self, + body: Union[_models.TrialMatcherData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> Optional[_models.TrialMatcherResult]: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Optional[_models.TrialMatcherResult]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IO, bytes)): + _content = body + else: + _content = json.dumps(body, cls=AzureJSONEncoder) # type: ignore + + request = build_clinical_matching_match_trials_request( + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = _deserialize(_models.TrialMatcherResult, response.json()) + + if response.status_code == 202: + response_headers["Operation-Location"] = self._deserialize( + "str", response.headers.get("Operation-Location") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["Repeatability-Result"] = self._deserialize( + "str", response.headers.get("Repeatability-Result") + ) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + @overload + async def begin_match_trials( + self, + body: _models.TrialMatcherData, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: ~azure.healthinsights.clinicalmatching.models.TrialMatcherData + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns TrialMatcherResult. The TrialMatcherResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_match_trials( + self, + body: JSON, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: JSON + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns TrialMatcherResult. The TrialMatcherResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_match_trials( + self, + body: IO, + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Required. + :type body: IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns TrialMatcherResult. The TrialMatcherResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_match_trials( + self, + body: Union[_models.TrialMatcherData, JSON, IO], + *, + repeatability_request_id: Optional[str] = None, + repeatability_first_sent: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.TrialMatcherResult]: + """Create Trial Matcher job. + + Creates a Trial Matcher job with the given request body. + + :param body: Is one of the following types: TrialMatcherData, JSON, IO Required. + :type body: ~azure.healthinsights.clinicalmatching.models.TrialMatcherData or JSON or IO + :keyword repeatability_request_id: An opaque, globally-unique, client-generated string + identifier for the request. Default value is None. + :paramtype repeatability_request_id: str + :keyword repeatability_first_sent: Specifies the date and time at which the request was first + created. Default value is None. + :paramtype repeatability_first_sent: ~datetime.datetime + :keyword content_type: Body parameter Content-Type. Known values are: application/json. Default + value is None. + :paramtype content_type: str + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns TrialMatcherResult. The TrialMatcherResult + is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.healthinsights.clinicalmatching.models.TrialMatcherResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.TrialMatcherResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._match_trials_initial( + body=body, + repeatability_request_id=repeatability_request_id, + repeatability_first_sent=repeatability_first_sent, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.TrialMatcherResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_vendor.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_vendor.py new file mode 100644 index 000000000000..29a847c529a0 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ClinicalMatchingClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import AsyncPipelineClient + + from .._serialization import Deserializer, Serializer + + +class ClinicalMatchingClientMixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "AsyncPipelineClient" + _config: ClinicalMatchingClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/__init__.py new file mode 100644 index 000000000000..d164ec7e9a55 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/__init__.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models import AcceptedAge +from ._models import AcceptedAgeRange +from ._models import AreaGeometry +from ._models import AreaProperties +from ._models import ClinicalCodedElement +from ._models import ClinicalNoteEvidence +from ._models import ClinicalTrialDemographics +from ._models import ClinicalTrialDetails +from ._models import ClinicalTrialMetadata +from ._models import ClinicalTrialRegistryFilter +from ._models import ClinicalTrialResearchFacility +from ._models import ClinicalTrials +from ._models import ContactDetails +from ._models import DocumentContent +from ._models import Error +from ._models import ExtendedClinicalCodedElement +from ._models import GeographicArea +from ._models import GeographicLocation +from ._models import InnerError +from ._models import PatientDocument +from ._models import PatientInfo +from ._models import PatientRecord +from ._models import TrialMatcherData +from ._models import TrialMatcherInference +from ._models import TrialMatcherInferenceEvidence +from ._models import TrialMatcherModelConfiguration +from ._models import TrialMatcherPatientResult +from ._models import TrialMatcherResult +from ._models import TrialMatcherResults + +from ._enums import AgeUnit +from ._enums import ClinicalDocumentType +from ._enums import ClinicalTrialAcceptedSex +from ._enums import ClinicalTrialPhase +from ._enums import ClinicalTrialPurpose +from ._enums import ClinicalTrialRecruitmentStatus +from ._enums import ClinicalTrialSource +from ._enums import ClinicalTrialStudyType +from ._enums import DocumentContentSourceType +from ._enums import DocumentType +from ._enums import GeoJsonGeometryType +from ._enums import GeoJsonPropertiesSubType +from ._enums import GeoJsonType +from ._enums import JobStatus +from ._enums import PatientInfoSex +from ._enums import RepeatabilityResultType +from ._enums import TrialMatcherInferenceType +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AcceptedAge", + "AcceptedAgeRange", + "AreaGeometry", + "AreaProperties", + "ClinicalCodedElement", + "ClinicalNoteEvidence", + "ClinicalTrialDemographics", + "ClinicalTrialDetails", + "ClinicalTrialMetadata", + "ClinicalTrialRegistryFilter", + "ClinicalTrialResearchFacility", + "ClinicalTrials", + "ContactDetails", + "DocumentContent", + "Error", + "ExtendedClinicalCodedElement", + "GeographicArea", + "GeographicLocation", + "InnerError", + "PatientDocument", + "PatientInfo", + "PatientRecord", + "TrialMatcherData", + "TrialMatcherInference", + "TrialMatcherInferenceEvidence", + "TrialMatcherModelConfiguration", + "TrialMatcherPatientResult", + "TrialMatcherResult", + "TrialMatcherResults", + "AgeUnit", + "ClinicalDocumentType", + "ClinicalTrialAcceptedSex", + "ClinicalTrialPhase", + "ClinicalTrialPurpose", + "ClinicalTrialRecruitmentStatus", + "ClinicalTrialSource", + "ClinicalTrialStudyType", + "DocumentContentSourceType", + "DocumentType", + "GeoJsonGeometryType", + "GeoJsonPropertiesSubType", + "GeoJsonType", + "JobStatus", + "PatientInfoSex", + "RepeatabilityResultType", + "TrialMatcherInferenceType", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_enums.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_enums.py new file mode 100644 index 000000000000..aaf819fec7af --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_enums.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AgeUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible units for a person's age.""" + + YEARS = "years" + MONTHS = "months" + DAYS = "days" + + +class ClinicalDocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the clinical document.""" + + CONSULTATION = "consultation" + DISCHARGE_SUMMARY = "dischargeSummary" + HISTORY_AND_PHYSICAL = "historyAndPhysical" + PROCEDURE = "procedure" + PROGRESS = "progress" + IMAGING = "imaging" + LABORATORY = "laboratory" + PATHOLOGY = "pathology" + + +class ClinicalTrialAcceptedSex(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible values for the Sex eligibility criterion as accepted by clinical trials, which + indicates the sex of people who may participate in a clinical study. + """ + + ALL = "all" + FEMALE = "female" + MALE = "male" + + +class ClinicalTrialPhase(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible phases of a clinical trial.""" + + NOT_APPLICABLE = "notApplicable" + EARLY_PHASE1 = "earlyPhase1" + PHASE1 = "phase1" + PHASE2 = "phase2" + PHASE3 = "phase3" + PHASE4 = "phase4" + + +class ClinicalTrialPurpose(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible purposes of a clinical trial.""" + + NOT_APPLICABLE = "notApplicable" + SCREENING = "screening" + DIAGNOSTIC = "diagnostic" + PREVENTION = "prevention" + HEALTH_SERVICES_RESEARCH = "healthServicesResearch" + TREATMENT = "treatment" + DEVICE_FEASIBILITY = "deviceFeasibility" + SUPPORTIVE_CARE = "supportiveCare" + BASIC_SCIENCE = "basicScience" + OTHER = "other" + + +class ClinicalTrialRecruitmentStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible recruitment status of a clinical trial.""" + + UNKNOWN_STATUS = "unknownStatus" + NOT_YET_RECRUITING = "notYetRecruiting" + RECRUITING = "recruiting" + ENROLLING_BY_INVITATION = "enrollingByInvitation" + + +class ClinicalTrialSource(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible sources of a clinical trial.""" + + CUSTOM = "custom" + CLINICALTRIALS_GOV = "clinicaltrials.gov" + + +class ClinicalTrialStudyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible study types of a clinical trial.""" + + INTERVENTIONAL = "interventional" + OBSERVATIONAL = "observational" + EXPANDED_ACCESS = "expandedAccess" + PATIENT_REGISTRIES = "patientRegistries" + + +class DocumentContentSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the content's source. + In case the source type is 'inline', the content is given as a string (for instance, text). + In case the source type is 'reference', the content is given as a URI. + """ + + INLINE = "inline" + REFERENCE = "reference" + + +class DocumentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON + document). + """ + + NOTE = "note" + FHIR_BUNDLE = "fhirBundle" + DICOM = "dicom" + GENOMIC_SEQUENCING = "genomicSequencing" + + +class GeoJsonGeometryType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """``GeoJSON`` geometry type.""" + + POINT = "Point" + + +class GeoJsonPropertiesSubType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """``GeoJSON`` object sub-type.""" + + CIRCLE = "Circle" + + +class GeoJsonType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """``GeoJSON`` type.""" + + FEATURE = "Feature" + + +class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the processing job.""" + + NOT_STARTED = "notStarted" + RUNNING = "running" + SUCCEEDED = "succeeded" + FAILED = "failed" + PARTIALLY_COMPLETED = "partiallyCompleted" + + +class PatientInfoSex(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The patient's sex.""" + + FEMALE = "female" + MALE = "male" + UNSPECIFIED = "unspecified" + + +class RepeatabilityResultType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of RepeatabilityResultType.""" + + ACCEPTED = "accepted" + REJECTED = "rejected" + + +class TrialMatcherInferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the Trial Matcher inference.""" + + TRIAL_ELIGIBILITY = "trialEligibility" diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py new file mode 100644 index 000000000000..7bcd19b856f9 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py @@ -0,0 +1,1431 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, List, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .. import _model_base +from .._model_base import rest_field + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models + + +class AcceptedAge(_model_base.Model): + """A person's age, given as a number (value) and a unit (e.g. years, months). + + All required parameters must be populated in order to send to Azure. + + :ivar unit: Possible units for a person's age. Required. Known values are: "years", "months", + and "days". + :vartype unit: str or ~azure.healthinsights.clinicalmatching.models.AgeUnit + :ivar value: The number of years/months/days that represents the person's age. Required. + :vartype value: float + """ + + unit: Union[str, "_models.AgeUnit"] = rest_field() + """Possible units for a person's age. Required. Known values are: \"years\", \"months\", and \"days\".""" + value: float = rest_field() + """The number of years/months/days that represents the person's age. Required. """ + + @overload + def __init__( + self, + *, + unit: Union[str, "_models.AgeUnit"], + value: float, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class AcceptedAgeRange(_model_base.Model): + """A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a + maximum age. + + :ivar minimum_age: A person's age, given as a number (value) and a unit (e.g. years, months). + :vartype minimum_age: ~azure.healthinsights.clinicalmatching.models.AcceptedAge + :ivar maximum_age: A person's age, given as a number (value) and a unit (e.g. years, months). + :vartype maximum_age: ~azure.healthinsights.clinicalmatching.models.AcceptedAge + """ + + minimum_age: Optional["_models.AcceptedAge"] = rest_field(name="minimumAge") + """A person's age, given as a number (value) and a unit (e.g. years, months). """ + maximum_age: Optional["_models.AcceptedAge"] = rest_field(name="maximumAge") + """A person's age, given as a number (value) and a unit (e.g. years, months). """ + + @overload + def __init__( + self, + *, + minimum_age: Optional["_models.AcceptedAge"] = None, + maximum_age: Optional["_models.AcceptedAge"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class AreaGeometry(_model_base.Model): + """``GeoJSON`` geometry, representing the area circle's center. + + All required parameters must be populated in order to send to Azure. + + :ivar type: ``GeoJSON`` geometry type. Required. "Point" + :vartype type: str or ~azure.healthinsights.clinicalmatching.models.GeoJsonGeometryType + :ivar coordinates: Coordinates of the area circle's center, represented according to the + ``GeoJSON`` standard. + This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). + Required. + :vartype coordinates: list[float] + """ + + type: Union[str, "_models.GeoJsonGeometryType"] = rest_field() + """``GeoJSON`` geometry type. Required. \"Point\"""" + coordinates: List[float] = rest_field() + """Coordinates of the area circle's center, represented according to the ``GeoJSON`` standard. +This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). Required. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.GeoJsonGeometryType"], # pylint: disable=redefined-builtin + coordinates: List[float], + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class AreaProperties(_model_base.Model): + """``GeoJSON`` object properties. + + All required parameters must be populated in order to send to Azure. + + :ivar sub_type: ``GeoJSON`` object sub-type. Required. "Circle" + :vartype sub_type: str or + ~azure.healthinsights.clinicalmatching.models.GeoJsonPropertiesSubType + :ivar radius: The radius of the area's circle, in meters. Required. + :vartype radius: float + """ + + sub_type: Union[str, "_models.GeoJsonPropertiesSubType"] = rest_field(name="subType") + """``GeoJSON`` object sub-type. Required. \"Circle\"""" + radius: float = rest_field() + """The radius of the area's circle, in meters. Required. """ + + @overload + def __init__( + self, + *, + sub_type: Union[str, "_models.GeoJsonPropertiesSubType"], + radius: float, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalCodedElement(_model_base.Model): + """A piece of clinical information, expressed as a code in a clinical coding system. + + All required parameters must be populated in order to send to Azure. + + :ivar system: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. + :vartype system: str + :ivar code: The code within the given clinical coding system. Required. + :vartype code: str + :ivar name: The name of this coded concept in the coding system. + :vartype name: str + :ivar value: A value associated with the code within the given clinical coding system. + :vartype value: str + """ + + system: str = rest_field() + """The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. """ + code: str = rest_field() + """The code within the given clinical coding system. Required. """ + name: Optional[str] = rest_field() + """The name of this coded concept in the coding system. """ + value: Optional[str] = rest_field() + """A value associated with the code within the given clinical coding system. """ + + @overload + def __init__( + self, + *, + system: str, + code: str, + name: Optional[str] = None, + value: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalNoteEvidence(_model_base.Model): + """A piece of evidence from a clinical note (text document). + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identifier of the document containing the evidence. Required. + :vartype id: str + :ivar text: The actual text span which is evidence for the inference. + :vartype text: str + :ivar offset: The start index of the evidence text span in the document (0 based). Required. + :vartype offset: int + :ivar length: The length of the evidence text span. Required. + :vartype length: int + """ + + id: str = rest_field() + """The identifier of the document containing the evidence. Required. """ + text: Optional[str] = rest_field() + """The actual text span which is evidence for the inference. """ + offset: int = rest_field() + """The start index of the evidence text span in the document (0 based). Required. """ + length: int = rest_field() + """The length of the evidence text span. Required. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + offset: int, + length: int, + text: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrialDemographics(_model_base.Model): + """Demographic criteria for a clinical trial. + + :ivar accepted_sex: Indication of the sex of people who may participate in the clinical trial. + Known values are: "all", "female", and "male". + :vartype accepted_sex: str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialAcceptedSex + :ivar accepted_age_range: A definition of the range of ages accepted by a clinical trial. + Contains a minimum age and/or a maximum age. + :vartype accepted_age_range: ~azure.healthinsights.clinicalmatching.models.AcceptedAgeRange + """ + + accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = rest_field(name="acceptedSex") + """Indication of the sex of people who may participate in the clinical trial. Known values are: \"all\", + \"female\", and \"male\". """ + accepted_age_range: Optional["_models.AcceptedAgeRange"] = rest_field(name="acceptedAgeRange") + """A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. """ + + @overload + def __init__( + self, + *, + accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = None, + accepted_age_range: Optional["_models.AcceptedAgeRange"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrialDetails(_model_base.Model): + """A description of a clinical trial. + + All required parameters must be populated in order to send to Azure. + + :ivar id: A given identifier for the clinical trial. Has to be unique within a list of clinical + trials. Required. + :vartype id: str + :ivar eligibility_criteria_text: The eligibility criteria of the clinical trial (inclusion and + exclusion), given as text. + :vartype eligibility_criteria_text: str + :ivar demographics: Demographic criteria for a clinical trial. + :vartype demographics: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialDemographics + :ivar metadata: Trial data which is of interest to the potential participant. Required. + :vartype metadata: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialMetadata + """ + + id: str = rest_field() + """A given identifier for the clinical trial. Has to be unique within a list of clinical trials. Required. """ + eligibility_criteria_text: Optional[str] = rest_field(name="eligibilityCriteriaText") + """The eligibility criteria of the clinical trial (inclusion and exclusion), given as text. """ + demographics: Optional["_models.ClinicalTrialDemographics"] = rest_field() + """Demographic criteria for a clinical trial. """ + metadata: "_models.ClinicalTrialMetadata" = rest_field() + """Trial data which is of interest to the potential participant. Required. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + metadata: "_models.ClinicalTrialMetadata", + eligibility_criteria_text: Optional[str] = None, + demographics: Optional["_models.ClinicalTrialDemographics"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrialMetadata(_model_base.Model): + """Trial data which is of interest to the potential participant. + + All required parameters must be populated in order to send to Azure. + + :ivar phases: Phases which are relevant for the clinical trial. + Each clinical trial can be in a certain phase or in multiple phases. + :vartype phases: list[str or ~azure.healthinsights.clinicalmatching.models.ClinicalTrialPhase] + :ivar study_type: Possible study types of a clinical trial. Known values are: "interventional", + "observational", "expandedAccess", and "patientRegistries". + :vartype study_type: str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialStudyType + :ivar recruitment_status: Possible recruitment status of a clinical trial. Known values are: + "unknownStatus", "notYetRecruiting", "recruiting", and "enrollingByInvitation". + :vartype recruitment_status: str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialRecruitmentStatus + :ivar conditions: Medical conditions and their synonyms which are relevant for the clinical + trial, given as strings. Required. + :vartype conditions: list[str] + :ivar sponsors: Sponsors/collaborators involved with the trial. + :vartype sponsors: list[str] + :ivar contacts: Contact details of the trial administrators, for patients that want to + participate in the trial. + :vartype contacts: list[~azure.healthinsights.clinicalmatching.models.ContactDetails] + :ivar facilities: Research facilities where the clinical trial is conducted. + :vartype facilities: + list[~azure.healthinsights.clinicalmatching.models.ClinicalTrialResearchFacility] + """ + + phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = rest_field() + """Phases which are relevant for the clinical trial. +Each clinical trial can be in a certain phase or in multiple phases. """ + study_type: Optional[Union[str, "_models.ClinicalTrialStudyType"]] = rest_field(name="studyType") + """Possible study types of a clinical trial. Known values are: \"interventional\", \"observational\", + \"expandedAccess\", and \"patientRegistries\". """ + recruitment_status: Optional[Union[str, "_models.ClinicalTrialRecruitmentStatus"]] = rest_field( + name="recruitmentStatus" + ) + """Possible recruitment status of a clinical trial. Known values are: \"unknownStatus\", \"notYetRecruiting\", + \"recruiting\", and \"enrollingByInvitation\". """ + conditions: List[str] = rest_field() + """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. Required. """ + sponsors: Optional[List[str]] = rest_field() + """Sponsors/collaborators involved with the trial. """ + contacts: Optional[List["_models.ContactDetails"]] = rest_field() + """Contact details of the trial administrators, for patients that want to participate in the trial. """ + facilities: Optional[List["_models.ClinicalTrialResearchFacility"]] = rest_field() + """Research facilities where the clinical trial is conducted. """ + + @overload + def __init__( + self, + *, + conditions: List[str], + phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = None, + study_type: Optional[Union[str, "_models.ClinicalTrialStudyType"]] = None, + recruitment_status: Optional[Union[str, "_models.ClinicalTrialRecruitmentStatus"]] = None, + sponsors: Optional[List[str]] = None, + contacts: Optional[List["_models.ContactDetails"]] = None, + facilities: Optional[List["_models.ClinicalTrialResearchFacility"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrialRegistryFilter(_model_base.Model): # pylint: disable=too-many-instance-attributes + """A filter defining a subset of clinical trials from a given clinical trial registry (e.g. + clinicaltrials.gov). + + :ivar conditions: Trials with any of the given medical conditions will be included in the + selection (provided that other limitations are satisfied). + Leaving this list empty will not limit the medical conditions. + :vartype conditions: list[str] + :ivar study_types: Trials with any of the given study types will be included in the selection + (provided that other limitations are satisfied). + Leaving this list empty will not limit the study types. + :vartype study_types: list[str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialStudyType] + :ivar recruitment_statuses: Trials with any of the given recruitment statuses will be included + in the selection (provided that other limitations are satisfied). + Leaving this list empty will not limit the recruitment statuses. + :vartype recruitment_statuses: list[str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialRecruitmentStatus] + :ivar sponsors: Trials with any of the given sponsors will be included in the selection + (provided that other limitations are satisfied). + Leaving this list empty will not limit the sponsors. + :vartype sponsors: list[str] + :ivar phases: Trials with any of the given phases will be included in the selection (provided + that other limitations are satisfied). + Leaving this list empty will not limit the phases. + :vartype phases: list[str or ~azure.healthinsights.clinicalmatching.models.ClinicalTrialPhase] + :ivar purposes: Trials with any of the given purposes will be included in the selection + (provided that other limitations are satisfied). + Leaving this list empty will not limit the purposes. + :vartype purposes: list[str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialPurpose] + :ivar ids: Trials with any of the given identifiers will be included in the selection (provided + that other limitations are satisfied). + Leaving this list empty will not limit the trial identifiers. + :vartype ids: list[str] + :ivar sources: Trials with any of the given sources will be included in the selection (provided + that other limitations are satisfied). + Leaving this list empty will not limit the sources. + :vartype sources: list[str or + ~azure.healthinsights.clinicalmatching.models.ClinicalTrialSource] + :ivar facility_names: Trials with any of the given facility names will be included in the + selection (provided that other limitations are satisfied). + Leaving this list empty will not limit the trial facility names. + :vartype facility_names: list[str] + :ivar facility_locations: Trials with any of the given facility locations will be included in + the selection (provided that other limitations are satisfied). + Leaving this list empty will not limit the trial facility locations. + :vartype facility_locations: + list[~azure.healthinsights.clinicalmatching.models.GeographicLocation] + :ivar facility_areas: Trials with any of the given facility area boundaries will be included in + the selection (provided that other limitations are satisfied). + Leaving this list empty will not limit the trial facility area boundaries. + :vartype facility_areas: list[~azure.healthinsights.clinicalmatching.models.GeographicArea] + """ + + conditions: Optional[List[str]] = rest_field() + """Trials with any of the given medical conditions will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the medical conditions. """ + study_types: Optional[List[Union[str, "_models.ClinicalTrialStudyType"]]] = rest_field(name="studyTypes") + """Trials with any of the given study types will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the study types. """ + recruitment_statuses: Optional[List[Union[str, "_models.ClinicalTrialRecruitmentStatus"]]] = rest_field( + name="recruitmentStatuses" + ) + """Trials with any of the given recruitment statuses will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the recruitment statuses. """ + sponsors: Optional[List[str]] = rest_field() + """Trials with any of the given sponsors will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the sponsors. """ + phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = rest_field() + """Trials with any of the given phases will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the phases. """ + purposes: Optional[List[Union[str, "_models.ClinicalTrialPurpose"]]] = rest_field() + """Trials with any of the given purposes will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the purposes. """ + ids: Optional[List[str]] = rest_field() + """Trials with any of the given identifiers will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the trial identifiers. """ + sources: Optional[List[Union[str, "_models.ClinicalTrialSource"]]] = rest_field() + """Trials with any of the given sources will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the sources. """ + facility_names: Optional[List[str]] = rest_field(name="facilityNames") + """Trials with any of the given facility names will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the trial facility names. """ + facility_locations: Optional[List["_models.GeographicLocation"]] = rest_field(name="facilityLocations") + """Trials with any of the given facility locations will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the trial facility locations. """ + facility_areas: Optional[List["_models.GeographicArea"]] = rest_field(name="facilityAreas") + """Trials with any of the given facility area boundaries will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the trial facility area boundaries. """ + + @overload + def __init__( + self, + *, + conditions: Optional[List[str]] = None, + study_types: Optional[List[Union[str, "_models.ClinicalTrialStudyType"]]] = None, + recruitment_statuses: Optional[List[Union[str, "_models.ClinicalTrialRecruitmentStatus"]]] = None, + sponsors: Optional[List[str]] = None, + phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = None, + purposes: Optional[List[Union[str, "_models.ClinicalTrialPurpose"]]] = None, + ids: Optional[List[str]] = None, + sources: Optional[List[Union[str, "_models.ClinicalTrialSource"]]] = None, + facility_names: Optional[List[str]] = None, + facility_locations: Optional[List["_models.GeographicLocation"]] = None, + facility_areas: Optional[List["_models.GeographicArea"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrialResearchFacility(_model_base.Model): + """Details of a research facility where a clinical trial is conducted. + + All required parameters must be populated in order to send to Azure. + + :ivar name: The facility's name. Required. + :vartype name: str + :ivar city: City name. + :vartype city: str + :ivar state: State name. + :vartype state: str + :ivar country: Country name. Required. + :vartype country: str + """ + + name: str = rest_field() + """The facility's name. Required. """ + city: Optional[str] = rest_field() + """City name. """ + state: Optional[str] = rest_field() + """State name. """ + country: str = rest_field() + """Country name. Required. """ + + @overload + def __init__( + self, + *, + name: str, + country: str, + city: Optional[str] = None, + state: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ClinicalTrials(_model_base.Model): + """The clinical trials that the patient(s) should be matched to. + The trial selection can be given as a list of custom clinical trials and/or a list of filters + to known clinical trial registries. + In case both are given, the resulting trial set is a union of the two sets. + + :ivar custom_trials: A list of clinical trials. + :vartype custom_trials: + list[~azure.healthinsights.clinicalmatching.models.ClinicalTrialDetails] + :ivar registry_filters: A list of filters, each one creating a selection of trials from a given + clinical trial registry. + :vartype registry_filters: + list[~azure.healthinsights.clinicalmatching.models.ClinicalTrialRegistryFilter] + """ + + custom_trials: Optional[List["_models.ClinicalTrialDetails"]] = rest_field(name="customTrials") + """A list of clinical trials. """ + registry_filters: Optional[List["_models.ClinicalTrialRegistryFilter"]] = rest_field(name="registryFilters") + """A list of filters, each one creating a selection of trials from a given +clinical trial registry. """ + + @overload + def __init__( + self, + *, + custom_trials: Optional[List["_models.ClinicalTrialDetails"]] = None, + registry_filters: Optional[List["_models.ClinicalTrialRegistryFilter"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ContactDetails(_model_base.Model): + """A person's contact details. + + :ivar name: The person's name. + :vartype name: str + :ivar email: The person's email. + :vartype email: str + :ivar phone: A person's phone number. + :vartype phone: str + """ + + name: Optional[str] = rest_field() + """The person's name. """ + email: Optional[str] = rest_field() + """The person's email. """ + phone: Optional[str] = rest_field() + """A person's phone number. """ + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + email: Optional[str] = None, + phone: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class DocumentContent(_model_base.Model): + """The content of the patient document. + + All required parameters must be populated in order to send to Azure. + + :ivar source_type: The type of the content's source. + In case the source type is 'inline', the content is given as a string (for instance, text). + In case the source type is 'reference', the content is given as a URI. Required. Known values + are: "inline" and "reference". + :vartype source_type: str or + ~azure.healthinsights.clinicalmatching.models.DocumentContentSourceType + :ivar value: The content of the document, given either inline (as a string) or as a reference + (URI). Required. + :vartype value: str + """ + + source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") + """The type of the content's source. In case the source type is 'inline', the content is given as a string (for + instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values + are: \"inline\" and \"reference\". """ + value: str = rest_field() + """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ + + @overload + def __init__( + self, + *, + source_type: Union[str, "_models.DocumentContentSourceType"], + value: str, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class Error(_model_base.Model): + """The error object. + + All required parameters must be populated in order to send to Azure. + + :ivar code: One of a server-defined set of error codes. Required. + :vartype code: str + :ivar message: A human-readable representation of the error. Required. + :vartype message: str + :ivar target: The target of the error. + :vartype target: str + :ivar details: An array of details about specific errors that led to this reported error. + Required. + :vartype details: list[~azure.healthinsights.clinicalmatching.models.Error] + :ivar innererror: An object containing more specific information than the current object about + the error. + :vartype innererror: ~azure.healthinsights.clinicalmatching.models.InnerError + """ + + code: str = rest_field() + """One of a server-defined set of error codes. Required. """ + message: str = rest_field() + """A human-readable representation of the error. Required. """ + target: Optional[str] = rest_field() + """The target of the error. """ + details: List["_models.Error"] = rest_field() + """An array of details about specific errors that led to this reported error. Required. """ + innererror: Optional["_models.InnerError"] = rest_field() + """An object containing more specific information than the current object about the error. """ + + @overload + def __init__( + self, + *, + code: str, + message: str, + details: List["_models.Error"], + target: Optional[str] = None, + innererror: Optional["_models.InnerError"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class ExtendedClinicalCodedElement(_model_base.Model): + """A piece of clinical information, expressed as a code in a clinical coding system, extended by + semantic information. + + All required parameters must be populated in order to send to Azure. + + :ivar system: The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. + :vartype system: str + :ivar code: The code within the given clinical coding system. Required. + :vartype code: str + :ivar name: The name of this coded concept in the coding system. + :vartype name: str + :ivar value: A value associated with the code within the given clinical coding system. + :vartype value: str + :ivar semantic_type: The `UMLS semantic type + `_ associated with the + coded concept. + :vartype semantic_type: str + :ivar category: The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, + Medication, Examination. + :vartype category: str + """ + + system: str = rest_field() + """The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. Required. """ + code: str = rest_field() + """The code within the given clinical coding system. Required. """ + name: Optional[str] = rest_field() + """The name of this coded concept in the coding system. """ + value: Optional[str] = rest_field() + """A value associated with the code within the given clinical coding system. """ + semantic_type: Optional[str] = rest_field(name="semanticType") + """The `UMLS semantic type `_ associated + with the coded concept. """ + category: Optional[str] = rest_field() + """The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. """ + + @overload + def __init__( + self, + *, + system: str, + code: str, + name: Optional[str] = None, + value: Optional[str] = None, + semantic_type: Optional[str] = None, + category: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class GeographicArea(_model_base.Model): + """A geographic area, expressed as a ``Circle`` geometry represented using a ``GeoJSON Feature`` + (see `GeoJSON spec `_ ). + + All required parameters must be populated in order to send to Azure. + + :ivar type: ``GeoJSON`` type. Required. "Feature" + :vartype type: str or ~azure.healthinsights.clinicalmatching.models.GeoJsonType + :ivar geometry: ``GeoJSON`` geometry, representing the area circle's center. Required. + :vartype geometry: ~azure.healthinsights.clinicalmatching.models.AreaGeometry + :ivar properties: ``GeoJSON`` object properties. Required. + :vartype properties: ~azure.healthinsights.clinicalmatching.models.AreaProperties + """ + + type: Union[str, "_models.GeoJsonType"] = rest_field() # pylint: disable=redefined-builtin + """``GeoJSON`` type. Required. \"Feature\"""" + geometry: "_models.AreaGeometry" = rest_field() + """``GeoJSON`` geometry, representing the area circle's center. Required. """ + properties: "_models.AreaProperties" = rest_field() + """``GeoJSON`` object properties. Required. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.GeoJsonType"], # pylint: disable=redefined-builtin + geometry: "_models.AreaGeometry", + properties: "_models.AreaProperties", + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class GeographicLocation(_model_base.Model): + """A location given as a combination of city/state/country. It could specify a + city, a state or a country.:code:`
`In case a city is specified, either state + + country or country (for countries where there are no states) should be added. + In case a state is specified (without a city), country should be added. + + All required parameters must be populated in order to send to Azure. + + :ivar city: City name. + :vartype city: str + :ivar state: State name. + :vartype state: str + :ivar country: Country name. Required. + :vartype country: str + """ + + city: Optional[str] = rest_field() + """City name. """ + state: Optional[str] = rest_field() + """State name. """ + country: str = rest_field() + """Country name. Required. """ + + @overload + def __init__( + self, + *, + country: str, + city: Optional[str] = None, + state: Optional[str] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class InnerError(_model_base.Model): + """An object containing more specific information about the error. As per Microsoft One API + guidelines - + https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + + All required parameters must be populated in order to send to Azure. + + :ivar code: One of a server-defined set of error codes. Required. + :vartype code: str + :ivar innererror: Inner error. + :vartype innererror: ~azure.healthinsights.clinicalmatching.models.InnerError + """ + + code: str = rest_field() + """One of a server-defined set of error codes. Required. """ + innererror: Optional["_models.InnerError"] = rest_field() + """Inner error. """ + + @overload + def __init__( + self, + *, + code: str, + innererror: Optional["_models.InnerError"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientDocument(_model_base.Model): + """A clinical document related to a patient. Document here is in the wide sense - not just a text + document (note). + + All required parameters must be populated in order to send to Azure. + + :ivar type: The type of the patient document, such as 'note' (text document) or 'fhirBundle' + (FHIR JSON document). Required. Known values are: "note", "fhirBundle", "dicom", and + "genomicSequencing". + :vartype type: str or ~azure.healthinsights.clinicalmatching.models.DocumentType + :ivar clinical_type: The type of the clinical document. Known values are: "consultation", + "dischargeSummary", "historyAndPhysical", "procedure", "progress", "imaging", "laboratory", and + "pathology". + :vartype clinical_type: str or + ~azure.healthinsights.clinicalmatching.models.ClinicalDocumentType + :ivar id: A given identifier for the document. Has to be unique across all documents for a + single patient. Required. + :vartype id: str + :ivar language: A 2 letter ISO 639-1 representation of the language of the document. + :vartype language: str + :ivar created_date_time: The date and time when the document was created. + :vartype created_date_time: ~datetime.datetime + :ivar content: The content of the patient document. Required. + :vartype content: ~azure.healthinsights.clinicalmatching.models.DocumentContent + """ + + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ + clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", + \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ + id: str = rest_field() + """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ + language: Optional[str] = rest_field() + """A 2 letter ISO 639-1 representation of the language of the document. """ + created_date_time: Optional[datetime.datetime] = rest_field(name="createdDateTime") + """The date and time when the document was created. """ + content: "_models.DocumentContent" = rest_field() + """The content of the patient document. Required. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + id: str, # pylint: disable=redefined-builtin + content: "_models.DocumentContent", + clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, + language: Optional[str] = None, + created_date_time: Optional[datetime.datetime] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientInfo(_model_base.Model): + """Patient structured information, including demographics and known structured clinical + information. + + :ivar sex: The patient's sex. Known values are: "female", "male", and "unspecified". + :vartype sex: str or ~azure.healthinsights.clinicalmatching.models.PatientInfoSex + :ivar birth_date: The patient's date of birth. + :vartype birth_date: ~datetime.date + :ivar clinical_info: Known clinical information for the patient, structured. + :vartype clinical_info: + list[~azure.healthinsights.clinicalmatching.models.ClinicalCodedElement] + """ + + sex: Optional[Union[str, "_models.PatientInfoSex"]] = rest_field() + """The patient's sex. Known values are: \"female\", \"male\", and \"unspecified\".""" + birth_date: Optional[datetime.date] = rest_field(name="birthDate") + """The patient's date of birth. """ + clinical_info: Optional[List["_models.ClinicalCodedElement"]] = rest_field(name="clinicalInfo") + """Known clinical information for the patient, structured. """ + + @overload + def __init__( + self, + *, + sex: Optional[Union[str, "_models.PatientInfoSex"]] = None, + birth_date: Optional[datetime.date] = None, + clinical_info: Optional[List["_models.ClinicalCodedElement"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class PatientRecord(_model_base.Model): + """A patient record, including their clinical information and data. + + All required parameters must be populated in order to send to Azure. + + :ivar id: A given identifier for the patient. Has to be unique across all patients in a single + request. Required. + :vartype id: str + :ivar info: Patient structured information, including demographics and known structured + clinical information. + :vartype info: ~azure.healthinsights.clinicalmatching.models.PatientInfo + :ivar data: Patient unstructured clinical data, given as documents. + :vartype data: list[~azure.healthinsights.clinicalmatching.models.PatientDocument] + """ + + id: str = rest_field() + """A given identifier for the patient. Has to be unique across all patients in a single request. Required. """ + info: Optional["_models.PatientInfo"] = rest_field() + """Patient structured information, including demographics and known structured clinical information. """ + data: Optional[List["_models.PatientDocument"]] = rest_field() + """Patient unstructured clinical data, given as documents. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + info: Optional["_models.PatientInfo"] = None, + data: Optional[List["_models.PatientDocument"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherData(_model_base.Model): + """TrialMatcherData. + + All required parameters must be populated in order to send to Azure. + + :ivar patients: The list of patients, including their clinical information and data. Required. + :vartype patients: list[~azure.healthinsights.clinicalmatching.models.PatientRecord] + :ivar configuration: Configuration affecting the Trial Matcher model's inference. + :vartype configuration: + ~azure.healthinsights.clinicalmatching.models.TrialMatcherModelConfiguration + """ + + patients: List["_models.PatientRecord"] = rest_field() + """The list of patients, including their clinical information and data. Required. """ + configuration: Optional["_models.TrialMatcherModelConfiguration"] = rest_field() + """Configuration affecting the Trial Matcher model's inference. """ + + @overload + def __init__( + self, + *, + patients: List["_models.PatientRecord"], + configuration: Optional["_models.TrialMatcherModelConfiguration"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherInference(_model_base.Model): + """An inference made by the Trial Matcher model regarding a patient. + + All required parameters must be populated in order to send to Azure. + + :ivar type: The type of the Trial Matcher inference. Required. "trialEligibility" + :vartype type: str or ~azure.healthinsights.clinicalmatching.models.TrialMatcherInferenceType + :ivar value: The value of the inference, as relevant for the given inference type. Required. + :vartype value: str + :ivar description: The description corresponding to the inference value. + :vartype description: str + :ivar confidence_score: Confidence score for this inference. + :vartype confidence_score: float + :ivar evidence: The evidence corresponding to the inference value. + :vartype evidence: + list[~azure.healthinsights.clinicalmatching.models.TrialMatcherInferenceEvidence] + :ivar id: The identifier of the clinical trial. + :vartype id: str + :ivar source: Possible sources of a clinical trial. Known values are: "custom" and + "clinicaltrials.gov". + :vartype source: str or ~azure.healthinsights.clinicalmatching.models.ClinicalTrialSource + :ivar metadata: Trial data which is of interest to the potential participant. + :vartype metadata: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialMetadata + """ + + type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() # pylint: disable=redefined-builtin + """The type of the Trial Matcher inference. Required. \"trialEligibility\"""" + value: str = rest_field() + """The value of the inference, as relevant for the given inference type. Required. """ + description: Optional[str] = rest_field() + """The description corresponding to the inference value. """ + confidence_score: Optional[float] = rest_field(name="confidenceScore") + """Confidence score for this inference. """ + evidence: Optional[List["_models.TrialMatcherInferenceEvidence"]] = rest_field() + """The evidence corresponding to the inference value. """ + id: Optional[str] = rest_field() + """The identifier of the clinical trial. """ + source: Optional[Union[str, "_models.ClinicalTrialSource"]] = rest_field() + """Possible sources of a clinical trial. Known values are: \"custom\" and \"clinicaltrials.gov\".""" + metadata: Optional["_models.ClinicalTrialMetadata"] = rest_field() + """Trial data which is of interest to the potential participant. """ + + @overload + def __init__( + self, + *, + type: Union[str, "_models.TrialMatcherInferenceType"], # pylint: disable=redefined-builtin + value: str, + description: Optional[str] = None, + confidence_score: Optional[float] = None, + evidence: Optional[List["_models.TrialMatcherInferenceEvidence"]] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + source: Optional[Union[str, "_models.ClinicalTrialSource"]] = None, + metadata: Optional["_models.ClinicalTrialMetadata"] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherInferenceEvidence(_model_base.Model): + """A piece of evidence corresponding to a Trial Matcher inference. + + :ivar eligibility_criteria_evidence: A piece of evidence from the eligibility criteria text of + a clinical trial. + :vartype eligibility_criteria_evidence: str + :ivar patient_data_evidence: A piece of evidence from a clinical note (text document). + :vartype patient_data_evidence: + ~azure.healthinsights.clinicalmatching.models.ClinicalNoteEvidence + :ivar patient_info_evidence: A piece of clinical information, expressed as a code in a clinical + coding + system. + :vartype patient_info_evidence: + ~azure.healthinsights.clinicalmatching.models.ClinicalCodedElement + :ivar importance: A value indicating how important this piece of evidence is for the inference. + :vartype importance: float + """ + + eligibility_criteria_evidence: Optional[str] = rest_field(name="eligibilityCriteriaEvidence") + """A piece of evidence from the eligibility criteria text of a clinical trial. """ + patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = rest_field(name="patientDataEvidence") + """A piece of evidence from a clinical note (text document). """ + patient_info_evidence: Optional["_models.ClinicalCodedElement"] = rest_field(name="patientInfoEvidence") + """A piece of clinical information, expressed as a code in a clinical coding +system. """ + importance: Optional[float] = rest_field() + """A value indicating how important this piece of evidence is for the inference. """ + + @overload + def __init__( + self, + *, + eligibility_criteria_evidence: Optional[str] = None, + patient_data_evidence: Optional["_models.ClinicalNoteEvidence"] = None, + patient_info_evidence: Optional["_models.ClinicalCodedElement"] = None, + importance: Optional[float] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherModelConfiguration(_model_base.Model): + """Configuration affecting the Trial Matcher model's inference. + + All required parameters must be populated in order to send to Azure. + + :ivar verbose: An indication whether the model should produce verbose output. + :vartype verbose: bool + :ivar include_evidence: An indication whether the model's output should include evidence for + the inferences. + :vartype include_evidence: bool + :ivar clinical_trials: The clinical trials that the patient(s) should be matched to. :code:`
`The trial + selection can be given as a list of custom clinical trials and/or a list of + filters to known clinical trial registries. In case both are given, the + resulting trial set is a union of the two sets. Required. + :vartype clinical_trials: ~azure.healthinsights.clinicalmatching.models.ClinicalTrials + """ + + verbose: bool = rest_field(default=False) + """An indication whether the model should produce verbose output. """ + include_evidence: bool = rest_field(name="includeEvidence", default=True) + """An indication whether the model's output should include evidence for the inferences. """ + clinical_trials: "_models.ClinicalTrials" = rest_field(name="clinicalTrials") + """The clinical trials that the patient(s) should be matched to. :code:`
`The trial +selection can be given as a list of custom clinical trials and/or a list of +filters to known clinical trial registries. In case both are given, the +resulting trial set is a union of the two sets. Required. """ + + @overload + def __init__( + self, + *, + clinical_trials: "_models.ClinicalTrials", + verbose: bool = False, + include_evidence: bool = True, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherPatientResult(_model_base.Model): + """The results of the model's work for a single patient. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The identifier given for the patient in the request. Required. + :vartype id: str + :ivar inferences: The model's inferences for the given patient. Required. + :vartype inferences: list[~azure.healthinsights.clinicalmatching.models.TrialMatcherInference] + :ivar needed_clinical_info: Clinical information which is needed to provide better trial + matching results for the patient. Clinical information which is needed to provide better trial + matching results for the patient. + :vartype needed_clinical_info: + list[~azure.healthinsights.clinicalmatching.models.ExtendedClinicalCodedElement] + """ + + id: str = rest_field() + """The identifier given for the patient in the request. Required. """ + inferences: List["_models.TrialMatcherInference"] = rest_field() + """The model's inferences for the given patient. Required. """ + needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = rest_field(name="neededClinicalInfo") + """Clinical information which is needed to provide better trial matching results for the patient. Clinical + information which is needed to provide better trial matching results for the patient. """ + + @overload + def __init__( + self, + *, + id: str, # pylint: disable=redefined-builtin + inferences: List["_models.TrialMatcherInference"], + needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class TrialMatcherResult(_model_base.Model): + """The response for the Trial Matcher request. + + Readonly variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar job_id: A processing job identifier. Required. + :vartype job_id: str + :ivar created_date_time: The date and time when the processing job was created. Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: The date and time when the processing job is set to expire. + Required. + :vartype expiration_date_time: ~datetime.datetime + :ivar last_update_date_time: The date and time when the processing job was last updated. + Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: The status of the processing job. Required. Known values are: "notStarted", + "running", "succeeded", "failed", and "partiallyCompleted". + :vartype status: str or ~azure.healthinsights.clinicalmatching.models.JobStatus + :ivar errors: An array of errors, if any errors occurred during the processing job. + :vartype errors: list[~azure.healthinsights.clinicalmatching.models.Error] + :ivar results: The inference results for the Trial Matcher request. + :vartype results: ~azure.healthinsights.clinicalmatching.models.TrialMatcherResults + """ + + job_id: str = rest_field(name="jobId", readonly=True) + """A processing job identifier. Required. """ + created_date_time: datetime.datetime = rest_field(name="createdDateTime", readonly=True) + """The date and time when the processing job was created. Required. """ + expiration_date_time: datetime.datetime = rest_field(name="expirationDateTime", readonly=True) + """The date and time when the processing job is set to expire. Required. """ + last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) + """The date and time when the processing job was last updated. Required. """ + status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", + \"failed\", and \"partiallyCompleted\". """ + errors: Optional[List["_models.Error"]] = rest_field(readonly=True) + """An array of errors, if any errors occurred during the processing job. """ + results: Optional["_models.TrialMatcherResults"] = rest_field(readonly=True) + """The inference results for the Trial Matcher request. """ + + +class TrialMatcherResults(_model_base.Model): + """The inference results for the Trial Matcher request. + + All required parameters must be populated in order to send to Azure. + + :ivar patients: Results for the patients given in the request. Required. + :vartype patients: + list[~azure.healthinsights.clinicalmatching.models.TrialMatcherPatientResult] + :ivar model_version: The version of the model used for inference, expressed as the model date. + Required. + :vartype model_version: str + :ivar knowledge_graph_last_update_date: The date when the clinical trials knowledge graph was + last updated. + :vartype knowledge_graph_last_update_date: ~datetime.date + """ + + patients: List["_models.TrialMatcherPatientResult"] = rest_field() + """Results for the patients given in the request. Required. """ + model_version: str = rest_field(name="modelVersion") + """The version of the model used for inference, expressed as the model date. Required. """ + knowledge_graph_last_update_date: Optional[datetime.date] = rest_field(name="knowledgeGraphLastUpdateDate") + """The date when the clinical trials knowledge graph was last updated. """ + + @overload + def __init__( + self, + *, + patients: List["_models.TrialMatcherPatientResult"], + model_version: str, + knowledge_graph_last_update_date: Optional[datetime.date] = None, + ): + ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/py.typed b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/dev_requirements.txt b/sdk/healthinsights/azure-healthinsights-clinicalmatching/dev_requirements.txt new file mode 100644 index 000000000000..ff12ab35dd01 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/dev_requirements.txt @@ -0,0 +1,4 @@ +-e ../../../tools/azure-devtools +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md new file mode 100644 index 000000000000..ed7b7758fe0e --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md @@ -0,0 +1,63 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-cognitive-services + - azure-healthinsights-clinicalmatching +urlFragment: healthinsights-clinicalmatching-samples +--- + +# Samples for Health Insights Clinical Matching client library for Python + +These code samples show common scenario operations with the Health Insights Clinical Matching client library. + +These sample programs show common scenarios for the Health Insights Clinical Matching client's offerings. + +|**File Name**|**Description**| +|----------------|-------------| + + +## Prerequisites +* Python 2.7 or 3.5 or higher is required to use this package. +* The Pandas data analysis library. +* You must have an [Azure subscription][azure_subscription] and an +[Azure Health Insights account][azure_healthinsights_account] to run these samples. + +## Setup + +1. Install the Azure Health Insights Clinical Matching client library for Python with [pip][pip]: + +```bash +pip install azure-healthinsights-clinicalmatching +``` + +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file, e.g. `python sample_match_trials_custom_trial.py` + +## Next steps + +Check out the [API reference documentation][python-fr-ref-docs] to learn more about +what you can do with the Health Insights client library. + +[pip]: https://pypi.org/project/pip/ +[azure_subscription]: https://azure.microsoft.com/free/cognitive-services + diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt new file mode 100644 index 000000000000..f89fee606151 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt @@ -0,0 +1 @@ +{"resourceType":"Bundle","id":"1ca45d61-eb04-4c7d-9784-05e31e03e3c6","meta":{"profile":["http://hl7.org/fhir/4.0.1/StructureDefinition/Bundle"]},"identifier":{"system":"urn:ietf:rfc:3986","value":"urn:uuid:1ca45d61-eb04-4c7d-9784-05e31e03e3c6"},"type":"document","entry":[{"fullUrl":"Composition/baff5da4-0b29-4a57-906d-0e23d6d49eea","resource":{"resourceType":"Composition","id":"baff5da4-0b29-4a57-906d-0e23d6d49eea","status":"final","type":{"coding":[{"system":"http://loinc.org","code":"11488-4","display":"Consult note"}],"text":"Consult note"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"date":"2022-08-16","author":[{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}],"title":"Consult note","section":[{"title":"Chief Complaint","code":{"coding":[{"system":"http://loinc.org","code":"46239-0","display":"Reason for visit and chief complaint"}],"text":"Chief Complaint"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Chief Complaint

\r\n\t\t\t\t\t\t\t

\"swelling of tongue and difficulty breathing and swallowing\"

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/a7ba1fc8-7544-4f1a-ac4e-c0430159001f","type":"List","display":"Chief Complaint"}]},{"title":"History of Present Illness","code":{"coding":[{"system":"http://loinc.org","code":"10164-2","display":"History of present illness"}],"text":"History of Present Illness"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

History of Present Illness

\r\n\t\t\t\t\t\t\t

77 y o woman in NAD with a h/o CAD, DM2, asthma and HTN on altace for 8 years awoke from sleep around 2:30 am this morning of a sore throat and swelling of tongue. She came immediately to the ED b/c she was having difficulty swallowing and some trouble breathing due to obstruction caused by the swelling. She has never had a similar reaction ever before and she did not have any associated SOB, chest pain, itching, or nausea. She has not noticed any rashes, and has been afebrile. She says that she feels like it is swollen down in her esophagus as well. In the ED she was given 25mg benadryl IV, 125 mg solumedrol IV and pepcid 20 mg IV. This has helped the swelling some but her throat still hurts and it hurts to swallow. Nothing else was able to relieve the pain and nothing make it worse though she has not tried to drink any fluids because of trouble swallowing. She denies any recent travel, recent exposure to unusual plants or animals or other allergens. She has not started any new medications, has not used any new lotions or perfumes and has not eaten any unusual foods. Patient has not taken any of her oral medications today.

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/c1c10373-6325-4339-b962-c3c114969ccd","type":"List","display":"History of Present Illness"}]},{"title":"Surgical History","code":{"coding":[{"system":"http://loinc.org","code":"10164-2","display":"History of present illness"}],"text":"Surgical History"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Surgical History

\r\n\t\t\t\t\t\t\t

s/p Cardiac stent in 1999 \r\ns/p hystarectomy in 1970s \r\ns/p kidney stone retrieval 1960s

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe","type":"List","display":"Surgical History"}]},{"title":"Medical History","code":{"coding":[{"system":"http://loinc.org","code":"11348-0","display":"Past medical history"}],"text":"Medical History"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Medical History

\r\n\t\t\t\t\t\t\t

+ CAD w/ Left heart cath in 2005 showing 40% LAD, 50% small D2, 40% RCA and 30% large OM; 2006 TTE showing LVEF 60-65% with diastolic dysfunction, LVH, mild LA dilation \r\n+ Hyperlipidemia \r\n+ HTN \r\n+ DM 2, last A1c 6.7 in 9/2005 \r\n+ Asthma/COPD \r\n+ GERD \r\n+ h/o iron deficiency anemia

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/e0ed81ae-184e-44ce-b45a-2da9cd2eba9c","type":"List","display":"Medical History"}]},{"title":"Social History","code":{"coding":[{"system":"http://loinc.org","code":"29762-2","display":"Social History"}],"text":"Social History"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Social History

\r\n\t\t\t\t\t\t\t

Patient lives in _______ with daughter _____ (919) _______. Patient does all ADLs and IADLs with no/little assistance. She does own finances and drives. Patient has 4 daughters that all live in the area. Patient does not use tobacco, alcohol, illicit drugs.

\r\n\t\t\t\t\t
"}},{"title":"Family History","code":{"coding":[{"system":"http://loinc.org","code":"10157-6","display":"Family History"}],"text":"Family History"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Family History

\r\n\t\t\t\t\t\t\t

Patient's Dad died of liver cirrhosis at age 57, mom died of heart attack at age 60. She has 6 siblings who most died of cardiac disease. There is no family history of cancer.

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/22ec7727-c4ca-4477-a42b-51d34a935da6","type":"List","display":"Family History"}]},{"title":"Allergies","code":{"coding":[{"system":"http://loinc.org","code":"48765-2","display":"Allergies and adverse reactions"}],"text":"Allergies"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Allergies

\r\n\t\t\t\t\t\t\t

Sulfa drugs - rash \r\nCipro - rash \r\nBenadryl – causes mild dystonic reaction

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/ef6382f6-5089-4eda-9145-d44be736d451","type":"List","display":"Allergies"}]},{"title":"Medications","code":{"coding":[{"system":"http://loinc.org","code":"10160-0","display":"Medications"}],"text":"Medications"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Medications

\r\n\t\t\t\t\t\t\t

Theophyline (Uniphyl) 600 mg qhs – bronchodilator by increasing cAMP used for \r\ntreating asthma \r\nDiltiazem 300 mg qhs – Ca channel blocker used to control hypertension \r\nSimvistatin (Zocor) 20 mg qhs- HMGCo Reductase inhibitor for hypercholesterolemia \r\nRamipril (Altace) 10 mg BID – ACEI for hypertension and diabetes for renal protective \r\neffect \r\nGlipizide 5 mg BID (diabetes) – sulfonylurea for treatment of diabetes \r\nOmecprazole (Prilosec) 20 mg daily (reflux) – PPI for treatment of ulcers \r\nGabapentin (Neurontin) 100 mg qhs – modulates release of neurotransmitters to treat \r\ndiabetic neuropathy \r\nMetformin 500 mg qam – biguanide used to treat diabetes \r\nAspirin 81 mg qam - prophylaxis for MI and TIA \r\nFluticasone (Flovent) 2 puff bid - corticosteroid to treat airways in asthma/copd \r\nxoperex 1.25mg and Ipratropium 2.5 ml nebulized qam - anticholinergic to treat airways \r\nin COPD

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/c5490e7d-7447-4f89-8a7d-9871439d55e7","type":"List","display":"Medications"}]},{"title":"Review of Systems","code":{"coding":[{"system":"http://loinc.org","code":"10187-3","display":"Review of systems"}],"text":"Review of Systems"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Review of Systems

\r\n\t\t\t\t\t\t\t

Constitutional - NAD, has been generally feeling well the last couple of weeks \r\nEyes - no changes in vision, double vision, blurry vision, wears glasses \r\nENT - No congestion, changes in hearing, does not wear hearing aids \r\nSkin/Breast - no rashes \r\nCardiovascular - No SOB, chest pain, heart palpitations \r\nPulmonary - hard to get a breath in but not short of breath, no cough \r\nEndocrine - No changes in appetite \r\nGastro Intestinal - No n/v/d or constipation. Has not eaten because can't swallow solid \r\nfoods. \r\nGenito Urinary - No increased frequency or pain on urination. Some urge incontinence \r\nwith history of prolapse.

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/cd98589b-54af-4d9f-8fa7-f0ac32bd4df0","type":"List","display":"Review of Systems"}]},{"title":"Physical Examination","code":{"coding":[{"system":"http://loinc.org","code":"29545-1","display":"Physical findings"}],"text":"Physical Examination"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Physical Examination

\r\n\t\t\t\t\t\t\t

Vitals: \r\nTemp 35.9 \r\nPulse 76 \r\nO2 98% RA \r\nRR 20 \r\nBP 159/111 \r\n\r\nGeneral - NAD, sitting up in bed, well groomed and in nightgown \r\nEyes - PERRLA, EOM intact \r\nENT - Large swollen tounge and cheek on left side, tounge was large and obscured the view of the posterior oropharynx \r\nNeck - No noticeable or palpable swelling, redness or rash around throat or on face \r\nLymph Nodes - No lymphadenopathy \r\nCardiovascular - RRR no m/r/g, no JVD, no carotid bruits \r\nLungs - Clear to auscltation, no use of acessory muscles, no crackles or wheezes. \r\nSkin - No rashes, skin warm and dry, no erythematous areas \r\nAbdomen - Normal bowel sounds, abdomen soft and nontender \r\nExtremeties - No edema, cyanosis or clubbing \r\nMusculo Skeletal - 5/5 strength, normal range of motion, no swollen or erythematous \r\njoints. \r\nNeurological – Alert and oriented x 3, CN 2-12 grossly intact.

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/4353769c-64cc-4659-a239-efea24311f2e","type":"List","display":"Physical Examination"}]},{"title":"Pertinent Diagnostic Tests","code":{"coding":[{"system":"http://loinc.org","code":"22636-5","display":"Pathology report relevant history"}],"text":"Pertinent Diagnostic Tests"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Pertinent Diagnostic Tests

\r\n\t\t\t\t\t\t\t

Na 140 \r\nK 4.5 \r\nCl 109 \r\nCo2 23 \r\nBUN 29 \r\nCr 1.0 \r\nCa 9.9 \r\nMg 1.4 \r\nPhos 3.6 \r\n\r\nPTT 26.7 \r\n\r\nWBC 9.9 \r\nHgb 10.0 \r\nHct 30.3 \r\nPlt 373 \r\n\r\nEKG - no signs of ischemia

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210","type":"List","display":"Pertinent Diagnostic Tests"}]},{"title":"Assessment and Plan","code":{"coding":[{"system":"http://loinc.org","code":"51847-2","display":"Assessment and Plan"}],"text":"Assessment and Plan"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Assessment and Plan

\r\n\t\t\t\t\t\t\t

77 yo woman presents with significant angioedema in left side of tongue and inner cheek. Possible causes of angioedema include allergic anaphylaxis reaction, drug induced, allergic contact dermatitis, viral infection, drug induced, or a C1 inhibitor deficiency disorder acquired or hereditary. Laryngeal edema can also be caused by tonsillitis, peritonsilar abscess or pharyngeal foreign body.\r\n\r\nIt is unlikely that the patient has edema caused by abscess or tonsillitis since she does not have any associated fever or other signs of infection and the sudden onset of her swelling also argues against this. It is not likely a foreign body since ENT did not find anything when they scoped her.

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/affbdb9c-c8d0-4774-89e9-e8486fd5379a","type":"List","display":"Assessment and Plan"}]},{"title":"Plan","code":{"coding":[{"system":"http://loinc.org","code":"18776-5","display":"Plan of care"}],"text":"Plan"},"text":{"div":"
\r\n\t\t\t\t\t\t\t

Plan

\r\n\t\t\t\t\t\t\t

++ Swollen tongue: \r\n- Give patient corticosteroid to decrease inflammation and to protect against relapse after initial improvement. 4 days of Dexamethasone 10 mg IV tid. \r\n- Give patient antihistamine to block inflammation as well. 4 days of Diphenhydramine 25 mg bid. \r\n- ENT consult to rule out abscess or foreign object \r\n- Check C1 and C4 levels that would be decreased if the patient had C1 inhibitory complement deficiency \r\n- TSH level to check for hypo/hyper thyroid \r\n- Hold all oral home meds and keep patient NPO until airway swelling is reduced and patient can swallow easily \r\n\r\n++ Asthma/COPD \r\n- continue albuterol and ipratropium nebs prn \r\n- resume theophylline when patient can take oral meds \r\n\r\n++ DM \r\n- Patient is on corticosteroids that increase blood glucose levels, so put patient on sliding scale normal insulin to adjust for high sugars \r\n- Resume neurontin for neuropathy when oral meds can be taken \r\n\r\n++ HTN \r\n- Continue patient’s BP control with Diltiazem drip 5mg/hour \r\n- HOLD altace (ACEI) that is most likely the cause of angioedema \r\n- Consider an alternative HTN medication to replace the ACEI. Can’t use a HCTZ because of sulfa allergy. Also has asthma/COPD picture so beta blocker may not work well either. \r\n\r\n++ CAD s/p PCI in 1999 \r\n- Resume simvastatin and aspirin when patient is able to take oral meds \r\n++ GERD \r\n- famotidine when oral meds are resumed

\r\n\t\t\t\t\t
"},"entry":[{"reference":"List/6f292c58-8a59-44d9-9efe-7d8968684466","type":"List","display":"Plan"}]}]}},{"fullUrl":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","resource":{"resourceType":"Practitioner","id":"082e9fc4-7483-4ef8-b83d-ea0733859cdc","extension":[{"extension":[{"url":"offset","valueInteger":-1},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"name":[{"text":"Unknown","family":"Unknown"}]}},{"fullUrl":"Patient/894a042e-625c-48b3-a710-759e09454897","resource":{"resourceType":"Patient","id":"894a042e-625c-48b3-a710-759e09454897","gender":"female","birthDate":"1945-09"}},{"fullUrl":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","resource":{"resourceType":"Encounter","id":"d6535404-17da-4282-82c2-2eb7b9b86a47","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter"]},"status":"finished","class":{"system":"http://terminology.hl7.org/CodeSystem/v3-ActCode","display":"unknown"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"}}},{"fullUrl":"Condition/5a63461d-0a7a-49a2-ba18-2aeed20b2994","resource":{"resourceType":"Condition","id":"5a63461d-0a7a-49a2-ba18-2aeed20b2994","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":22},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0236068","display":"Tongue swelling"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000023674"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004073"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D20022"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042727"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"205"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU073264"},{"system":"http://snomed.info/sct/731000124108","code":"421262002"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1485"}],"text":"swelling of tongue"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/ffc8e2ea-6767-47cd-a72f-fe0909330027","resource":{"resourceType":"Condition","id":"ffc8e2ea-6767-47cd-a72f-fe0909330027","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":45},{"url":"length","valueInteger":20}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013404","display":"Dyspnea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005442"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00182"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015304"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004216"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"266"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2596-2296"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPNEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001014"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002094"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.02"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.05"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029433"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024507"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001486"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040344"},{"system":"http://loinc.org","code":"LP115812-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013968"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"115876"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3077"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004417"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000486"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00495"},{"system":"http://ncimeta.nci.nih.gov","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13368"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1816"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046183"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"042109"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037132"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000598319"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15680"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qq"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qq"},{"system":"http://snomed.info/sct","code":"F-75040"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-20040"},{"system":"http://snomed.info/sct/731000124108","code":"267036007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0514"}],"text":"difficulty breathing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/7b0a8ae4-7fda-4b4a-8e2e-97ad78372243","resource":{"resourceType":"Condition","id":"7b0a8ae4-7fda-4b4a-8e2e-97ad78372243","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":70},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0740170","display":"Does swallow"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000047036"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"091308"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa4JX"},{"system":"http://snomed.info/sct/731000124108","code":"288937009"}],"text":"swallowing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"List/a7ba1fc8-7544-4f1a-ac4e-c0430159001f","resource":{"resourceType":"List","id":"a7ba1fc8-7544-4f1a-ac4e-c0430159001f","status":"current","mode":"snapshot","title":"Chief Complaint","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Condition/5a63461d-0a7a-49a2-ba18-2aeed20b2994","type":"Condition","display":"swelling of tongue"}},{"item":{"reference":"Condition/ffc8e2ea-6767-47cd-a72f-fe0909330027","type":"Condition","display":"difficulty breathing"}},{"item":{"reference":"Condition/7b0a8ae4-7fda-4b4a-8e2e-97ad78372243","type":"Condition","display":"swallowing"}}]}},{"fullUrl":"Condition/8c143a3a-957b-4ad0-8ceb-08fb8e351cb3","resource":{"resourceType":"Condition","id":"8c143a3a-957b-4ad0-8ceb-08fb8e351cb3","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":147},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1956346","display":"Coronary Artery Disease"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005327"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00010"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0037465"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-3397"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CORONARY ART DIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000871"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001677"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I25.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU019520"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K76003"},{"system":"http://loinc.org","code":"LP90122-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10011078"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"35988"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1276"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003324"},{"system":"http://ncimeta.nci.nih.gov","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000439400"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002067"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE2uV"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-13000"},{"system":"http://snomed.info/sct/731000124108","code":"414024009"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0426"}],"text":"CAD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/973f06cf-d831-4c00-baed-e408420e5d77","resource":{"resourceType":"Condition","id":"973f06cf-d831-4c00-baed-e408420e5d77","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":152},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0011860","display":"Diabetes Mellitus, Non-Insulin-Dependent"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00336"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0045504"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"END005"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"END005"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003837"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000225"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0862-7250"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000472"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0005978"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"E11"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"E11"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"E11"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"T90"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU022755"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"T90007"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85092226"},{"system":"http://loinc.org","code":"LA10552-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10067585"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30480"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5930"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003924"},{"system":"http://ncimeta.nci.nih.gov","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047504"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X40J5"},{"system":"http://snomed.info/sct","code":"D-241Y"},{"system":"http://snomed.info/sct/900000000000207008","code":"DB-61030"},{"system":"http://snomed.info/sct/731000124108","code":"44054006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0371"}],"text":"DM2"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/590bd19b-78d7-415b-bdb4-72f3f8ce0e1a","resource":{"resourceType":"Condition","id":"590bd19b-78d7-415b-bdb4-72f3f8ce0e1a","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":157},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0004096","display":"Asthma"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005951"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00009"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017373"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"8.3"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"RSP009"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"RSP009"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001541"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"080"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1525-2157"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ASTHMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000273"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002099"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"J45.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"J45.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"J45"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"493"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R96"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R96"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU008836"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R96001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000405"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85008860"},{"system":"http://loinc.org","code":"MTHU020815"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10003553"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"32881"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001249"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"493.9"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01919"},{"system":"http://ncimeta.nci.nih.gov","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1726"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000440101"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU003537"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"04190"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"R0121533"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"H33.."},{"system":"http://snomed.info/sct","code":"D-4790"},{"system":"http://snomed.info/sct/900000000000207008","code":"D2-51000"},{"system":"http://snomed.info/sct/731000124108","code":"195967001"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1367"}],"text":"asthma"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/b91e08d1-2c9f-4b49-839c-37951b141d08","resource":{"resourceType":"Condition","id":"b91e08d1-2c9f-4b49-839c-37951b141d08","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":168},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0020538","display":"Hypertensive disease"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000023317"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00001"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017493"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"7.1"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000015800"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"397"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0571-5243"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"HYPERTENS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002034"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000822"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"I10-I15.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"I10-I15.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I10"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"997.91"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU035456"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K85004"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002317"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85063723"},{"system":"http://loinc.org","code":"LA14293-7"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10020772"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"33288"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"34"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006973"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"005"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"997.91"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00905"},{"system":"http://ncimeta.nci.nih.gov","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13785"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1908"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000458091"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"060808"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002068"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_11000.06"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686951"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"23830"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0Ub"},{"system":"http://snomed.info/sct","code":"F-70700"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-02000"},{"system":"http://snomed.info/sct/731000124108","code":"38341003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0210"}],"text":"HTN"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Procedure/47836826-796c-4bd3-9a4e-ef5021413df3","resource":{"resourceType":"Procedure","id":"47836826-796c-4bd3-9a4e-ef5021413df3","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":939},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"text":"drink any fluids"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Procedure/6fb3eab0-4bda-4627-919c-083a757f11fa","resource":{"resourceType":"Procedure","id":"6fb3eab0-4bda-4627-919c-083a757f11fa","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1106},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1718097","display":"New medications"},{"system":"http://loinc.org","code":"LP75169-0"}],"text":"new medications"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Procedure/cb4aabfc-7754-4bad-b072-65c155ca8df7","resource":{"resourceType":"Procedure","id":"cb4aabfc-7754-4bad-b072-65c155ca8df7","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1144},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0544341","display":"Lotion"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000038694"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v3.0","code":"LTN"},{"system":"http://ncimeta.nci.nih.gov","code":"C29167"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C29167"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"C29167"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ncpdp","code":"C29167"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"SK"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"142222"},{"system":"http://snomed.info/sct","code":"E-806Y"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-50640"},{"system":"http://snomed.info/sct/731000124108","code":"739000003"},{"system":"http://hl7.org/fhir/ndfrt","code":"4023113"}],"text":"lotions"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Procedure/3f61932c-89fc-4ff6-a153-6590f3f2eabe","resource":{"resourceType":"Procedure","id":"3f61932c-89fc-4ff6-a153-6590f3f2eabe","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1155},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0031000","display":"Perfume"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000021311"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009472"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003543"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85099839"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010476"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"016110"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XC08J"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-31105"},{"system":"http://snomed.info/sct/731000124108","code":"95998000"},{"system":"http://hl7.org/fhir/ndfrt","code":"4020187"}],"text":"perfumes"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Procedure/9496b625-423f-4ef0-a511-9dc1f63752ca","resource":{"resourceType":"Procedure","id":"9496b625-423f-4ef0-a511-9dc1f63752ca","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1234},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0175795","display":"Oral Medication"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000018213"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U005123"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85095244"},{"system":"http://ncimeta.nci.nih.gov","code":"C102246"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C102246"}],"text":"oral medications"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Condition/d7071c07-a763-4618-9232-05e326abf745","resource":{"resourceType":"Condition","id":"d7071c07-a763-4618-9232-05e326abf745","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":132},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C2051415","display":"patient appears in no acute distress (physical finding)"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"10024"}],"text":"NAD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1","resource":{"resourceType":"Condition","id":"bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":244},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0242429","display":"Sore Throat"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00661"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0036874"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000024822"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"695"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2139-2226"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PHARYNGITIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U003750"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R07.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R07.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R07.0"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"784.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU041000"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R21005"},{"system":"http://loinc.org","code":"LA30867-8"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10043524"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"219"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4748"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010612"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"462"},{"system":"http://ncimeta.nci.nih.gov","code":"C50747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13575"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2396"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"000709"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa9zW"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-51724"},{"system":"http://snomed.info/sct/731000124108","code":"162397003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0523"}],"text":"sore throat"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"onsetString":"2:30 am this morning"}},{"fullUrl":"Condition/63a92b3f-e4eb-4f50-9959-c996c888b546","resource":{"resourceType":"Condition","id":"63a92b3f-e4eb-4f50-9959-c996c888b546","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":260},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0236068","display":"Tongue swelling"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000023674"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004073"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D20022"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042727"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"205"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU073264"},{"system":"http://snomed.info/sct/731000124108","code":"421262002"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1485"}],"text":"swelling of tongue"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"onsetString":"2:30 am this morning"}},{"fullUrl":"Condition/39bcd405-255f-428a-ac88-aab689f31b87","resource":{"resourceType":"Condition","id":"39bcd405-255f-428a-ac88-aab689f31b87","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":330},{"url":"length","valueInteger":21}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0011168","display":"Deglutition Disorders"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005507"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00239"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014574"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"9.12.2"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"SYM005"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"SYM005"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003662"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"265"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"5000-0052"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPHAGIA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001012"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002015"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R13"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R13"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R13.10"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"787.20"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024378"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D21004"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85036477"},{"system":"http://loinc.org","code":"MTHU029874"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013950"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"312702"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1309"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003680"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"787.20"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT160004"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00412"},{"system":"http://ncimeta.nci.nih.gov","code":"C2980"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10621"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2980"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1815"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044666"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2980"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"211613"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU036443"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000524080"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15654"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM08J"},{"system":"http://snomed.info/sct","code":"F-61020"},{"system":"http://snomed.info/sct/900000000000207008","code":"D5-30250"},{"system":"http://snomed.info/sct/731000124108","code":"40739000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0280"}],"text":"difficulty swallowing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/10850a14-8dd5-4978-8bc2-357247cb5cc2","resource":{"resourceType":"Condition","id":"10850a14-8dd5-4978-8bc2-357247cb5cc2","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":361},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013404","display":"Dyspnea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005442"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00182"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015304"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004216"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"266"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2596-2296"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPNEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001014"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002094"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.02"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.05"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029433"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024507"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001486"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040344"},{"system":"http://loinc.org","code":"LP115812-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013968"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"115876"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3077"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004417"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000486"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00495"},{"system":"http://ncimeta.nci.nih.gov","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13368"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1816"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046183"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"042109"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037132"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000598319"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15680"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qq"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qq"},{"system":"http://snomed.info/sct","code":"F-75040"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-20040"},{"system":"http://snomed.info/sct/731000124108","code":"267036007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0514"}],"text":"trouble breathing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/64e41fc9-a70e-42c9-965b-de94fd5a5c2d","resource":{"resourceType":"Condition","id":"64e41fc9-a70e-42c9-965b-de94fd5a5c2d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":386},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0028778","display":"Obstruction"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004470"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1002744"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008870"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU053672"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006537"},{"system":"http://loinc.org","code":"LP222112-7"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10061876"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003467"},{"system":"http://ncimeta.nci.nih.gov","code":"C3284"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C3284"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044954"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3284"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79q0"},{"system":"http://snomed.info/sct","code":"M-34000"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-34000"},{"system":"http://snomed.info/sct/731000124108","code":"26036001"}],"text":"obstruction"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/8db12eea-31d5-44ad-a0f7-7fa8ed70f370","resource":{"resourceType":"Condition","id":"8db12eea-31d5-44ad-a0f7-7fa8ed70f370","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":412},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038999","display":"Swelling"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004456"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000701"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011957"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A08"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A08"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A08003"},{"system":"http://loinc.org","code":"LA22440-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042674"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://ncimeta.nci.nih.gov","code":"C3399"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2091"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"191325"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU067007"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76Eu"},{"system":"http://snomed.info/sct","code":"M-02570"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-02570"},{"system":"http://snomed.info/sct/731000124108","code":"442672001"}],"text":"swelling"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/2dcdac99-7c88-4cca-ac3b-081cf6900fe6","resource":{"resourceType":"Condition","id":"2dcdac99-7c88-4cca-ac3b-081cf6900fe6","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":442},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"text":"similar reaction"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/4aec7002-282f-419b-b9bc-8c331ea955be","resource":{"resourceType":"Condition","id":"4aec7002-282f-419b-b9bc-8c331ea955be","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":507},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013404","display":"Dyspnea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005442"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00182"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015304"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004216"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"266"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2596-2296"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPNEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001014"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002094"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.02"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.05"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029433"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024507"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001486"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040344"},{"system":"http://loinc.org","code":"LP115812-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013968"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"115876"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3077"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004417"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000486"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00495"},{"system":"http://ncimeta.nci.nih.gov","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13368"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1816"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046183"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"042109"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037132"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000598319"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15680"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qq"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qq"},{"system":"http://snomed.info/sct","code":"F-75040"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-20040"},{"system":"http://snomed.info/sct/731000124108","code":"267036007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0514"}],"text":"SOB"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/d5c638e2-1802-4173-84b4-ae71a2d057ff","resource":{"resourceType":"Condition","id":"d5c638e2-1802-4173-84b4-ae71a2d057ff","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":512},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0008031","display":"Chest Pain"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00012"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017850"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"7.2.5"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"CIR012"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"CIR012"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002750"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"171"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PAIN CHEST"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000673"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0100749"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R07.4"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R07.4"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R07.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.50"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"b28011"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"b28011"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A11"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU059497"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A11001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000942"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85023146"},{"system":"http://loinc.org","code":"LP98885-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10008479"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"33722"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4744"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002637"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"172"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00204"},{"system":"http://ncimeta.nci.nih.gov","code":"C38665"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1776"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000467223"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C38665"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070014"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU025178"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"182.."},{"system":"http://snomed.info/sct","code":"F-71400"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-37000"},{"system":"http://snomed.info/sct/731000124108","code":"29857009"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0718"}],"text":"chest pain"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/5c9866ec-2e71-492f-994b-9dce0247882e","resource":{"resourceType":"Condition","id":"5c9866ec-2e71-492f-994b-9dce0247882e","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":524},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0033774","display":"Pruritus"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005226"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00607"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014802"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000010273"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"619"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-6790"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PRURITUS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U003248"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000989"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"L29.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"L29.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"L29.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"698.9"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"S02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU062220"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"S02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003889"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85108048"},{"system":"http://loinc.org","code":"LA20641-9"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037087"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"1113"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3067"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D011537"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"619"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"698.9"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01266"},{"system":"http://ncimeta.nci.nih.gov","code":"C3344"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1943"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000446534"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3344"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3344"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"080316"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037280"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.06"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_17010.06"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000042504"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"41260"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"Q0200232"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM00q"},{"system":"http://snomed.info/sct","code":"F-82300"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-A2300"},{"system":"http://snomed.info/sct/731000124108","code":"418290006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0024"}],"text":"itching"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/3150feb9-23a3-4d8a-95c6-95058ee4effb","resource":{"resourceType":"Condition","id":"3150feb9-23a3-4d8a-95c6-95058ee4effb","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":536},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027497","display":"Nausea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005505"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00280"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"B04.1"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014479"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008525"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"508"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1249-7728"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"NAUSEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002745"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002018"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R11.0"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10000859"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"D09"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"D09"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU049523"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D09002"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003135"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85090324"},{"system":"http://loinc.org","code":"LP36327-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10028813"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"411"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009325"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00134"},{"system":"http://ncimeta.nci.nih.gov","code":"C3258"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10878"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1970"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000390302"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3258"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"040016"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002455"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"33080"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X75qw"},{"system":"http://snomed.info/sct","code":"F-61560"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-52760"},{"system":"http://snomed.info/sct/731000124108","code":"422587007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0308"}],"text":"nausea"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/5fbaaaa3-316b-411f-b583-bcd504ab5b29","resource":{"resourceType":"Condition","id":"5fbaaaa3-316b-411f-b583-bcd504ab5b29","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":568},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"refuted","display":"Refuted"}],"text":"Refuted"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rashes"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/6d0fe82f-7cf1-49dc-b74d-22930dc74342","resource":{"resourceType":"Condition","id":"6d0fe82f-7cf1-49dc-b74d-22930dc74342","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":589},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0277797","display":"Apyrexial"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000027018"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa1kS"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-03005"},{"system":"http://snomed.info/sct/731000124108","code":"86699002"}],"text":"afebrile"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a","resource":{"resourceType":"Condition","id":"aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":634},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"text":"swollen down"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":654},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0014876","display":"Esophagus"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005531"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000038776"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1250-0527"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7131"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"ESO"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s520"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s520"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001661"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85044855"},{"system":"http://loinc.org","code":"LP29941-9"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004947"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U001901"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT010002"},{"system":"http://ncimeta.nci.nih.gov","code":"C12389"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12389"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12389"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046408"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12389"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"17920"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N300"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"7N300"},{"system":"http://snomed.info/sct","code":"T-62000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-56000"},{"system":"http://snomed.info/sct/731000124108","code":"32849002"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7131"}],"text":"esophagus"}],"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/6668ff37-4d5d-4022-82a1-ee619ecb41d2","resource":{"resourceType":"Condition","id":"6668ff37-4d5d-4022-82a1-ee619ecb41d2","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":777},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038999","display":"Swelling"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004456"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000701"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011957"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A08"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A08"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A08003"},{"system":"http://loinc.org","code":"LA22440-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042674"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://ncimeta.nci.nih.gov","code":"C3399"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2091"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"191325"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU067007"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76Eu"},{"system":"http://snomed.info/sct","code":"M-02570"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-02570"},{"system":"http://snomed.info/sct/731000124108","code":"442672001"}],"text":"swelling"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"note":[{"text":"helped"}]}},{"fullUrl":"Condition/d7852009-616f-4021-941c-2a06f2cd3e0d","resource":{"resourceType":"Condition","id":"d7852009-616f-4021-941c-2a06f2cd3e0d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":799},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"text":"throat still hurts"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/718e9908-53a6-45d5-9713-0091a03a42e5","resource":{"resourceType":"Condition","id":"718e9908-53a6-45d5-9713-0091a03a42e5","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":825},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"text":"hurts to swallow"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/a681cf02-0a4a-4ce1-94cb-d61b044ef814","resource":{"resourceType":"Condition","id":"a681cf02-0a4a-4ce1-94cb-d61b044ef814","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":880},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"extension":[{"extension":[{"url":"offset","valueInteger":905},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-clinical","code":"active","display":"Active"}],"text":"worse"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0030193","display":"Pain"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002779"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00754"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"Q63.0"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0035760"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009185"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"548"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"65336"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2683-4824"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PAIN"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0012531"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R52.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R52.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R52"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"338-338.99"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"b280-b289"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"b280-b289"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10023130"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU059479"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A29020"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003436"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85096617"},{"system":"http://loinc.org","code":"MTHU029813"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10033371"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"283263"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"351"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010146"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"306"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"780.96"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01394"},{"system":"http://ncimeta.nci.nih.gov","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E11167"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1994"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"200714"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU033713"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"24"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_17010.03"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041399"},{"system":"http://www.nlm.nih.gov/research/umls/pnds","code":"NP.405"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"36150"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa07F"},{"system":"http://snomed.info/sct","code":"F-82600"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-A2600"},{"system":"http://snomed.info/sct/731000124108","code":"22253000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0730"}],"text":"pain"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"note":[{"text":"relieve"}]}},{"fullUrl":"Condition/11f071eb-055c-4eb4-a740-4bed1cddc64e","resource":{"resourceType":"Condition","id":"11f071eb-055c-4eb4-a740-4bed1cddc64e","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":967},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"text":"trouble swallowing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/342af4ab-c83f-4bac-953d-253ff8639754","resource":{"resourceType":"MedicationStatement","id":"342af4ab-c83f-4bac-953d-253ff8639754","extension":[{"extension":[{"url":"offset","valueInteger":175},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0878061","display":"Altace"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000045298"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"315"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017257"},{"system":"http://ncimeta.nci.nih.gov","code":"C29411"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686948"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02tS"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"262418"}],"text":"altace"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"timing":{"repeat":{"duration":8,"durationUnit":"a"},"code":{"text":"8 years"}}}]}},{"fullUrl":"MedicationStatement/cd1b0d06-2086-4732-a1e4-38a2505f9691","resource":{"resourceType":"MedicationStatement","id":"cd1b0d06-2086-4732-a1e4-38a2505f9691","extension":[{"extension":[{"url":"offset","valueInteger":702},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700899","display":"Benadryl"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044903"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"899"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004155"},{"system":"http://ncimeta.nci.nih.gov","code":"C300"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0033299"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000039163"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"05760"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203457"}],"text":"benadryl"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"25mg","route":{"extension":[{"extension":[{"url":"offset","valueInteger":711},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"IV"},"doseAndRate":[{"doseQuantity":{"value":25}}]}]}},{"fullUrl":"MedicationStatement/89ea5b4d-10c5-41f0-ace9-63098b3ef0be","resource":{"resourceType":"MedicationStatement","id":"89ea5b4d-10c5-41f0-ace9-63098b3ef0be","extension":[{"extension":[{"url":"offset","valueInteger":722},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0701466","display":"Solu-Medrol"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000045008"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0059-7979"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"1325"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008776"},{"system":"http://ncimeta.nci.nih.gov","code":"C48004"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0048989"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203856"}],"text":"solumedrol"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"125 mg","route":{"extension":[{"extension":[{"url":"offset","valueInteger":733},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"IV"},"doseAndRate":[{"doseQuantity":{"value":125,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/ad89c0fd-dbb2-450e-a5e7-fcc6f2713630","resource":{"resourceType":"MedicationStatement","id":"ad89c0fd-dbb2-450e-a5e7-fcc6f2713630","extension":[{"extension":[{"url":"offset","valueInteger":740},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0678119","display":"Pepcid"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000042727"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"2232"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D015738"},{"system":"http://ncimeta.nci.nih.gov","code":"C29045"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000574268"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02nB"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"196458"}],"text":"pepcid"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"20 mg","route":{"extension":[{"extension":[{"url":"offset","valueInteger":753},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"IV"},"doseAndRate":[{"doseQuantity":{"value":20,"unit":"mg"}}]}]}},{"fullUrl":"AllergyIntolerance/91d485ea-a664-426a-97d5-d94da1e422c8","resource":{"resourceType":"AllergyIntolerance","id":"91d485ea-a664-426a-97d5-d94da1e422c8","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"]},"extension":[{"extension":[{"url":"offset","valueInteger":1054},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"refuted","display":"Refuted"}],"text":"Refuted"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"refuted","display":"Refuted"}],"text":"Refuted"},"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3540698","display":"animal allergen extracts"},{"system":"http://www.whocc.no/atc","code":"V01AA11"}],"text":"animals"},"patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"List/c1c10373-6325-4339-b962-c3c114969ccd","resource":{"resourceType":"List","id":"c1c10373-6325-4339-b962-c3c114969ccd","status":"current","mode":"snapshot","title":"History of Present Illness","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Condition/8c143a3a-957b-4ad0-8ceb-08fb8e351cb3","type":"Condition","display":"CAD"}},{"item":{"reference":"Condition/973f06cf-d831-4c00-baed-e408420e5d77","type":"Condition","display":"DM2"}},{"item":{"reference":"Condition/590bd19b-78d7-415b-bdb4-72f3f8ce0e1a","type":"Condition","display":"asthma"}},{"item":{"reference":"Condition/b91e08d1-2c9f-4b49-839c-37951b141d08","type":"Condition","display":"HTN"}},{"item":{"reference":"Procedure/47836826-796c-4bd3-9a4e-ef5021413df3","type":"Procedure","display":"drink any fluids"}},{"item":{"reference":"Procedure/6fb3eab0-4bda-4627-919c-083a757f11fa","type":"Procedure","display":"new medications"}},{"item":{"reference":"Procedure/cb4aabfc-7754-4bad-b072-65c155ca8df7","type":"Procedure","display":"lotions"}},{"item":{"reference":"Procedure/3f61932c-89fc-4ff6-a153-6590f3f2eabe","type":"Procedure","display":"perfumes"}},{"item":{"reference":"Procedure/9496b625-423f-4ef0-a511-9dc1f63752ca","type":"Procedure","display":"oral medications"}},{"item":{"reference":"Condition/d7071c07-a763-4618-9232-05e326abf745","type":"Condition","display":"NAD"}},{"item":{"reference":"Condition/bb21dcfc-46d8-4c4b-b2a3-0dee9b8435e1","type":"Condition","display":"sore throat"}},{"item":{"reference":"Condition/63a92b3f-e4eb-4f50-9959-c996c888b546","type":"Condition","display":"swelling of tongue"}},{"item":{"reference":"Condition/39bcd405-255f-428a-ac88-aab689f31b87","type":"Condition","display":"difficulty swallowing"}},{"item":{"reference":"Condition/10850a14-8dd5-4978-8bc2-357247cb5cc2","type":"Condition","display":"trouble breathing"}},{"item":{"reference":"Condition/64e41fc9-a70e-42c9-965b-de94fd5a5c2d","type":"Condition","display":"obstruction"}},{"item":{"reference":"Condition/8db12eea-31d5-44ad-a0f7-7fa8ed70f370","type":"Condition","display":"swelling"}},{"item":{"reference":"Condition/2dcdac99-7c88-4cca-ac3b-081cf6900fe6","type":"Condition","display":"similar reaction"}},{"item":{"reference":"Condition/4aec7002-282f-419b-b9bc-8c331ea955be","type":"Condition","display":"SOB"}},{"item":{"reference":"Condition/d5c638e2-1802-4173-84b4-ae71a2d057ff","type":"Condition","display":"chest pain"}},{"item":{"reference":"Condition/5c9866ec-2e71-492f-994b-9dce0247882e","type":"Condition","display":"itching"}},{"item":{"reference":"Condition/3150feb9-23a3-4d8a-95c6-95058ee4effb","type":"Condition","display":"nausea"}},{"item":{"reference":"Condition/5fbaaaa3-316b-411f-b583-bcd504ab5b29","type":"Condition","display":"rashes"}},{"item":{"reference":"Condition/6d0fe82f-7cf1-49dc-b74d-22930dc74342","type":"Condition","display":"afebrile"}},{"item":{"reference":"Condition/aa9f0e80-7b4a-4ccc-b02a-bf2969f4462a","type":"Condition","display":"swollen down"}},{"item":{"reference":"Condition/6668ff37-4d5d-4022-82a1-ee619ecb41d2","type":"Condition","display":"swelling"}},{"item":{"reference":"Condition/d7852009-616f-4021-941c-2a06f2cd3e0d","type":"Condition","display":"throat still hurts"}},{"item":{"reference":"Condition/718e9908-53a6-45d5-9713-0091a03a42e5","type":"Condition","display":"hurts to swallow"}},{"item":{"reference":"Condition/a681cf02-0a4a-4ce1-94cb-d61b044ef814","type":"Condition","display":"pain"}},{"item":{"reference":"Condition/11f071eb-055c-4eb4-a740-4bed1cddc64e","type":"Condition","display":"trouble swallowing"}},{"item":{"reference":"MedicationStatement/342af4ab-c83f-4bac-953d-253ff8639754","type":"MedicationStatement","display":"altace"}},{"item":{"reference":"MedicationStatement/cd1b0d06-2086-4732-a1e4-38a2505f9691","type":"MedicationStatement","display":"benadryl"}},{"item":{"reference":"MedicationStatement/89ea5b4d-10c5-41f0-ace9-63098b3ef0be","type":"MedicationStatement","display":"solumedrol"}},{"item":{"reference":"MedicationStatement/ad89c0fd-dbb2-450e-a5e7-fcc6f2713630","type":"MedicationStatement","display":"pepcid"}},{"item":{"reference":"AllergyIntolerance/91d485ea-a664-426a-97d5-d94da1e422c8","type":"AllergyIntolerance","display":"animals"}}]}},{"fullUrl":"Procedure/f92472c0-9e90-4b74-8c51-0aa9882645ae","resource":{"resourceType":"Procedure","id":"f92472c0-9e90-4b74-8c51-0aa9882645ae","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1286},{"url":"length","valueInteger":13}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","code":{"text":"Cardiac stent"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"performedDateTime":"1999"}},{"fullUrl":"Procedure/376dee02-e507-4e65-9bb6-802e8fb81905","resource":{"resourceType":"Procedure","id":"376dee02-e507-4e65-9bb6-802e8fb81905","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1314},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","code":{"text":"hystarectomy"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"performedDateTime":"1970"}},{"fullUrl":"Procedure/d055da89-5dac-4eb3-a1ec-47b368ace8c3","resource":{"resourceType":"Procedure","id":"d055da89-5dac-4eb3-a1ec-47b368ace8c3","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":1349},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","code":{"text":"stone retrieval"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"performedDateTime":"1960","bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":1342},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0022646","display":"Kidney"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002574"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0041470"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007085"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1679-5191"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7203"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"KIDN"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s6100"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s6100"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002584"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85072254"},{"system":"http://loinc.org","code":"LP7380-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D007668"},{"system":"http://ncimeta.nci.nih.gov","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046325"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12415"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000004"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"U000107"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"27360"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N500"},{"system":"http://snomed.info/sct","code":"T-71000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-71000"},{"system":"http://snomed.info/sct/731000124108","code":"64033007"},{"system":"http://www.nlm.nih.gov/research/umls/ult","code":"269"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7203"}],"text":"kidney"}]}},{"fullUrl":"List/1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe","resource":{"resourceType":"List","id":"1d5dcbe4-7206-4a27-b3a8-52e4d30dacfe","status":"current","mode":"snapshot","title":"Surgical History","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Procedure/f92472c0-9e90-4b74-8c51-0aa9882645ae","type":"Procedure","display":"Cardiac stent"}},{"item":{"reference":"Procedure/376dee02-e507-4e65-9bb6-802e8fb81905","type":"Procedure","display":"hystarectomy"}},{"item":{"reference":"Procedure/d055da89-5dac-4eb3-a1ec-47b368ace8c3","type":"Procedure","display":"stone retrieval"}}]}},{"fullUrl":"Condition/b42befa0-2949-4ed8-a418-075252ecb31f","resource":{"resourceType":"Condition","id":"b42befa0-2949-4ed8-a418-075252ecb31f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1396},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1956346","display":"Coronary Artery Disease"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005327"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00010"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0037465"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-3397"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CORONARY ART DIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000871"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001677"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I25.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU019520"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K76003"},{"system":"http://loinc.org","code":"LP90122-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10011078"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"35988"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1276"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003324"},{"system":"http://ncimeta.nci.nih.gov","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C26732"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000439400"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002067"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE2uV"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-13000"},{"system":"http://snomed.info/sct/731000124108","code":"414024009"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0426"}],"text":"CAD"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":1439},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0226032","display":"Anterior descending branch of left coronary artery"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000021990"},{"system":"http://www.ama-assn.org/go/cpt","code":"LD"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"3862"},{"system":"http://www.nlm.nih.gov/research/umls/hcpcs","code":"LD"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000482"},{"system":"http://ncimeta.nci.nih.gov","code":"C32089"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C32089"},{"system":"http://snomed.info/sct","code":"T-43110"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-43110"},{"system":"http://snomed.info/sct/731000124108","code":"59438005"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"3862"}],"text":"LAD"}],"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/beb71351-99e3-4fe3-ac44-132dcc9f4d78","resource":{"resourceType":"Condition","id":"beb71351-99e3-4fe3-ac44-132dcc9f4d78","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1541},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0149721","display":"Left Ventricular Hypertrophy"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1003974"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000016665"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000407"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004374"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001712"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K84039"},{"system":"http://loinc.org","code":"LP156346-1"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10049773"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"38318"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017379"},{"system":"http://ncimeta.nci.nih.gov","code":"C50631"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1949"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU011914"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X776j"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-16172"},{"system":"http://snomed.info/sct/731000124108","code":"55827005"}],"text":"LVH"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/9c19cb96-cd62-4a16-a9a0-11706e5abe5e","resource":{"resourceType":"Condition","id":"9c19cb96-cd62-4a16-a9a0-11706e5abe5e","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1567},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0020473","display":"Hyperlipidemia"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005732"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00109"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1006712"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000006419"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"395"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1744-2444"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"HYPERLIPEM"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002027"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0003077"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"E78.5"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"E78.5"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"E78.5"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"E78.5"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"E78.5"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU036253"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"T93008"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002308"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85063704"},{"system":"http://loinc.org","code":"LP266259-3"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10062060"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4277"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006949"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"272.4"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"02489"},{"system":"http://ncimeta.nci.nih.gov","code":"C34707"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C34707"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002043"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X40Wy"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"X40Wy"},{"system":"http://snomed.info/sct/900000000000207008","code":"D6-60010"},{"system":"http://snomed.info/sct/731000124108","code":"55822004"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0820"}],"text":"Hyperlipidemia"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/fd2978f9-471c-4408-819b-f0b9ee848d2c","resource":{"resourceType":"Condition","id":"fd2978f9-471c-4408-819b-f0b9ee848d2c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1586},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0020538","display":"Hypertensive disease"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000023317"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00001"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017493"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"7.1"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000015800"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"397"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0571-5243"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"HYPERTENS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002034"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000822"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"I10-I15.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"I10-I15.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I10"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"997.91"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU035456"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K85004"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002317"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85063723"},{"system":"http://loinc.org","code":"LA14293-7"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10020772"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"33288"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"34"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006973"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"005"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"997.91"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00905"},{"system":"http://ncimeta.nci.nih.gov","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13785"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1908"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000458091"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3117"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"060808"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002068"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_11000.06"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686951"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"23830"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0Ub"},{"system":"http://snomed.info/sct","code":"F-70700"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-02000"},{"system":"http://snomed.info/sct/731000124108","code":"38341003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0210"}],"text":"HTN"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/173a4d80-fe7b-4162-bc21-c71f4ae86dea","resource":{"resourceType":"Condition","id":"173a4d80-fe7b-4162-bc21-c71f4ae86dea","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1594},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0011860","display":"Diabetes Mellitus, Non-Insulin-Dependent"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00336"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0045504"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"END005"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"END005"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003837"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000225"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0862-7250"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000472"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0005978"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"E11"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"E11"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"E11"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"T90"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU022755"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"T90007"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85092226"},{"system":"http://loinc.org","code":"LA10552-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10067585"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30480"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5930"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003924"},{"system":"http://ncimeta.nci.nih.gov","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C26747"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047504"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X40J5"},{"system":"http://snomed.info/sct","code":"D-241Y"},{"system":"http://snomed.info/sct/900000000000207008","code":"DB-61030"},{"system":"http://snomed.info/sct/731000124108","code":"44054006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0371"}],"text":"DM 2"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/d61038c0-b579-4a89-a292-417798dfdba4","resource":{"resourceType":"Condition","id":"d61038c0-b579-4a89-a292-417798dfdba4","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1627},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0004096","display":"Asthma"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005951"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00009"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017373"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"8.3"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"RSP009"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"RSP009"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001541"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"080"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1525-2157"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ASTHMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000273"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002099"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"J45.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"J45.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"J45"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"493"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R96"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R96"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU008836"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R96001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000405"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85008860"},{"system":"http://loinc.org","code":"MTHU020815"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10003553"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"32881"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001249"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"493.9"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01919"},{"system":"http://ncimeta.nci.nih.gov","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1726"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000440101"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C28397"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU003537"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"04190"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"R0121533"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"H33.."},{"system":"http://snomed.info/sct","code":"D-4790"},{"system":"http://snomed.info/sct/900000000000207008","code":"D2-51000"},{"system":"http://snomed.info/sct/731000124108","code":"195967001"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1367"}],"text":"Asthma"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/5c02b389-3f56-4680-a2d5-e0bdd386d38d","resource":{"resourceType":"Condition","id":"5c02b389-3f56-4680-a2d5-e0bdd386d38d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1634},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024117","display":"Chronic Obstructive Airway Disease"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005461"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00031"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0059967"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"8.2.2"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007570"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"184"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4004-0004"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000363"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0006510"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"J44.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"J44.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"J44.9"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R95"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU053770"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R95009"},{"system":"http://loinc.org","code":"LP90123-8"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10009033"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"34122"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"27"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D029424"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003398"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"496"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"02022"},{"system":"http://ncimeta.nci.nih.gov","code":"C3199"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C3199"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3199"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2237"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3199"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000524193"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU042800"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"H3..."},{"system":"http://snomed.info/sct","code":"D-7651"},{"system":"http://snomed.info/sct/900000000000207008","code":"D2-60000"},{"system":"http://snomed.info/sct/731000124108","code":"13645005"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1493"}],"text":"COPD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/17d2ac39-1b15-44be-baee-f145745123e4","resource":{"resourceType":"Condition","id":"17d2ac39-1b15-44be-baee-f145745123e4","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1643},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0017168","display":"Gastroesophageal reflux disease"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00251"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1001976"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005382"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"GI DIS"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002020"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"K21"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"K21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"K21"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"K21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"K21.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"530.81"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU063996"},{"system":"http://loinc.org","code":"LP100601-6"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10017885"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"38250"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"512"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005764"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"530.81"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT160014"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01172"},{"system":"http://ncimeta.nci.nih.gov","code":"C26781"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10739"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C26781"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C26781"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C26781"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C26781"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU001906"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000737473"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X3003"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"X3003"},{"system":"http://snomed.info/sct","code":"F-61340"},{"system":"http://snomed.info/sct/900000000000207008","code":"D5-30140"},{"system":"http://snomed.info/sct/731000124108","code":"235595009"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1149"}],"text":"GERD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/acfa27bf-1135-4a9c-835f-b30588b00803","resource":{"resourceType":"Condition","id":"acfa27bf-1135-4a9c-835f-b30588b00803","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1656},{"url":"length","valueInteger":22}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0162316","display":"Iron deficiency anemia"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005902"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00294"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017779"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"4.1.3.1"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000017791"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"428"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0427-2389"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ANEMIA IRON DEFIC"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000099"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001891"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"D50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"D50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"D50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"D50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"D50.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"280.9"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"B80"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"B80"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU021534"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"B80002"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85068186"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10022972"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30322"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"139"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D018798"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"280.9"},{"system":"http://hl7.org/fhir/sid/mthicpc2eae","code":"B80"},{"system":"http://hl7.org/fhir/sid/mthicpc2icd10ae","code":"MTHU037482"},{"system":"http://ncimeta.nci.nih.gov","code":"C84484"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C84484"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C84484"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU036458"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"R0121654"},{"system":"http://www.nlm.nih.gov/research/umls/ram","code":"U000082"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE13c"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE13c"},{"system":"http://snomed.info/sct","code":"D-4072"},{"system":"http://snomed.info/sct/900000000000207008","code":"DC-13010"},{"system":"http://snomed.info/sct/731000124108","code":"87522002"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0553"}],"text":"iron deficiency anemia"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Observation/fffb2e79-8ceb-40a8-be04-a21de4609649","resource":{"resourceType":"Observation","id":"fffb2e79-8ceb-40a8-be04-a21de4609649","extension":[{"extension":[{"url":"offset","valueInteger":1448},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700321","display":"Small"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044733"},{"system":"http://loinc.org","code":"LA8983-4"},{"system":"http://ncimeta.nci.nih.gov","code":"C25376"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C25376"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25376"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X7919"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-A217"},{"system":"http://snomed.info/sct/731000124108","code":"255507004"}],"text":"small"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"valueQuantity":{"value":50,"unit":"%"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":1454},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"D2"}}},{"fullUrl":"Observation/8fa5bdd2-c1d2-4566-9426-c0d2496576d6","resource":{"resourceType":"Observation","id":"8fa5bdd2-c1d2-4566-9426-c0d2496576d6","extension":[{"extension":[{"url":"offset","valueInteger":1474},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0549177","display":"Large"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"U000601"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000038944"},{"system":"http://loinc.org","code":"LA8981-8"},{"system":"http://ncimeta.nci.nih.gov","code":"C49508"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C49508"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X791B"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-A216"},{"system":"http://snomed.info/sct/731000124108","code":"255509001"}],"text":"large"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"valueRange":{"low":{"value":30,"comparator":">=","unit":"%"},"high":{"value":40,"comparator":"<=","unit":"%"}},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":1462},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1261316","display":"Right coronary artery structure"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000056439"},{"system":"http://www.ama-assn.org/go/cpt","code":"RC"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1398-9631"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"50039"},{"system":"http://www.nlm.nih.gov/research/umls/hcpcs","code":"RC"},{"system":"http://ncimeta.nci.nih.gov","code":"C12875"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12875"},{"system":"http://snomed.info/sct","code":"T-43200"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-43200"},{"system":"http://snomed.info/sct/731000124108","code":"13647002"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"50039"}],"text":"RCA"}}},{"fullUrl":"Condition/5d4ba796-9697-4c60-8f90-b63793733336","resource":{"resourceType":"Condition","id":"5d4ba796-9697-4c60-8f90-b63793733336","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1518},{"url":"length","valueInteger":21}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0520863","display":"Diastolic dysfunction"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000320"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037795"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10052337"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"276344"},{"system":"http://ncimeta.nci.nih.gov","code":"C79547"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-32012"},{"system":"http://snomed.info/sct/731000124108","code":"3545003"}],"text":"diastolic dysfunction"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f","resource":{"resourceType":"Condition","id":"16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":1551},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"severity":{"extension":[{"extension":[{"url":"offset","valueInteger":1546},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://snomed.info/sct","code":"255604002","display":"Mild"}],"text":"mild"},"code":{"text":"LA dilation"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Observation/e129a075-d004-484b-84ca-3244a2aab4fd","resource":{"resourceType":"Observation","id":"e129a075-d004-484b-84ca-3244a2aab4fd","extension":[{"extension":[{"url":"offset","valueInteger":1403},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"text":"Left heart cath"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"effectiveDateTime":"2005","interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/b1e27b84-c819-4db9-b134-f7dbc82cf3c2","resource":{"resourceType":"Observation","id":"b1e27b84-c819-4db9-b134-f7dbc82cf3c2","extension":[{"extension":[{"url":"offset","valueInteger":1489},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0430462","display":"Transthoracic echocardiography"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000034101"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10053368"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"323994"},{"system":"http://ncimeta.nci.nih.gov","code":"C80404"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C80404"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000759349"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X77c2"},{"system":"http://snomed.info/sct/731000124108","code":"433236007"}],"text":"TTE"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"effectiveDateTime":"2006","interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/78a6df46-a421-4f84-b627-0749762e47e5","resource":{"resourceType":"Observation","id":"78a6df46-a421-4f84-b627-0749762e47e5","extension":[{"extension":[{"url":"offset","valueInteger":1501},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0428772","display":"Left ventricular ejection fraction"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10069170"},{"system":"http://ncimeta.nci.nih.gov","code":"C99524"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-CVTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C99524"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X776M"},{"system":"http://snomed.info/sct/731000124108","code":"250908004"}],"text":"LVEF"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueRange":{"low":{"value":60,"comparator":">=","unit":"%"},"high":{"value":65,"comparator":"<=","unit":"%"}},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/64ec679e-bb68-4f0a-b285-2128902aff04","resource":{"resourceType":"Observation","id":"64ec679e-bb68-4f0a-b285-2128902aff04","extension":[{"extension":[{"url":"offset","valueInteger":1605},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0474680","display":"Hemoglobin A1c measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037062"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"60231"},{"system":"http://www.ama-assn.org/go/cpt","code":"83036"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"83037"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"6308"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-72982"},{"system":"http://snomed.info/sct/731000124108","code":"43396009"}],"text":"A1c"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"effectiveDateTime":"2005-09","valueQuantity":{"value":6.7},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"List/e0ed81ae-184e-44ce-b45a-2da9cd2eba9c","resource":{"resourceType":"List","id":"e0ed81ae-184e-44ce-b45a-2da9cd2eba9c","status":"current","mode":"snapshot","title":"Medical History","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Condition/b42befa0-2949-4ed8-a418-075252ecb31f","type":"Condition","display":"CAD"}},{"item":{"reference":"Condition/beb71351-99e3-4fe3-ac44-132dcc9f4d78","type":"Condition","display":"LVH"}},{"item":{"reference":"Condition/9c19cb96-cd62-4a16-a9a0-11706e5abe5e","type":"Condition","display":"Hyperlipidemia"}},{"item":{"reference":"Condition/fd2978f9-471c-4408-819b-f0b9ee848d2c","type":"Condition","display":"HTN"}},{"item":{"reference":"Condition/173a4d80-fe7b-4162-bc21-c71f4ae86dea","type":"Condition","display":"DM 2"}},{"item":{"reference":"Condition/d61038c0-b579-4a89-a292-417798dfdba4","type":"Condition","display":"Asthma"}},{"item":{"reference":"Condition/5c02b389-3f56-4680-a2d5-e0bdd386d38d","type":"Condition","display":"COPD"}},{"item":{"reference":"Condition/17d2ac39-1b15-44be-baee-f145745123e4","type":"Condition","display":"GERD"}},{"item":{"reference":"Condition/acfa27bf-1135-4a9c-835f-b30588b00803","type":"Condition","display":"iron deficiency anemia"}},{"item":{"reference":"Observation/fffb2e79-8ceb-40a8-be04-a21de4609649","type":"Observation","display":"small"}},{"item":{"reference":"Observation/8fa5bdd2-c1d2-4566-9426-c0d2496576d6","type":"Observation","display":"large"}},{"item":{"reference":"Condition/5d4ba796-9697-4c60-8f90-b63793733336","type":"Condition","display":"diastolic dysfunction"}},{"item":{"reference":"Condition/16507bda-bfd1-4ac6-b380-b7a3a4a2cd8f","type":"Condition","display":"LA dilation"}},{"item":{"reference":"Observation/e129a075-d004-484b-84ca-3244a2aab4fd","type":"Observation","display":"Left heart cath"}},{"item":{"reference":"Observation/b1e27b84-c819-4db9-b134-f7dbc82cf3c2","type":"Observation","display":"TTE"}},{"item":{"reference":"Observation/78a6df46-a421-4f84-b627-0749762e47e5","type":"Observation","display":"LVEF"}},{"item":{"reference":"Observation/64ec679e-bb68-4f0a-b285-2128902aff04","type":"Observation","display":"A1c"}}]}},{"fullUrl":"FamilyMemberHistory/db83c46f-b9d2-492d-a10c-80b3518087fb","resource":{"resourceType":"FamilyMemberHistory","id":"db83c46f-b9d2-492d-a10c-80b3518087fb","extension":[{"extension":[{"url":"offset","valueInteger":1995},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":1991},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Dad"},"deceasedBoolean":true}},{"fullUrl":"FamilyMemberHistory/59139311-df79-467c-9c47-c767e5769364","resource":{"resourceType":"FamilyMemberHistory","id":"59139311-df79-467c-9c47-c767e5769364","extension":[{"extension":[{"url":"offset","valueInteger":1995},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2030},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0026591","display":"Mother (person)"}],"text":"mom"},"deceasedBoolean":true}},{"fullUrl":"FamilyMemberHistory/b8cefdb1-79b4-4bbd-a18a-274f3831205d","resource":{"resourceType":"FamilyMemberHistory","id":"b8cefdb1-79b4-4bbd-a18a-274f3831205d","extension":[{"extension":[{"url":"offset","valueInteger":2003},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":1991},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Dad"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0023890","display":"Liver Cirrhosis"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005672"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00223"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015140"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003005"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"186"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1754-7664"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"LIVER CIRRHO"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000764"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001394"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"K74.60"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU016850"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D97005"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006359"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85077754"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10019641"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30052"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"190"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008103"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT240030"},{"system":"http://ncimeta.nci.nih.gov","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045478"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU018550"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"09260"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X307L"},{"system":"http://snomed.info/sct/900000000000207008","code":"D5-80600"},{"system":"http://snomed.info/sct/731000124108","code":"19943007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0347"}],"text":"liver cirrhosis"}}]}},{"fullUrl":"FamilyMemberHistory/1c54eba0-5e0d-4a0d-95b3-bd904a3a4151","resource":{"resourceType":"FamilyMemberHistory","id":"1c54eba0-5e0d-4a0d-95b3-bd904a3a4151","extension":[{"extension":[{"url":"offset","valueInteger":2003},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2030},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0026591","display":"Mother (person)"}],"text":"mom"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0023890","display":"Liver Cirrhosis"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005672"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00223"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015140"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003005"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"186"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1754-7664"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"LIVER CIRRHO"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000764"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001394"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"K74.60"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU016850"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D97005"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006359"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85077754"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10019641"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30052"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"190"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008103"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT240030"},{"system":"http://ncimeta.nci.nih.gov","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045478"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2951"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU018550"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"09260"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X307L"},{"system":"http://snomed.info/sct/900000000000207008","code":"D5-80600"},{"system":"http://snomed.info/sct/731000124108","code":"19943007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0347"}],"text":"liver cirrhosis"}}]}},{"fullUrl":"FamilyMemberHistory/d9be7fe0-1301-4f61-8d0c-6d6f834098dc","resource":{"resourceType":"FamilyMemberHistory","id":"d9be7fe0-1301-4f61-8d0c-6d6f834098dc","extension":[{"extension":[{"url":"offset","valueInteger":2034},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":1991},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Dad"},"deceasedBoolean":true}},{"fullUrl":"FamilyMemberHistory/4a099ce3-6a5d-4b08-bb90-f548971437b9","resource":{"resourceType":"FamilyMemberHistory","id":"4a099ce3-6a5d-4b08-bb90-f548971437b9","extension":[{"extension":[{"url":"offset","valueInteger":2034},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2030},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0026591","display":"Mother (person)"}],"text":"mom"},"deceasedBoolean":true}},{"fullUrl":"FamilyMemberHistory/b849a150-496b-49bb-ba1b-20253133f297","resource":{"resourceType":"FamilyMemberHistory","id":"b849a150-496b-49bb-ba1b-20253133f297","extension":[{"extension":[{"url":"offset","valueInteger":2042},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":1991},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Dad"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027051","display":"Myocardial Infarction"},{"system":"http://www.nlm.nih.gov/research/umls/air","code":"MYCNF"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005332"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00102"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1018028"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008423"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"505"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-3417"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"INFARCT MYOCARD"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001658"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I21"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU037952"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K75013"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85059683"},{"system":"http://loinc.org","code":"LP98884-7"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10028596"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"353001"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009203"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"410.9"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01329"},{"system":"http://ncimeta.nci.nih.gov","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10152"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1969"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU008101"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"32820"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X200E"},{"system":"http://snomed.info/sct","code":"M-54700"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-15000"},{"system":"http://snomed.info/sct/731000124108","code":"22298006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0428"}],"text":"heart attack"}}]}},{"fullUrl":"FamilyMemberHistory/15f890cb-810d-4a4d-9f08-61443e912795","resource":{"resourceType":"FamilyMemberHistory","id":"15f890cb-810d-4a4d-9f08-61443e912795","extension":[{"extension":[{"url":"offset","valueInteger":2042},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2030},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0026591","display":"Mother (person)"}],"text":"mom"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027051","display":"Myocardial Infarction"},{"system":"http://www.nlm.nih.gov/research/umls/air","code":"MYCNF"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005332"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00102"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1018028"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008423"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"505"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-3417"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"INFARCT MYOCARD"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001658"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I21"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU037952"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K75013"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85059683"},{"system":"http://loinc.org","code":"LP98884-7"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10028596"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"353001"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009203"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"410.9"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01329"},{"system":"http://ncimeta.nci.nih.gov","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10152"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1969"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C27996"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU008101"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"32820"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X200E"},{"system":"http://snomed.info/sct","code":"M-54700"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-15000"},{"system":"http://snomed.info/sct/731000124108","code":"22298006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0428"}],"text":"heart attack"}}]}},{"fullUrl":"FamilyMemberHistory/39d8cf44-3604-473b-996d-54576f9c91d1","resource":{"resourceType":"FamilyMemberHistory","id":"39d8cf44-3604-473b-996d-54576f9c91d1","extension":[{"extension":[{"url":"offset","valueInteger":2094},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2076},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0037047","display":"Sibling"}],"text":"siblings"},"deceasedBoolean":true}},{"fullUrl":"FamilyMemberHistory/a784b752-2414-4bef-a741-5b10e7358864","resource":{"resourceType":"FamilyMemberHistory","id":"a784b752-2414-4bef-a741-5b10e7358864","extension":[{"extension":[{"url":"offset","valueInteger":2102},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2076},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0037047","display":"Sibling"}],"text":"siblings"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0018799","display":"Heart Diseases"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000023339"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0046242"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"7.2"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005875"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000028"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-3247"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CARDIOVASC DIS"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"I51.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"I51.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"I51.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"429.9"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU019359"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K84009"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85059651"},{"system":"http://loinc.org","code":"LA10523-1"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10061024"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"33161"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"277"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006331"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"429.9"},{"system":"http://ncimeta.nci.nih.gov","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cellosaurus","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"4454"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3079"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"22480"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X2003"},{"system":"http://snomed.info/sct","code":"D-7030"},{"system":"http://snomed.info/sct/900000000000207008","code":"D3-10000"},{"system":"http://snomed.info/sct/731000124108","code":"56265001"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0504"}],"text":"cardiac disease"}}]}},{"fullUrl":"FamilyMemberHistory/0041b176-c842-4d40-800a-f25fc51e10d6","resource":{"resourceType":"FamilyMemberHistory","id":"0041b176-c842-4d40-800a-f25fc51e10d6","extension":[{"extension":[{"url":"offset","valueInteger":2149},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"relationship":{"extension":[{"extension":[{"url":"offset","valueInteger":2131},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015576","display":"Family"}],"text":"family"},"condition":[{"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0006826","display":"Malignant Neoplasms"},{"system":"http://www.nlm.nih.gov/research/umls/air","code":"MALIG"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000023015"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00731"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1001968"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"2.13"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002337"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"465"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2000-0173"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CARCINOMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000537"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002664"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"C80"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"M8000/3"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"C80.1"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"199"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A79"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU077094"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A79001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006339"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85019492"},{"system":"http://loinc.org","code":"LA25513-5"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10028997"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"99725"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"25"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009369"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"199.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01968"},{"system":"http://ncimeta.nci.nih.gov","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"3262"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045333"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C9305"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU070317"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041060"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"29280"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X78ef"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"X78ef"},{"system":"http://snomed.info/sct","code":"M-8000/3"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-80003"},{"system":"http://snomed.info/sct/731000124108","code":"363346000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1345"}],"text":"cancer"}}]}},{"fullUrl":"List/22ec7727-c4ca-4477-a42b-51d34a935da6","resource":{"resourceType":"List","id":"22ec7727-c4ca-4477-a42b-51d34a935da6","status":"current","mode":"snapshot","title":"Family History","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"FamilyMemberHistory/db83c46f-b9d2-492d-a10c-80b3518087fb","type":"FamilyMemberHistory","display":""}},{"item":{"reference":"FamilyMemberHistory/59139311-df79-467c-9c47-c767e5769364","type":"FamilyMemberHistory","display":""}},{"item":{"reference":"FamilyMemberHistory/b8cefdb1-79b4-4bbd-a18a-274f3831205d","type":"FamilyMemberHistory","display":"liver cirrhosis"}},{"item":{"reference":"FamilyMemberHistory/1c54eba0-5e0d-4a0d-95b3-bd904a3a4151","type":"FamilyMemberHistory","display":"liver cirrhosis"}},{"item":{"reference":"FamilyMemberHistory/d9be7fe0-1301-4f61-8d0c-6d6f834098dc","type":"FamilyMemberHistory","display":""}},{"item":{"reference":"FamilyMemberHistory/4a099ce3-6a5d-4b08-bb90-f548971437b9","type":"FamilyMemberHistory","display":""}},{"item":{"reference":"FamilyMemberHistory/b849a150-496b-49bb-ba1b-20253133f297","type":"FamilyMemberHistory","display":"heart attack"}},{"item":{"reference":"FamilyMemberHistory/15f890cb-810d-4a4d-9f08-61443e912795","type":"FamilyMemberHistory","display":"heart attack"}},{"item":{"reference":"FamilyMemberHistory/39d8cf44-3604-473b-996d-54576f9c91d1","type":"FamilyMemberHistory","display":""}},{"item":{"reference":"FamilyMemberHistory/a784b752-2414-4bef-a741-5b10e7358864","type":"FamilyMemberHistory","display":"cardiac disease"}},{"item":{"reference":"FamilyMemberHistory/0041b176-c842-4d40-800a-f25fc51e10d6","type":"FamilyMemberHistory","display":"cancer"}}]}},{"fullUrl":"AllergyIntolerance/fa04ef10-13ef-4c01-88e4-077eb0d97610","resource":{"resourceType":"AllergyIntolerance","id":"fa04ef10-13ef-4c01-88e4-077eb0d97610","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"]},"extension":[{"extension":[{"url":"offset","valueInteger":2172},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"active","display":"Active"}],"text":"Active"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0599503","display":"Sulfonamide Anti-Infective Agents"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000020188"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0036579"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000042025"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2832-5379"},{"system":"http://loinc.org","code":"LP16283-1"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40345"},{"system":"http://ncimeta.nci.nih.gov","code":"C29739"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000367474"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01IA"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"x01IA"},{"system":"http://snomed.info/sct","code":"E-7170"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-55900"},{"system":"http://snomed.info/sct/731000124108","code":"59255006"}],"text":"Sulfa drugs"},"patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"reaction":[{"manifestation":[{"extension":[{"extension":[{"url":"offset","valueInteger":2186},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rash"}]}]}},{"fullUrl":"AllergyIntolerance/e599fa16-c9ee-4ebf-a934-4520ac23745c","resource":{"resourceType":"AllergyIntolerance","id":"e599fa16-c9ee-4ebf-a934-4520ac23745c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"]},"extension":[{"extension":[{"url":"offset","valueInteger":2193},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"active","display":"Active"}],"text":"Active"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0701042","display":"Cipro"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044930"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"5004-0016"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"112"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002939"},{"system":"http://ncimeta.nci.nih.gov","code":"C375"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000354472"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000040784"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203563"}],"text":"Cipro"},"patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"reaction":[{"manifestation":[{"extension":[{"extension":[{"url":"offset","valueInteger":2201},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rash"}]}]}},{"fullUrl":"AllergyIntolerance/945e5c10-ada6-464e-8985-dbdf540d3160","resource":{"resourceType":"AllergyIntolerance","id":"945e5c10-ada6-464e-8985-dbdf540d3160","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"]},"extension":[{"extension":[{"url":"offset","valueInteger":2208},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"active","display":"Active"}],"text":"Active"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700899","display":"Benadryl"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044903"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"899"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004155"},{"system":"http://ncimeta.nci.nih.gov","code":"C300"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0033299"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000039163"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"05760"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203457"}],"text":"Benadryl"},"patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"reaction":[{"manifestation":[{"extension":[{"extension":[{"url":"offset","valueInteger":2231},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0541919","display":"Dystonic reaction"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0058133"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000038540"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSTONIA"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013986"}],"text":"dystonic reaction"}]}]}},{"fullUrl":"List/ef6382f6-5089-4eda-9145-d44be736d451","resource":{"resourceType":"List","id":"ef6382f6-5089-4eda-9145-d44be736d451","status":"current","mode":"snapshot","title":"Allergies","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"AllergyIntolerance/fa04ef10-13ef-4c01-88e4-077eb0d97610","type":"AllergyIntolerance","display":"Sulfa drugs"}},{"item":{"reference":"AllergyIntolerance/e599fa16-c9ee-4ebf-a934-4520ac23745c","type":"AllergyIntolerance","display":"Cipro"}},{"item":{"reference":"AllergyIntolerance/945e5c10-ada6-464e-8985-dbdf540d3160","type":"AllergyIntolerance","display":"Benadryl"}}]}},{"fullUrl":"MedicationStatement/0696ae07-5bb9-41c1-88d8-742cadc02a77","resource":{"resourceType":"MedicationStatement","id":"0696ae07-5bb9-41c1-88d8-742cadc02a77","extension":[{"extension":[{"url":"offset","valueInteger":2268},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"Theophyline"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"600 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":600,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/1896181a-2e1c-4d04-a301-15bd59774671","resource":{"resourceType":"MedicationStatement","id":"1896181a-2e1c-4d04-a301-15bd59774671","extension":[{"extension":[{"url":"offset","valueInteger":2281},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700814","display":"Uniphyl"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044888"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"3344"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D013806"},{"system":"http://ncimeta.nci.nih.gov","code":"C872"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041340"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203377"}],"text":"Uniphyl"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"600 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":600,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/94b47859-467e-413b-a235-37e2e97081e2","resource":{"resourceType":"MedicationStatement","id":"94b47859-467e-413b-a235-37e2e97081e2","extension":[{"extension":[{"url":"offset","valueInteger":2303},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0006280","display":"Bronchodilator Agents"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000019284"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002190"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2599-2967"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000693"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85017084"},{"system":"http://loinc.org","code":"LP31460-6"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41468"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001993"},{"system":"http://ncimeta.nci.nih.gov","code":"C319"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000476099"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C319"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7kI"},{"system":"http://snomed.info/sct/731000124108","code":"353866001"}],"text":"bronchodilator"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/da88a9d9-cebc-4c35-b759-a64405a0030a","resource":{"resourceType":"MedicationStatement","id":"da88a9d9-cebc-4c35-b759-a64405a0030a","extension":[{"extension":[{"url":"offset","valueInteger":2332},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001455","display":"cyclic AMP"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000029018"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000721"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2502-9637"},{"system":"http://loinc.org","code":"LP15327-7"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000242"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"E0399OZS9N"},{"system":"http://ncimeta.nci.nih.gov","code":"C208"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C208"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"00446"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0094017"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"E0399OZS9N"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"12875"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X80N5"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"1314330"},{"system":"http://snomed.info/sct","code":"F-15910"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-65980"},{"system":"http://snomed.info/sct/731000124108","code":"84835006"}],"text":"cAMP"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/91c26c2a-1ca6-4784-968e-e7cecebe7aa0","resource":{"resourceType":"MedicationStatement","id":"91c26c2a-1ca6-4784-968e-e7cecebe7aa0","extension":[{"extension":[{"url":"offset","valueInteger":2366},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0012373","display":"diltiazem"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000020881"},{"system":"http://www.whocc.no/atc","code":"C08DB01"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003959"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0314-7897"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00343"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4148"},{"system":"http://loinc.org","code":"LP17238-4"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"197220"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00045"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004110"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"EE92BBP03H"},{"system":"http://ncimeta.nci.nih.gov","code":"C61725"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"30307"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"EE92BBP03H"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004514"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01CU"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"3443"},{"system":"http://snomed.info/sct","code":"E-7719"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-803A0"},{"system":"http://snomed.info/sct/731000124108","code":"372793000"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU000928"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019722"}],"text":"Diltiazem"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"300 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":300,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/ed4fe972-3cf5-428d-9e45-792eb0c66d36","resource":{"resourceType":"MedicationStatement","id":"ed4fe972-3cf5-428d-9e45-792eb0c66d36","extension":[{"extension":[{"url":"offset","valueInteger":2389},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0006684","display":"Calcium Channel Blockers"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000019255"},{"system":"http://www.whocc.no/atc","code":"C08"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002294"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0530-2776"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85018769"},{"system":"http://loinc.org","code":"LP31438-2"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40586"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002121"},{"system":"http://ncimeta.nci.nih.gov","code":"C333"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C333"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C333"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07250"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x001i"},{"system":"http://snomed.info/sct","code":"E-7716"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80160"},{"system":"http://snomed.info/sct/731000124108","code":"373304005"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021566"}],"text":"Ca channel blocker"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/b85f49ef-0f04-4f3a-a914-bb0b9a3aa799","resource":{"resourceType":"MedicationStatement","id":"b85f49ef-0f04-4f3a-a914-bb0b9a3aa799","extension":[{"extension":[{"url":"offset","valueInteger":2439},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"Simvistatin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"20 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":20,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/2a086b6f-8266-43f7-911b-3bd0f04975f0","resource":{"resourceType":"MedicationStatement","id":"2a086b6f-8266-43f7-911b-3bd0f04975f0","extension":[{"extension":[{"url":"offset","valueInteger":2452},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0678181","display":"Zocor"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000042766"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"5001-0024"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"1546"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D019821"},{"system":"http://ncimeta.nci.nih.gov","code":"C29454"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000455226"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x03d7"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"196503"}],"text":"Zocor"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"20 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":20,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/5b20883f-b21a-4e6c-83bd-d88d1503d31c","resource":{"resourceType":"MedicationStatement","id":"5b20883f-b21a-4e6c-83bd-d88d1503d31c","extension":[{"extension":[{"url":"offset","valueInteger":2470},{"url":"length","valueInteger":25}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"HMGCo Reductase inhibitor"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/11912426-8c67-4987-8653-cd6875ae966e","resource":{"resourceType":"MedicationStatement","id":"11912426-8c67-4987-8653-cd6875ae966e","extension":[{"extension":[{"url":"offset","valueInteger":2523},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0072973","display":"ramipril"},{"system":"http://www.whocc.no/atc","code":"C09AA05"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000014736"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00178"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"2347"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh2001004824"},{"system":"http://loinc.org","code":"LP171634-1"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"48822"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00728"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017257"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"L35JN3I7SJ"},{"system":"http://ncimeta.nci.nih.gov","code":"C29411"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C29411"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"32054"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"L35JN3I7SJ"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"003585"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686948"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bi6.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"35296"},{"system":"http://snomed.info/sct/731000124108","code":"386872004"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m73030"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001035"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019562"}],"text":"Ramipril"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"10 mg","timing":{"repeat":{"frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"BID"}},"doseAndRate":[{"doseQuantity":{"value":10,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/fed47e52-7ce4-4e79-a2c1-2944e811fbb5","resource":{"resourceType":"MedicationStatement","id":"fed47e52-7ce4-4e79-a2c1-2944e811fbb5","extension":[{"extension":[{"url":"offset","valueInteger":2533},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0878061","display":"Altace"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000045298"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"315"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017257"},{"system":"http://ncimeta.nci.nih.gov","code":"C29411"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686948"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02tS"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"262418"}],"text":"Altace"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"10 mg","timing":{"repeat":{"frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"BID"}},"doseAndRate":[{"doseQuantity":{"value":10,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/ef37d1da-0981-4096-83d8-82393c9d53f4","resource":{"resourceType":"MedicationStatement","id":"ef37d1da-0981-4096-83d8-82393c9d53f4","extension":[{"extension":[{"url":"offset","valueInteger":2553},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0003015","display":"Angiotensin-Converting Enzyme Inhibitors"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0063008"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001185"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1037-0850"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005040"},{"system":"http://loinc.org","code":"LP31444-0"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41889"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000806"},{"system":"http://ncimeta.nci.nih.gov","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000335481"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bi..."},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80150"},{"system":"http://snomed.info/sct/731000124108","code":"372733002"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001019"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021577"}],"text":"ACEI"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/800f5220-c18e-46d7-b580-949ec90e6c76","resource":{"resourceType":"MedicationStatement","id":"800f5220-c18e-46d7-b580-949ec90e6c76","extension":[{"extension":[{"url":"offset","valueInteger":2620},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0017642","display":"glipizide"},{"system":"http://www.whocc.no/atc","code":"A10BB07"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005526"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4001-0060"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB01067"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"588"},{"system":"http://loinc.org","code":"LP14719-6"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41884"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"4783"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005913"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"X7WDT95N5C"},{"system":"http://ncimeta.nci.nih.gov","code":"C29074"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"X7WDT95N5C"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"000913"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000775361"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"f36.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"4821"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-A2430"},{"system":"http://snomed.info/sct/731000124108","code":"387143009"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m35030"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU000833"},{"system":"http://hl7.org/fhir/ndfrt","code":"4018508"}],"text":"Glipizide"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"5 mg","timing":{"repeat":{"frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"BID"}},"doseAndRate":[{"doseQuantity":{"value":5,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/3b1cf1c9-edc0-4937-8994-db7965d87aee","resource":{"resourceType":"MedicationStatement","id":"3b1cf1c9-edc0-4937-8994-db7965d87aee","extension":[{"extension":[{"url":"offset","valueInteger":2652},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038766","display":"Sulfonylurea Compounds"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000019645"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011871"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2841-3410"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh2007001704"},{"system":"http://loinc.org","code":"LP18787-9"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"194714"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D013453"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM0lF"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XM0lF"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-A2400"},{"system":"http://snomed.info/sct/731000124108","code":"372711004"}],"text":"sulfonylurea"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/39b88099-2ac9-4c27-ab8f-840fa17a216a","resource":{"resourceType":"MedicationStatement","id":"39b88099-2ac9-4c27-ab8f-840fa17a216a","extension":[{"extension":[{"url":"offset","valueInteger":2693},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"Omecprazole"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"20 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"daily"}},"doseAndRate":[{"doseQuantity":{"value":20,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/6d9c9574-a165-4dbe-aa25-1c4f035c3208","resource":{"resourceType":"MedicationStatement","id":"6d9c9574-a165-4dbe-aa25-1c4f035c3208","extension":[{"extension":[{"url":"offset","valueInteger":2706},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700777","display":"Prilosec"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044880"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4007-0093"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"363"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009853"},{"system":"http://ncimeta.nci.nih.gov","code":"C716"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000042309"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"203345"}],"text":"Prilosec"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"20 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"daily"}},"doseAndRate":[{"doseQuantity":{"value":20,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/355554d3-c37a-4ac1-b128-eab1b84d5339","resource":{"resourceType":"MedicationStatement","id":"355554d3-c37a-4ac1-b128-eab1b84d5339","extension":[{"extension":[{"url":"offset","valueInteger":2739},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0358591","display":"Proton Pump Inhibitors"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000031384"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh98006912"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"78902"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D054328"},{"system":"http://ncimeta.nci.nih.gov","code":"C29723"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C29723"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C29723"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C29723"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C29723"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x00A8"},{"system":"http://snomed.info/sct/731000124108","code":"372525000"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001202"}],"text":"PPI"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998","resource":{"resourceType":"MedicationStatement","id":"2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998","extension":[{"extension":[{"url":"offset","valueInteger":2769},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0060926","display":"gabapentin"},{"system":"http://www.whocc.no/atc","code":"N03AX12"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000014062"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"5004-0033"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00996"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"1404"},{"system":"http://loinc.org","code":"LP17989-2"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"45939"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d03182"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000077206"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"6CW7F3G59X"},{"system":"http://ncimeta.nci.nih.gov","code":"C1108"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C1108"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"20519"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"6CW7F3G59X"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045039"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004415"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000038402"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"dnj.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"25480"},{"system":"http://snomed.info/sct/731000124108","code":"386845007"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m34587"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU000260"},{"system":"http://hl7.org/fhir/ndfrt","code":"4020833"}],"text":"Gabapentin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"100 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":100,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/80d36574-127d-4d6e-80e8-3107a09254f0","resource":{"resourceType":"MedicationStatement","id":"80d36574-127d-4d6e-80e8-3107a09254f0","extension":[{"extension":[{"url":"offset","valueInteger":2781},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0678176","display":"Neurontin"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000042761"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"2269"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000077206"},{"system":"http://ncimeta.nci.nih.gov","code":"C1108"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000038402"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02ko"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"196498"}],"text":"Neurontin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"100 mg","timing":{"repeat":{"frequency":1,"period":1,"periodUnit":"d"},"code":{"text":"qhs"}},"doseAndRate":[{"doseQuantity":{"value":100,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/78f6e05d-ad85-4017-981e-bff1ab2b0050","resource":{"resourceType":"MedicationStatement","id":"78f6e05d-ad85-4017-981e-bff1ab2b0050","extension":[{"extension":[{"url":"offset","valueInteger":2826},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027908","display":"Neurotransmitters"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000001930"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008668"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2061-1462"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"302832"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U005833"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85091183"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D018377"},{"system":"http://ncimeta.nci.nih.gov","code":"C687"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000458085"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"33924"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-A0306"},{"system":"http://snomed.info/sct/731000124108","code":"35069000"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"67161"}],"text":"neurotransmitters"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/a61b7774-3f79-4dc7-95bd-e77ecb6c2190","resource":{"resourceType":"MedicationStatement","id":"a61b7774-3f79-4dc7-95bd-e77ecb6c2190","extension":[{"extension":[{"url":"offset","valueInteger":2877},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0025598","display":"metformin"},{"system":"http://www.whocc.no/atc","code":"A10BA02"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008019"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4007-0083"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00331"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4442"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh2007006278"},{"system":"http://loinc.org","code":"LP33332-5"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d03807"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008687"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"9100L32L2N"},{"system":"http://ncimeta.nci.nih.gov","code":"C61612"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C61612"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"9100L32L2N"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000631043"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004534"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01Li"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"6809"},{"system":"http://snomed.info/sct/731000124108","code":"372567009"},{"system":"http://hl7.org/fhir/ndfrt","code":"4023979"}],"text":"Metformin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"500 mg","timing":{"code":{"text":"qam"}},"doseAndRate":[{"doseQuantity":{"value":500,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2","resource":{"resourceType":"MedicationStatement","id":"a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2","extension":[{"extension":[{"url":"offset","valueInteger":2900},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3537187","display":"Biguanide [EPC]"},{"system":"http://www.nlm.nih.gov/research/umls/med-rt","code":"N0000175565"}],"text":"biguanide"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/120e90bd-ed25-4cac-856f-179b5c65170f","resource":{"resourceType":"MedicationStatement","id":"120e90bd-ed25-4cac-856f-179b5c65170f","extension":[{"extension":[{"url":"offset","valueInteger":2935},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0004057","display":"aspirin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000028840"},{"system":"http://www.whocc.no/atc","code":"B01AC06"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0061721"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001530"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2270-2387"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00945"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"181"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000401"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85008731"},{"system":"http://loinc.org","code":"LA26702-3"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40170"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00170"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001241"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000320"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"R16CO5Y76E"},{"system":"http://ncimeta.nci.nih.gov","code":"C287"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C287"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"00739"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0406186"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"R16CO5Y76E"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045176"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"001587"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000039152"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"04050"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02LX"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"1191"},{"system":"http://snomed.info/sct","code":"E-7771"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-60320"},{"system":"http://snomed.info/sct/731000124108","code":"387458008"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m6240"},{"system":"http://hl7.org/fhir/ndfrt","code":"4017536"}],"text":"Aspirin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"81 mg","timing":{"code":{"text":"qam"}},"doseAndRate":[{"doseQuantity":{"value":81,"unit":"mg"}}]}]}},{"fullUrl":"MedicationStatement/0bdc0029-b6bf-4889-b74a-f560f015f0a4","resource":{"resourceType":"MedicationStatement","id":"0bdc0029-b6bf-4889-b74a-f560f015f0a4","extension":[{"extension":[{"url":"offset","valueInteger":2955},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0199176","display":"Prophylactic treatment"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007872"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000019720"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4006-0079"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v3.0","code":"IND03"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A49004"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006559"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10036898"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"344890"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1597"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U002727"},{"system":"http://ncimeta.nci.nih.gov","code":"C15843"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"PROT-SPURPRS"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc-gloss","code":"C15843"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C15843"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C15843"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000439419"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-hl7","code":"C15843"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000572422"},{"system":"http://www.nlm.nih.gov/research/umls/pnds","code":"Im.260"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"40290"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74V4"},{"system":"http://snomed.info/sct/900000000000207008","code":"P2-00120"},{"system":"http://snomed.info/sct/731000124108","code":"169443000"}],"text":"prophylaxis"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/ef9816de-4406-42e4-8256-f0e08e55673a","resource":{"resourceType":"MedicationStatement","id":"ef9816de-4406-42e4-8256-f0e08e55673a","extension":[{"extension":[{"url":"offset","valueInteger":2984},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0082607","display":"fluticasone"},{"system":"http://www.whocc.no/atc","code":"R01AD08"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000015373"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB13867"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d01296"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000068298"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"CUT2W21N7U"},{"system":"http://ncimeta.nci.nih.gov","code":"C61767"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"CUT2W21N7U"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004952"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01NN"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"41126"},{"system":"http://snomed.info/sct/731000124108","code":"397192001"},{"system":"http://hl7.org/fhir/ndfrt","code":"4020529"}],"text":"Fluticasone"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"2 puff","timing":{"repeat":{"frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"bid"}},"doseAndRate":[{"doseQuantity":{"value":2}}]}]}},{"fullUrl":"MedicationStatement/47c9f435-7105-4bf4-a91f-5fe2b1531ddf","resource":{"resourceType":"MedicationStatement","id":"47c9f435-7105-4bf4-a91f-5fe2b1531ddf","extension":[{"extension":[{"url":"offset","valueInteger":2997},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0720466","display":"Flovent"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000045741"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"6201"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000068298"},{"system":"http://ncimeta.nci.nih.gov","code":"C29061"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000682628"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"217152"}],"text":"Flovent"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"2 puff","timing":{"repeat":{"frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"bid"}},"doseAndRate":[{"doseQuantity":{"value":2}}]}]}},{"fullUrl":"MedicationStatement/3b60bc7b-d89a-4217-a156-7e0a4c58a17d","resource":{"resourceType":"MedicationStatement","id":"3b60bc7b-d89a-4217-a156-7e0a4c58a17d","extension":[{"extension":[{"url":"offset","valueInteger":3019},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001617","display":"Adrenal Cortex Hormones"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000018706"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000762"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0059-5614"},{"system":"http://loinc.org","code":"LP31653-6"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4557"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000305"},{"system":"http://ncimeta.nci.nih.gov","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045658"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00990"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x002V"},{"system":"http://snomed.info/sct","code":"E-8510"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-B2400"},{"system":"http://snomed.info/sct/731000124108","code":"21568003"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021625"}],"text":"corticosteroid"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationStatement/f5a42dd7-e1aa-4549-afd4-652408f71ad4","resource":{"resourceType":"MedicationStatement","id":"f5a42dd7-e1aa-4549-afd4-652408f71ad4","extension":[{"extension":[{"url":"offset","valueInteger":3068},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"xoperex"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"1.25mg","doseAndRate":[{"doseQuantity":{"value":1.25}}]}]}},{"fullUrl":"MedicationStatement/09d88421-e13a-483b-b248-69ec48ea62e8","resource":{"resourceType":"MedicationStatement","id":"09d88421-e13a-483b-b248-69ec48ea62e8","extension":[{"extension":[{"url":"offset","valueInteger":3087},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027235","display":"ipratropium"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008455"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00332"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4326"},{"system":"http://loinc.org","code":"LP171404-9"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00265"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009241"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"GR88G0I6UL"},{"system":"http://ncimeta.nci.nih.gov","code":"C61794"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"GR88G0I6UL"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004943"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01Db"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"7213"},{"system":"http://snomed.info/sct/731000124108","code":"372518007"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019791"}],"text":"Ipratropium"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosage":[{"text":"2.5 ml","timing":{"code":{"text":"qam"}},"route":{"extension":[{"extension":[{"url":"offset","valueInteger":3106},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"nebulized"},"doseAndRate":[{"doseQuantity":{"value":2.5,"unit":"ml"}}]}]}},{"fullUrl":"MedicationStatement/576842f8-f7bd-44e1-93f0-a154ae649784","resource":{"resourceType":"MedicationStatement","id":"576842f8-f7bd-44e1-93f0-a154ae649784","extension":[{"extension":[{"url":"offset","valueInteger":3122},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0242896","display":"Anticholinergic Agents"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000028632"},{"system":"http://www.whocc.no/atc","code":"N04A"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000025026"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2059-1068"},{"system":"http://loinc.org","code":"LP31390-5"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41065"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D018680"},{"system":"http://ncimeta.nci.nih.gov","code":"C66880"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"03070"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01DM"},{"system":"http://snomed.info/sct","code":"E-7540"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-67300"},{"system":"http://snomed.info/sct/731000124108","code":"373246003"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU002579"}],"text":"anticholinergic"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"context":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"List/c5490e7d-7447-4f89-8a7d-9871439d55e7","resource":{"resourceType":"List","id":"c5490e7d-7447-4f89-8a7d-9871439d55e7","status":"current","mode":"snapshot","title":"Medications","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"MedicationStatement/0696ae07-5bb9-41c1-88d8-742cadc02a77","type":"MedicationStatement","display":"Theophyline"}},{"item":{"reference":"MedicationStatement/1896181a-2e1c-4d04-a301-15bd59774671","type":"MedicationStatement","display":"Uniphyl"}},{"item":{"reference":"MedicationStatement/94b47859-467e-413b-a235-37e2e97081e2","type":"MedicationStatement","display":"bronchodilator"}},{"item":{"reference":"MedicationStatement/da88a9d9-cebc-4c35-b759-a64405a0030a","type":"MedicationStatement","display":"cAMP"}},{"item":{"reference":"MedicationStatement/91c26c2a-1ca6-4784-968e-e7cecebe7aa0","type":"MedicationStatement","display":"Diltiazem"}},{"item":{"reference":"MedicationStatement/ed4fe972-3cf5-428d-9e45-792eb0c66d36","type":"MedicationStatement","display":"Ca channel blocker"}},{"item":{"reference":"MedicationStatement/b85f49ef-0f04-4f3a-a914-bb0b9a3aa799","type":"MedicationStatement","display":"Simvistatin"}},{"item":{"reference":"MedicationStatement/2a086b6f-8266-43f7-911b-3bd0f04975f0","type":"MedicationStatement","display":"Zocor"}},{"item":{"reference":"MedicationStatement/5b20883f-b21a-4e6c-83bd-d88d1503d31c","type":"MedicationStatement","display":"HMGCo Reductase inhibitor"}},{"item":{"reference":"MedicationStatement/11912426-8c67-4987-8653-cd6875ae966e","type":"MedicationStatement","display":"Ramipril"}},{"item":{"reference":"MedicationStatement/fed47e52-7ce4-4e79-a2c1-2944e811fbb5","type":"MedicationStatement","display":"Altace"}},{"item":{"reference":"MedicationStatement/ef37d1da-0981-4096-83d8-82393c9d53f4","type":"MedicationStatement","display":"ACEI"}},{"item":{"reference":"MedicationStatement/800f5220-c18e-46d7-b580-949ec90e6c76","type":"MedicationStatement","display":"Glipizide"}},{"item":{"reference":"MedicationStatement/3b1cf1c9-edc0-4937-8994-db7965d87aee","type":"MedicationStatement","display":"sulfonylurea"}},{"item":{"reference":"MedicationStatement/39b88099-2ac9-4c27-ab8f-840fa17a216a","type":"MedicationStatement","display":"Omecprazole"}},{"item":{"reference":"MedicationStatement/6d9c9574-a165-4dbe-aa25-1c4f035c3208","type":"MedicationStatement","display":"Prilosec"}},{"item":{"reference":"MedicationStatement/355554d3-c37a-4ac1-b128-eab1b84d5339","type":"MedicationStatement","display":"PPI"}},{"item":{"reference":"MedicationStatement/2aa112cf-cfbd-41c6-a5d9-7fc29e0ed998","type":"MedicationStatement","display":"Gabapentin"}},{"item":{"reference":"MedicationStatement/80d36574-127d-4d6e-80e8-3107a09254f0","type":"MedicationStatement","display":"Neurontin"}},{"item":{"reference":"MedicationStatement/78f6e05d-ad85-4017-981e-bff1ab2b0050","type":"MedicationStatement","display":"neurotransmitters"}},{"item":{"reference":"MedicationStatement/a61b7774-3f79-4dc7-95bd-e77ecb6c2190","type":"MedicationStatement","display":"Metformin"}},{"item":{"reference":"MedicationStatement/a9fec74e-aba2-4ff6-bb25-e7b168ce8bd2","type":"MedicationStatement","display":"biguanide"}},{"item":{"reference":"MedicationStatement/120e90bd-ed25-4cac-856f-179b5c65170f","type":"MedicationStatement","display":"Aspirin"}},{"item":{"reference":"MedicationStatement/0bdc0029-b6bf-4889-b74a-f560f015f0a4","type":"MedicationStatement","display":"prophylaxis"}},{"item":{"reference":"MedicationStatement/ef9816de-4406-42e4-8256-f0e08e55673a","type":"MedicationStatement","display":"Fluticasone"}},{"item":{"reference":"MedicationStatement/47c9f435-7105-4bf4-a91f-5fe2b1531ddf","type":"MedicationStatement","display":"Flovent"}},{"item":{"reference":"MedicationStatement/3b60bc7b-d89a-4217-a156-7e0a4c58a17d","type":"MedicationStatement","display":"corticosteroid"}},{"item":{"reference":"MedicationStatement/f5a42dd7-e1aa-4549-afd4-652408f71ad4","type":"MedicationStatement","display":"xoperex"}},{"item":{"reference":"MedicationStatement/09d88421-e13a-483b-b248-69ec48ea62e8","type":"MedicationStatement","display":"Ipratropium"}},{"item":{"reference":"MedicationStatement/576842f8-f7bd-44e1-93f0-a154ae649784","type":"MedicationStatement","display":"anticholinergic"}}]}},{"fullUrl":"Observation/3e34ed2e-c918-436e-a335-5b6a75fe70aa","resource":{"resourceType":"Observation","id":"3e34ed2e-c918-436e-a335-5b6a75fe70aa","extension":[{"extension":[{"url":"offset","valueInteger":3207},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C2051415","display":"patient appears in no acute distress (physical finding)"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"10024"}],"text":"NAD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/253cebde-c965-442b-87f3-0af428fc5148","resource":{"resourceType":"Observation","id":"253cebde-c965-442b-87f3-0af428fc5148","extension":[{"extension":[{"url":"offset","valueInteger":3231},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0424578","display":"Psychological Well Being"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000033352"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10038430"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A29003"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"200803"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76AV"},{"system":"http://snomed.info/sct","code":"F-90100"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-90001"},{"system":"http://snomed.info/sct/731000124108","code":"17326005"}],"text":"feeling well"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"effectiveTiming":{"repeat":{"duration":1,"durationUnit":"wk"},"code":{"text":"last couple of weeks"}},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Procedure/551e9b17-9ec7-4573-81f0-1814fe19b546","resource":{"resourceType":"Procedure","id":"551e9b17-9ec7-4573-81f0-1814fe19b546","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":3336},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"completed","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015421","display":"Eyeglasses"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004833"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1114-9182"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001718"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046700"},{"system":"http://loinc.org","code":"LA14749-8"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"201"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005139"},{"system":"http://ncimeta.nci.nih.gov","code":"C87148"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XC0Sy"},{"system":"http://snomed.info/sct","code":"E-9076"},{"system":"http://snomed.info/sct/900000000000207008","code":"A-04242"},{"system":"http://snomed.info/sct/731000124108","code":"50121007"},{"system":"http://www.nlm.nih.gov/research/umls/umd","code":"11-667"}],"text":"glasses"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":3271},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}]}},{"fullUrl":"Observation/86c3eb9a-e737-4568-ad49-2550f35dc12c","resource":{"resourceType":"Observation","id":"86c3eb9a-e737-4568-ad49-2550f35dc12c","extension":[{"extension":[{"url":"offset","valueInteger":3281},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0750280","display":"Visual changes"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1016186"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000048290"},{"system":"http://ncimeta.nci.nih.gov","code":"C157424"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C157424"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C157424"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU023886"}],"text":"changes in vision"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3271},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}}},{"fullUrl":"Observation/d7bc83e8-0908-41c3-abae-3c338f0ed859","resource":{"resourceType":"Observation","id":"d7bc83e8-0908-41c3-abae-3c338f0ed859","extension":[{"extension":[{"url":"offset","valueInteger":3300},{"url":"length","valueInteger":13}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0012569","display":"Diplopia"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015206"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003994"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"240"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1114-9612"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DIPLOPIA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000977"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000651"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"H53.2"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"H53.2"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"H53.2"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"368.2"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU023244"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"F05002"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001412"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85038207"},{"system":"http://loinc.org","code":"LA15082-3"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013036"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"106"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004172"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"368.2"},{"system":"http://ncimeta.nci.nih.gov","code":"C37941"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C37941"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"061815"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000786"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"F482."},{"system":"http://snomed.info/sct","code":"F-X0910"},{"system":"http://snomed.info/sct/900000000000207008","code":"DA-74510"},{"system":"http://snomed.info/sct/731000124108","code":"24982008"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0241"}],"text":"double vision"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3271},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}}},{"fullUrl":"Observation/376f221f-bc87-476e-b170-75da91f2f1d1","resource":{"resourceType":"Observation","id":"376f221f-bc87-476e-b170-75da91f2f1d1","extension":[{"extension":[{"url":"offset","valueInteger":3315},{"url":"length","valueInteger":13}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0344232","display":"Blurred vision"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004409"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015212"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000030921"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"114"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"AMBLYOPIA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004389"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000622"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU081137"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"F05011"},{"system":"http://loinc.org","code":"LA15105-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10047513"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"111364"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"368.8"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00154"},{"system":"http://ncimeta.nci.nih.gov","code":"C27123"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10346"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2137"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C27123"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"211107"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000785"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X75bT"},{"system":"http://snomed.info/sct","code":"F-X0230"},{"system":"http://snomed.info/sct/900000000000207008","code":"DA-74404"},{"system":"http://snomed.info/sct/731000124108","code":"246636008"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0257"}],"text":"blurry vision"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3271},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}}},{"fullUrl":"Procedure/5f1910e3-8f69-4406-bf18-52114fa9da49","resource":{"resourceType":"Procedure","id":"5f1910e3-8f69-4406-bf18-52114fa9da49","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"]},"extension":[{"extension":[{"url":"offset","valueInteger":3401},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"not-done","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0018768","display":"Hearing Aids"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1003291"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005855"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0977-5562"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002102"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85059616"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"74541"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5216"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006310"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"003359"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"22430"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79ms"},{"system":"http://snomed.info/sct","code":"E-9078"},{"system":"http://snomed.info/sct/900000000000207008","code":"A-04236"},{"system":"http://snomed.info/sct/731000124108","code":"6012004"},{"system":"http://www.nlm.nih.gov/research/umls/umd","code":"11-967"}],"text":"hearing aids"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_performedDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]}}},{"fullUrl":"Observation/d2519fed-9fec-4625-84c1-4158e3c30c03","resource":{"resourceType":"Observation","id":"d2519fed-9fec-4625-84c1-4158e3c30c03","extension":[{"extension":[{"url":"offset","valueInteger":3355},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0700148","display":"Congestion"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0059352"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000044675"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006373"},{"system":"http://snomed.info/sct","code":"M-36100"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-36100"},{"system":"http://snomed.info/sct/731000124108","code":"85804007"}],"text":"congestion"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}]}},{"fullUrl":"Observation/6d5b8757-7d34-48f6-899b-a2ddb23e143b","resource":{"resourceType":"Observation","id":"6d5b8757-7d34-48f6-899b-a2ddb23e143b","extension":[{"extension":[{"url":"offset","valueInteger":3367},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0429199","display":"Hearing change"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000033984"},{"system":"http://ncimeta.nci.nih.gov","code":"C5037"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X77Ga"},{"system":"http://snomed.info/sct/731000124108","code":"251358005"}],"text":"changes in hearing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}]}},{"fullUrl":"Observation/e133ef4e-1c5a-4547-aec6-438d9b23d436","resource":{"resourceType":"Observation","id":"e133ef4e-1c5a-4547-aec6-438d9b23d436","extension":[{"extension":[{"url":"offset","valueInteger":3433},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rashes"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3416},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1123023","display":"Skin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002281"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0012516"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000054821"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-0373"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7163"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004333"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85123164"},{"system":"http://loinc.org","code":"LP76007-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012867"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"47720"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N7.."},{"system":"http://snomed.info/sct","code":"T-01000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-01000"},{"system":"http://snomed.info/sct/731000124108","code":"39937001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7163"}],"text":"Skin"}}},{"fullUrl":"Observation/e76cf3ad-8865-48a9-a98f-b5b407ac13dc","resource":{"resourceType":"Observation","id":"e76cf3ad-8865-48a9-a98f-b5b407ac13dc","extension":[{"extension":[{"url":"offset","valueInteger":3462},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013404","display":"Dyspnea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005442"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00182"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015304"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004216"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"266"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2596-2296"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPNEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001014"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002094"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.02"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.05"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029433"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024507"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001486"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040344"},{"system":"http://loinc.org","code":"LP115812-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013968"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"115876"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3077"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004417"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000486"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00495"},{"system":"http://ncimeta.nci.nih.gov","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13368"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1816"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046183"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"042109"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037132"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000598319"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15680"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qq"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qq"},{"system":"http://snomed.info/sct","code":"F-75040"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-20040"},{"system":"http://snomed.info/sct/731000124108","code":"267036007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0514"}],"text":"SOB"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3442},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/90b731c6-65b4-4d7b-9606-dafad24a3ae7","resource":{"resourceType":"Observation","id":"90b731c6-65b4-4d7b-9606-dafad24a3ae7","extension":[{"extension":[{"url":"offset","valueInteger":3467},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0008031","display":"Chest Pain"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00012"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017850"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"7.2.5"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"CIR012"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"CIR012"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002750"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"171"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PAIN CHEST"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000673"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0100749"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R07.4"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R07.4"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R07.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.50"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"b28011"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"b28011"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A11"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU059497"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A11001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000942"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85023146"},{"system":"http://loinc.org","code":"LP98885-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10008479"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"33722"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4744"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002637"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"172"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00204"},{"system":"http://ncimeta.nci.nih.gov","code":"C38665"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1776"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000467223"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C38665"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070014"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU025178"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"182.."},{"system":"http://snomed.info/sct","code":"F-71400"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-37000"},{"system":"http://snomed.info/sct/731000124108","code":"29857009"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0718"}],"text":"chest pain"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3442},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/8583135b-71e0-45d3-a63b-35dd2cc109a3","resource":{"resourceType":"Observation","id":"8583135b-71e0-45d3-a63b-35dd2cc109a3","extension":[{"extension":[{"url":"offset","valueInteger":3479},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0030252","display":"Palpitations"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005344"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00127"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015583"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009205"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"549"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PALPITAT"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U003002"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001962"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R00.2"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R00.2"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R00.2"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"785.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU057058"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K04013"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006546"},{"system":"http://loinc.org","code":"LA16997-1"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10033557"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"341"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00866"},{"system":"http://ncimeta.nci.nih.gov","code":"C37999"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10163"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2467"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000476561"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C37999"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"211304"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU005271"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"Q0200190"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qv"},{"system":"http://snomed.info/sct","code":"F-71550"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-37150"},{"system":"http://snomed.info/sct/731000124108","code":"80313002"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0221"}],"text":"heart palpitations"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3442},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/78ff086b-a716-4df7-b433-71bb2afe7b9a","resource":{"resourceType":"Observation","id":"78ff086b-a716-4df7-b433-71bb2afe7b9a","extension":[{"extension":[{"url":"offset","valueInteger":3512},{"url":"length","valueInteger":20}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"hard to get a breath"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3500},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Pulmonary"}}},{"fullUrl":"Observation/7f974b47-3247-4f24-84db-d01683103ffd","resource":{"resourceType":"Observation","id":"7f974b47-3247-4f24-84db-d01683103ffd","extension":[{"extension":[{"url":"offset","valueInteger":3544},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013404","display":"Dyspnea"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005442"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00182"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015304"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004216"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"266"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2596-2296"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"DYSPNEA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001014"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002094"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R06.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.02"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.05"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029433"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R02"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R02"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU024507"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R02007"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001486"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040344"},{"system":"http://loinc.org","code":"LP115812-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10013968"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"115876"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3077"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004417"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000486"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00495"},{"system":"http://ncimeta.nci.nih.gov","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13368"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1816"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000046183"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2998"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"042109"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU037132"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000598319"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"15680"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qq"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qq"},{"system":"http://snomed.info/sct","code":"F-75040"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-20040"},{"system":"http://snomed.info/sct/731000124108","code":"267036007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0514"}],"text":"short of breath"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3500},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Pulmonary"}}},{"fullUrl":"Observation/f9495fde-c9f1-463b-a0a7-fd5d8df105db","resource":{"resourceType":"Observation","id":"f9495fde-c9f1-463b-a0a7-fd5d8df105db","extension":[{"extension":[{"url":"offset","valueInteger":3564},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0010200","display":"Coughing"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000000620"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00179"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017295"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003404"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"212"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2616-8354"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"COUGH INC"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000880"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0012735"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R05"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R05"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R05"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.2"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10047143"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R05"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R05"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU035357"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R05004"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001180"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85033394"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10011224"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"247"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1543"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003371"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00259"},{"system":"http://ncimeta.nci.nih.gov","code":"C37935"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13364"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"4457"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C37935"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C37935"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"101020"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU015709"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"28.03"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"Q0200085"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qn"},{"system":"http://snomed.info/sct","code":"F-75860"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-24100"},{"system":"http://snomed.info/sct/731000124108","code":"263731006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0513"}],"text":"cough"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3500},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Pulmonary"}}},{"fullUrl":"Observation/9b2916fd-6254-4175-84f9-980b53c1a581","resource":{"resourceType":"Observation","id":"9b2916fd-6254-4175-84f9-980b53c1a581","extension":[{"extension":[{"url":"offset","valueInteger":3587},{"url":"length","valueInteger":19}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0426587","display":"Altered appetite"},{"system":"http://loinc.org","code":"LP149971-6"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"283428"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00120"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"210814"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76cN"},{"system":"http://snomed.info/sct/731000124108","code":"249473004"}],"text":"changes in appetite"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3572},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0014136","display":"Endocrine system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017521"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004451"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1025-5280"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ENDO"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"9668"},{"system":"http://loinc.org","code":"LP7203-5"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"23"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004703"},{"system":"http://ncimeta.nci.nih.gov","code":"C12705"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000468796"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12705"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"17360"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0sd"},{"system":"http://snomed.info/sct","code":"T-90000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-B0000"},{"system":"http://snomed.info/sct/731000124108","code":"113331007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"9668"}],"text":"Endocrine"}}},{"fullUrl":"Observation/92f5d484-e6e2-4698-bb3e-63d89a9d2e33","resource":{"resourceType":"Observation","id":"92f5d484-e6e2-4698-bb3e-63d89a9d2e33","extension":[{"extension":[{"url":"offset","valueInteger":3632},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"n/v"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3609},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0521362","display":"gastrointestinal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00029"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0003081"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037933"},{"system":"http://loinc.org","code":"LP89777-4"},{"system":"http://ncimeta.nci.nih.gov","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0107"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045692"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000224"},{"system":"http://snomed.info/sct","code":"T-63950"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-50100"}],"text":"Gastro Intestinal"}}},{"fullUrl":"Observation/79d799ad-f74d-46a3-929e-0090d6984d1a","resource":{"resourceType":"Observation","id":"79d799ad-f74d-46a3-929e-0090d6984d1a","extension":[{"extension":[{"url":"offset","valueInteger":3636},{"url":"length","valueInteger":1}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"d"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3609},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0521362","display":"gastrointestinal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00029"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0003081"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037933"},{"system":"http://loinc.org","code":"LP89777-4"},{"system":"http://ncimeta.nci.nih.gov","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0107"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045692"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000224"},{"system":"http://snomed.info/sct","code":"T-63950"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-50100"}],"text":"Gastro Intestinal"}}},{"fullUrl":"Observation/5ffe685d-99e6-4f20-ac90-25ad471da47b","resource":{"resourceType":"Observation","id":"5ffe685d-99e6-4f20-ac90-25ad471da47b","extension":[{"extension":[{"url":"offset","valueInteger":3641},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0009806","display":"Constipation"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005514"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00230"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"B03.6"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015408"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"9.12.1"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003300"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"200"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"65231"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1248-3977"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CONSTIP"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000845"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002019"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"K59.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"K59.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"K59.00"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"564.00"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10000567"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"D12"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"D12"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU018925"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"D12001"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001143"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85031314"},{"system":"http://loinc.org","code":"MTHU020768"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10010774"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"230057"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"200"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003248"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00011"},{"system":"http://ncimeta.nci.nih.gov","code":"C37930"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E10562"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"3274"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000407757"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C37930"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"060708"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU001907"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_01000.06"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"11440"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"Q0200081"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0rD"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0rD"},{"system":"http://snomed.info/sct","code":"F-62350"},{"system":"http://snomed.info/sct/900000000000207008","code":"D5-44010"},{"system":"http://snomed.info/sct/731000124108","code":"14760008"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0204"}],"text":"constipation"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3609},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0521362","display":"gastrointestinal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00029"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0003081"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037933"},{"system":"http://loinc.org","code":"LP89777-4"},{"system":"http://ncimeta.nci.nih.gov","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0107"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045692"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000224"},{"system":"http://snomed.info/sct","code":"T-63950"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-50100"}],"text":"Gastro Intestinal"}}},{"fullUrl":"Observation/8f7c069c-f87b-42ac-96d4-654755030629","resource":{"resourceType":"Observation","id":"8f7c069c-f87b-42ac-96d4-654755030629","extension":[{"extension":[{"url":"offset","valueInteger":3683},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0566355","display":"Ability to swallow"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000039992"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"230310"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa4JU"},{"system":"http://snomed.info/sct/731000124108","code":"288935001"}],"text":"swallow"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3609},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0521362","display":"gastrointestinal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00029"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0003081"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037933"},{"system":"http://loinc.org","code":"LP89777-4"},{"system":"http://ncimeta.nci.nih.gov","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0107"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045692"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13359"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000224"},{"system":"http://snomed.info/sct","code":"T-63950"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-50100"}],"text":"Gastro Intestinal"}}},{"fullUrl":"Condition/39be6604-7644-4c14-abb0-afdf13bc42dd","resource":{"resourceType":"Condition","id":"39be6604-7644-4c14-abb0-afdf13bc42dd","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":3775},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0150045","display":"Urge Incontinence"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"T49.5"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0035383"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000016767"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"65360"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"N39.41"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"788.31"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10026811"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU037816"},{"system":"http://loinc.org","code":"MTHU013458"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10046494"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"37679"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D053202"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00019"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"050335"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU065978"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_20000.05"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"1A26."},{"system":"http://snomed.info/sct/900000000000207008","code":"F-0A670"},{"system":"http://snomed.info/sct/731000124108","code":"87557004"}],"text":"urge incontinence"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":3708},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3887515","display":"Genitourinary"},{"system":"http://loinc.org","code":"LP89778-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000003"}],"text":"Genito Urinary"}],"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"note":[{"text":"Some"}]}},{"fullUrl":"Condition/f29183a3-bc63-4c6d-9994-057343f0566f","resource":{"resourceType":"Condition","id":"f29183a3-bc63-4c6d-9994-057343f0566f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":3811},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0033377","display":"Ptosis"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004461"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00840"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1015620"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000010175"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"627"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U003258"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU062684"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006562"},{"system":"http://loinc.org","code":"LA9244-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10076708"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D011391"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000308"},{"system":"http://ncimeta.nci.nih.gov","code":"C36173"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C36173"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2475"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C36173"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XC0Au"},{"system":"http://snomed.info/sct","code":"M-31050"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-31050"},{"system":"http://snomed.info/sct/731000124108","code":"29696001"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0142"}],"text":"prolapse"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":3708},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3887515","display":"Genitourinary"},{"system":"http://loinc.org","code":"LP89778-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000003"}],"text":"Genito Urinary"}],"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Observation/2f75e452-014c-4d08-87db-036d02aa4612","resource":{"resourceType":"Observation","id":"2f75e452-014c-4d08-87db-036d02aa4612","extension":[{"extension":[{"url":"offset","valueInteger":3728},{"url":"length","valueInteger":19}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"increased frequency"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3708},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3887515","display":"Genitourinary"},{"system":"http://loinc.org","code":"LP89778-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000003"}],"text":"Genito Urinary"}}},{"fullUrl":"Observation/f50e8925-4c59-498a-b26d-8cdd24611fba","resource":{"resourceType":"Observation","id":"f50e8925-4c59-498a-b26d-8cdd24611fba","extension":[{"extension":[{"url":"offset","valueInteger":3751},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0030193","display":"Pain"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002779"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00754"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"Q63.0"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0035760"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009185"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"548"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"65336"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2683-4824"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PAIN"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0012531"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R52.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R52.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R52"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"338-338.99"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"b280-b289"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"b280-b289"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10023130"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU059479"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A29020"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003436"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85096617"},{"system":"http://loinc.org","code":"MTHU029813"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10033371"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"283263"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"351"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010146"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"306"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"780.96"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01394"},{"system":"http://ncimeta.nci.nih.gov","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E11167"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1994"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3303"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"200714"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU033713"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"24"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_17010.03"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041399"},{"system":"http://www.nlm.nih.gov/research/umls/pnds","code":"NP.405"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"36150"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa07F"},{"system":"http://snomed.info/sct","code":"F-82600"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-A2600"},{"system":"http://snomed.info/sct/731000124108","code":"22253000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0730"}],"text":"pain"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3708},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3887515","display":"Genitourinary"},{"system":"http://loinc.org","code":"LP89778-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25350"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000003"}],"text":"Genito Urinary"}}},{"fullUrl":"List/cd98589b-54af-4d9f-8fa7-f0ac32bd4df0","resource":{"resourceType":"List","id":"cd98589b-54af-4d9f-8fa7-f0ac32bd4df0","status":"current","mode":"snapshot","title":"Review of Systems","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Observation/3e34ed2e-c918-436e-a335-5b6a75fe70aa","type":"Observation","display":"NAD"}},{"item":{"reference":"Observation/253cebde-c965-442b-87f3-0af428fc5148","type":"Observation","display":"feeling well"}},{"item":{"reference":"Procedure/551e9b17-9ec7-4573-81f0-1814fe19b546","type":"Procedure","display":"glasses"}},{"item":{"reference":"Observation/86c3eb9a-e737-4568-ad49-2550f35dc12c","type":"Observation","display":"changes in vision"}},{"item":{"reference":"Observation/d7bc83e8-0908-41c3-abae-3c338f0ed859","type":"Observation","display":"double vision"}},{"item":{"reference":"Observation/376f221f-bc87-476e-b170-75da91f2f1d1","type":"Observation","display":"blurry vision"}},{"item":{"reference":"Procedure/5f1910e3-8f69-4406-bf18-52114fa9da49","type":"Procedure","display":"hearing aids"}},{"item":{"reference":"Observation/d2519fed-9fec-4625-84c1-4158e3c30c03","type":"Observation","display":"congestion"}},{"item":{"reference":"Observation/6d5b8757-7d34-48f6-899b-a2ddb23e143b","type":"Observation","display":"changes in hearing"}},{"item":{"reference":"Observation/e133ef4e-1c5a-4547-aec6-438d9b23d436","type":"Observation","display":"rashes"}},{"item":{"reference":"Observation/e76cf3ad-8865-48a9-a98f-b5b407ac13dc","type":"Observation","display":"SOB"}},{"item":{"reference":"Observation/90b731c6-65b4-4d7b-9606-dafad24a3ae7","type":"Observation","display":"chest pain"}},{"item":{"reference":"Observation/8583135b-71e0-45d3-a63b-35dd2cc109a3","type":"Observation","display":"heart palpitations"}},{"item":{"reference":"Observation/78ff086b-a716-4df7-b433-71bb2afe7b9a","type":"Observation","display":"hard to get a breath"}},{"item":{"reference":"Observation/7f974b47-3247-4f24-84db-d01683103ffd","type":"Observation","display":"short of breath"}},{"item":{"reference":"Observation/f9495fde-c9f1-463b-a0a7-fd5d8df105db","type":"Observation","display":"cough"}},{"item":{"reference":"Observation/9b2916fd-6254-4175-84f9-980b53c1a581","type":"Observation","display":"changes in appetite"}},{"item":{"reference":"Observation/92f5d484-e6e2-4698-bb3e-63d89a9d2e33","type":"Observation","display":"n/v"}},{"item":{"reference":"Observation/79d799ad-f74d-46a3-929e-0090d6984d1a","type":"Observation","display":"d"}},{"item":{"reference":"Observation/5ffe685d-99e6-4f20-ac90-25ad471da47b","type":"Observation","display":"constipation"}},{"item":{"reference":"Observation/8f7c069c-f87b-42ac-96d4-654755030629","type":"Observation","display":"swallow"}},{"item":{"reference":"Condition/39be6604-7644-4c14-abb0-afdf13bc42dd","type":"Condition","display":"urge incontinence"}},{"item":{"reference":"Condition/f29183a3-bc63-4c6d-9994-057343f0566f","type":"Condition","display":"prolapse"}},{"item":{"reference":"Observation/2f75e452-014c-4d08-87db-036d02aa4612","type":"Observation","display":"increased frequency"}},{"item":{"reference":"Observation/f50e8925-4c59-498a-b26d-8cdd24611fba","type":"Observation","display":"pain"}}]}},{"fullUrl":"Observation/6d6344e6-464a-4652-a6dc-f20c2a3869d6","resource":{"resourceType":"Observation","id":"6d6344e6-464a-4652-a6dc-f20c2a3869d6","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature"]},"extension":[{"extension":[{"url":"offset","valueInteger":3859},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0005903","display":"Body Temperature"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000001730"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1009832"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002050"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32861"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2871-4249"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"b5500"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"b5500"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU073659"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000633"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85015255"},{"system":"http://loinc.org","code":"MTHU061731"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"6288"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001831"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U001749"},{"system":"http://ncimeta.nci.nih.gov","code":"C174446"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-VSTESTCD"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"200704"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"06500"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa085"},{"system":"http://snomed.info/sct","code":"F-03000"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-03000"},{"system":"http://snomed.info/sct/731000124108","code":"386725007"},{"system":"http://loinc.org","code":"8310-5","display":"Body temperature"}],"text":"Temp"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":35.9,"unit":"celsius","system":"http://unitsofmeasure.org","code":"Cel"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/38f84639-0240-4b1e-a6da-22f079a5dc3d","resource":{"resourceType":"Observation","id":"38f84639-0240-4b1e-a6da-22f079a5dc3d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate"]},"extension":[{"extension":[{"url":"offset","valueInteger":3871},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0034107","display":"Pulse taking"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"K33.3"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000010407"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003951"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85109028"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"306388"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D011674"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003399"},{"system":"http://snomed.info/sct","code":"P-Y101"},{"system":"http://snomed.info/sct/900000000000207008","code":"PA-00510"},{"system":"http://snomed.info/sct/731000124108","code":"65653002"},{"system":"http://loinc.org","code":"8867-4","display":"Heart rate"}],"text":"Pulse"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":76,"unit":"per minute","system":"http://unitsofmeasure.org","code":"/min"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/accba11a-ad34-462f-b16a-174afe057995","resource":{"resourceType":"Observation","id":"accba11a-ad34-462f-b16a-174afe057995","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry"]},"extension":[{"extension":[{"url":"offset","valueInteger":3882},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0030054","display":"oxygen"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000001289"},{"system":"http://www.whocc.no/atc","code":"V03AN01"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009153"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32041"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2189-1281"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB09140"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"5214"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003425"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85096329"},{"system":"http://loinc.org","code":"LP14536-4"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d06860"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010100"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000131"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"S88TT14065"},{"system":"http://ncimeta.nci.nih.gov","code":"C722"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"S88TT14065"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000538149"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"000826"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"36090"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM0l9"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"7806"},{"system":"http://snomed.info/sct","code":"F-10470"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-10110"},{"system":"http://snomed.info/sct/731000124108","code":"24099007"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m59550"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019105"},{"system":"http://loinc.org","code":"59408-5","display":"Oxygen saturation in Arterial blood by Pulse oximetry"},{"system":"http://loinc.org","code":"2708-6","display":"Oxygen saturation in Arterial blood"}],"text":"O2"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}],"component":[{"code":{"coding":[{"system":"http://loinc.org","code":"3150-0","display":"Inhaled oxygen concentration"}],"text":"Inhaled oxygen concentration"},"valueQuantity":{"value":98,"unit":"% ra","system":"http://unitsofmeasure.org","code":"%"}},{"code":{"coding":[{"system":"http://loinc.org","code":"3151-8","display":"Inhaled oxygen flow rate"}],"text":"Inhaled oxygen flow rate"},"dataAbsentReason":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/data-absent-reason","code":"unknown","display":"unknown"}],"text":"unknown"}}]}},{"fullUrl":"Observation/93d28e03-64b7-404e-8c4c-8497a3c1f244","resource":{"resourceType":"Observation","id":"93d28e03-64b7-404e-8c4c-8497a3c1f244","extension":[{"extension":[{"url":"offset","valueInteger":3894},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3498181","display":"retrorubral area"},{"system":"http://www.nlm.nih.gov/research/umls/neu","code":"1049"}],"text":"RR"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":20},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/c6dab3c6-9e14-40ab-9cbd-f7f70b23400b","resource":{"resourceType":"Observation","id":"c6dab3c6-9e14-40ab-9cbd-f7f70b23400b","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure"]},"extension":[{"extension":[{"url":"offset","valueInteger":3902},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0005824","display":"Blood pressure determination"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007392"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"K33.1"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002009"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10031996"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85015011"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10076581"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"6045"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001795"},{"system":"http://ncimeta.nci.nih.gov","code":"C167233"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C167233"},{"system":"http://snomed.info/sct","code":"P-Y107"},{"system":"http://snomed.info/sct/900000000000207008","code":"PA-00540"},{"system":"http://snomed.info/sct/731000124108","code":"46973005"},{"system":"http://loinc.org","code":"85354-9","display":"Blood pressure panel with all children optional"}],"text":"BP"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}],"component":[{"code":{"coding":[{"system":"http://loinc.org","code":"8480-6","display":"Systolic blood pressure"}],"text":"Systolic blood pressure"},"valueQuantity":{"value":159,"unit":"mmHg","system":"http://unitsofmeasure.org","code":"mm[Hg]"}},{"code":{"coding":[{"system":"http://loinc.org","code":"8462-4","display":"Diastolic blood pressure"}],"text":"Diastolic blood pressure"},"valueQuantity":{"value":111,"unit":"mmHg","system":"http://unitsofmeasure.org","code":"mm[Hg]"}}]}},{"fullUrl":"Observation/001ef1a6-ed67-4758-8c01-3d7ab54382c9","resource":{"resourceType":"Observation","id":"001ef1a6-ed67-4758-8c01-3d7ab54382c9","extension":[{"extension":[{"url":"offset","valueInteger":3927},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C2051415","display":"patient appears in no acute distress (physical finding)"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"10024"}],"text":"NAD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/ba2453b5-c68c-4d75-8eb6-d5b73de8a578","resource":{"resourceType":"Observation","id":"ba2453b5-c68c-4d75-8eb6-d5b73de8a578","extension":[{"extension":[{"url":"offset","valueInteger":3940},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"text":"up in bed"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/92e2a522-850e-402e-a13c-c8d6a33a79c8","resource":{"resourceType":"Observation","id":"92e2a522-850e-402e-a13c-c8d6a33a79c8","extension":[{"extension":[{"url":"offset","valueInteger":3951},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"text":"well groomed"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/0305a72e-1be6-4b63-b418-1d641ebd106d","resource":{"resourceType":"Observation","id":"0305a72e-1be6-4b63-b418-1d641ebd106d","extension":[{"extension":[{"url":"offset","valueInteger":3971},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}],"text":"Vital Signs"}],"code":{"text":"nightgown"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/c006ed4f-e3e5-43da-9e47-cea7525a28d1","resource":{"resourceType":"Observation","id":"c006ed4f-e3e5-43da-9e47-cea7525a28d1","extension":[{"extension":[{"url":"offset","valueInteger":3990},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C2143306","display":"PERRLA"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"206277"},{"system":"http://ncimeta.nci.nih.gov","code":"C87108"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C87108"}],"text":"PERRLA"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3983},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}}},{"fullUrl":"Observation/2062769e-4713-4ebd-a1b2-1c98429361dc","resource":{"resourceType":"Observation","id":"2062769e-4713-4ebd-a1b2-1c98429361dc","extension":[{"extension":[{"url":"offset","valueInteger":3998},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"EOM intact"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":3983},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015392","display":"Eye"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002468"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0057369"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004810"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1107-6922"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"12513"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"EYE"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s220"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s220"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"F"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001714"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046642"},{"system":"http://loinc.org","code":"LP7218-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005123"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003284"},{"system":"http://ncimeta.nci.nih.gov","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000350235"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12401"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000020"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"18890"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X74in"},{"system":"http://snomed.info/sct","code":"T-XX000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-AA000"},{"system":"http://snomed.info/sct/731000124108","code":"81745001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"12513"}],"text":"Eyes"}}},{"fullUrl":"Observation/b27f0400-9139-47cd-a5c4-837f19cb8aaa","resource":{"resourceType":"Observation","id":"b27f0400-9139-47cd-a5c4-837f19cb8aaa","extension":[{"extension":[{"url":"offset","valueInteger":4023},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"swollen tounge"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"extension":[{"extension":[{"url":"offset","valueInteger":4017},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Large"},{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4042},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007966","display":"Cheek structure"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000016962"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002727"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2139-1459"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"46476"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"CHEEK"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000928"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85022839"},{"system":"http://loinc.org","code":"LP76299-4"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002610"},{"system":"http://ncimeta.nci.nih.gov","code":"C13070"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C13070"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa2E3"},{"system":"http://snomed.info/sct","code":"T-Y0300"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D1206"},{"system":"http://snomed.info/sct/731000124108","code":"60819002"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"46476"}],"text":"cheek"}}},{"fullUrl":"Observation/69c84ffd-5600-4890-b0bc-d61a2a446fd6","resource":{"resourceType":"Observation","id":"69c84ffd-5600-4890-b0bc-d61a2a446fd6","extension":[{"extension":[{"url":"offset","valueInteger":4062},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"tounge was large"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/69471b6b-abc4-457b-bfcd-33911b31a7ee","resource":{"resourceType":"Observation","id":"69471b6b-abc4-457b-bfcd-33911b31a7ee","extension":[{"extension":[{"url":"offset","valueInteger":4083},{"url":"length","valueInteger":17}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"obscured the view"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/f73baecf-902d-4d27-96a6-a27baa41d1bc","resource":{"resourceType":"Observation","id":"f73baecf-902d-4d27-96a6-a27baa41d1bc","extension":[{"extension":[{"url":"offset","valueInteger":4164},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038999","display":"Swelling"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004456"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000701"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011957"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A08"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A08"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A08003"},{"system":"http://loinc.org","code":"LA22440-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042674"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://ncimeta.nci.nih.gov","code":"C3399"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2091"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"191325"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU067007"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76Eu"},{"system":"http://snomed.info/sct","code":"M-02570"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-02570"},{"system":"http://snomed.info/sct/731000124108","code":"442672001"}],"text":"swelling"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"extension":[{"extension":[{"url":"offset","valueInteger":4141},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"noticeable"},{"extension":[{"extension":[{"url":"offset","valueInteger":4155},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"palpable"},{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4131},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027530","display":"Neck"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004571"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008531"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-5952"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/NECK"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7155"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"NECK"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003138"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85090554"},{"system":"http://loinc.org","code":"LP7440-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009333"},{"system":"http://ncimeta.nci.nih.gov","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000513"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"33120"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T4"},{"system":"http://snomed.info/sct","code":"T-Y0600"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D1600"},{"system":"http://snomed.info/sct/731000124108","code":"45048000"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7155"}],"text":"Neck"}}},{"fullUrl":"Observation/b769bf15-c1ce-4e99-a16b-497a4717a1a5","resource":{"resourceType":"Observation","id":"b769bf15-c1ce-4e99-a16b-497a4717a1a5","extension":[{"extension":[{"url":"offset","valueInteger":4174},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0332575","display":"Redness"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029494"},{"system":"http://loinc.org","code":"LA22439-6"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10038198"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"03695"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"040747"},{"system":"http://snomed.info/sct","code":"M-04040"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-04040"},{"system":"http://snomed.info/sct/731000124108","code":"386713009"}],"text":"redness"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"extension":[{"extension":[{"url":"offset","valueInteger":4141},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"noticeable"},{"extension":[{"extension":[{"url":"offset","valueInteger":4155},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"palpable"},{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4131},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027530","display":"Neck"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004571"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008531"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-5952"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/NECK"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7155"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"NECK"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003138"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85090554"},{"system":"http://loinc.org","code":"LP7440-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009333"},{"system":"http://ncimeta.nci.nih.gov","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000513"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"33120"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T4"},{"system":"http://snomed.info/sct","code":"T-Y0600"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D1600"},{"system":"http://snomed.info/sct/731000124108","code":"45048000"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7155"}],"text":"Neck"}}},{"fullUrl":"Observation/c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab","resource":{"resourceType":"Observation","id":"c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab","extension":[{"extension":[{"url":"offset","valueInteger":4185},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rash"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"extension":[{"extension":[{"url":"offset","valueInteger":4141},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"noticeable"},{"extension":[{"extension":[{"url":"offset","valueInteger":4155},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"palpable"},{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4131},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027530","display":"Neck"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004571"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008531"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-5952"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/NECK"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7155"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"NECK"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U003138"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85090554"},{"system":"http://loinc.org","code":"LP7440-3"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009333"},{"system":"http://ncimeta.nci.nih.gov","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C13063"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000513"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"33120"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T4"},{"system":"http://snomed.info/sct","code":"T-Y0600"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D1600"},{"system":"http://snomed.info/sct/731000124108","code":"45048000"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7155"}],"text":"Neck"}}},{"fullUrl":"Observation/f7f0c8c0-b473-4df7-aa3b-2f0b425a5342","resource":{"resourceType":"Observation","id":"f7f0c8c0-b473-4df7-aa3b-2f0b425a5342","extension":[{"extension":[{"url":"offset","valueInteger":4234},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0497156","display":"Lymphadenopathy"},{"system":"http://www.nlm.nih.gov/research/umls/air","code":"LYMPH"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00319"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017733"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007601"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0427-7757"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"LYMPHADENO"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0002716"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R59.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU046563"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"B02006"},{"system":"http://loinc.org","code":"LP247924-6"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10025197"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"277693"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000072281"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"785.6"},{"system":"http://ncimeta.nci.nih.gov","code":"C50764"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2092"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044313"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C50764"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070310"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU002630"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0Vr"},{"system":"http://snomed.info/sct","code":"M-71000"},{"system":"http://snomed.info/sct/900000000000207008","code":"DC-72130"},{"system":"http://snomed.info/sct/731000124108","code":"30746006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0577"}],"text":"lymphadenopathy"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}]}},{"fullUrl":"Observation/ce0ef48b-7d52-446f-a501-d398c070c0e9","resource":{"resourceType":"Observation","id":"ce0ef48b-7d52-446f-a501-d398c070c0e9","extension":[{"extension":[{"url":"offset","valueInteger":4269},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C2712143","display":"Normal heart rate"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1011151"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000022883"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10029229"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10019306"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7s1"},{"system":"http://snomed.info/sct","code":"F-73121"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-33121"},{"system":"http://snomed.info/sct/731000124108","code":"76863003"}],"text":"RRR"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4252},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/23a08c8f-5293-4761-b144-d8b4776ea4e6","resource":{"resourceType":"Observation","id":"23a08c8f-5293-4761-b144-d8b4776ea4e6","extension":[{"extension":[{"url":"offset","valueInteger":4276},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"m/r/g"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4252},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/e134033b-7d5a-41eb-bb13-0e9cd149fe2a","resource":{"resourceType":"Observation","id":"e134033b-7d5a-41eb-bb13-0e9cd149fe2a","extension":[{"extension":[{"url":"offset","valueInteger":4286},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0425687","display":"Jugular venous engorgement"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0014861"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000024345"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002232"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM02b"},{"system":"http://snomed.info/sct/731000124108","code":"271653008"}],"text":"JVD"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4252},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/8bb175d9-7a0d-434b-a62d-bf97a49bb261","resource":{"resourceType":"Observation","id":"8bb175d9-7a0d-434b-a62d-bf97a49bb261","extension":[{"extension":[{"url":"offset","valueInteger":4294},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007280","display":"Carotid bruit"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00085"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0061183"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002481"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"157"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000557"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K81006"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10048777"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"7330"},{"system":"http://ncimeta.nci.nih.gov","code":"C168039"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"040604"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU071454"},{"system":"http://snomed.info/sct/731000124108","code":"419642000"}],"text":"carotid bruits"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4252},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007226","display":"Cardiovascular system"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000017166"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00027"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060472"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002461"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0581-0263"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CV"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7161"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s4109"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s4109"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"K"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000808"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85020226"},{"system":"http://loinc.org","code":"LP7118-5"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002319"},{"system":"http://ncimeta.nci.nih.gov","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044194"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12686"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"07650"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0eK"},{"system":"http://snomed.info/sct","code":"T-30000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-30000"},{"system":"http://snomed.info/sct/731000124108","code":"113257007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7161"}],"text":"Cardiovascular"}}},{"fullUrl":"Observation/ef9a50ee-6b56-45c2-9769-04e2fc7e1052","resource":{"resourceType":"Observation","id":"ef9a50ee-6b56-45c2-9769-04e2fc7e1052","extension":[{"extension":[{"url":"offset","valueInteger":4319},{"url":"length","valueInteger":20}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"Clear to auscltation"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4311},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Lungs"}}},{"fullUrl":"Observation/62c4a367-4b79-4e4f-b6cd-f6063d41b0b1","resource":{"resourceType":"Observation","id":"62c4a367-4b79-4e4f-b6cd-f6063d41b0b1","extension":[{"extension":[{"url":"offset","valueInteger":4344},{"url":"length","valueInteger":23}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"use of acessory muscles"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4311},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Lungs"}}},{"fullUrl":"Observation/b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a","resource":{"resourceType":"Observation","id":"b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a","extension":[{"extension":[{"url":"offset","valueInteger":4372},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0034642","display":"Rales"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000010564"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"LUNG DIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U003311"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0030830"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R09.89"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU064770"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R04004"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037833"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"7058"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012135"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"786.7"},{"system":"http://ncimeta.nci.nih.gov","code":"C119216"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C119216"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"060310"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU054375"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM08B"},{"system":"http://snomed.info/sct","code":"F-76000"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-23200"},{"system":"http://snomed.info/sct/731000124108","code":"48409008"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"1141"}],"text":"crackles"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4311},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Lungs"}}},{"fullUrl":"Observation/08fd4874-bbd6-447e-b65d-6ef0541b9be8","resource":{"resourceType":"Observation","id":"08fd4874-bbd6-447e-b65d-6ef0541b9be8","extension":[{"extension":[{"url":"offset","valueInteger":4384},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0043144","display":"Wheezing"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000013155"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000732"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ASTHMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004468"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0030828"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R06.2"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R06.2"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R06.2"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"786.07"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10030128"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"R03"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"R03"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU082431"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R03002"},{"system":"http://loinc.org","code":"MTHU013532"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10047924"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012135"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01783"},{"system":"http://ncimeta.nci.nih.gov","code":"C78718"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13605"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"4463"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C78718"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070603"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU038722"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qs"},{"system":"http://snomed.info/sct","code":"F-76110"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-23310"},{"system":"http://snomed.info/sct/731000124108","code":"56018004"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0511"}],"text":"wheezes"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4311},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0024109","display":"Lung"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002514"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007565"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2612-7088"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7195"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"LUNG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s43019"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s43019"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002746"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85078891"},{"system":"http://loinc.org","code":"LP7407-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D008168"},{"system":"http://ncimeta.nci.nih.gov","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000270740"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12468"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU016106"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"28960"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N225"},{"system":"http://snomed.info/sct","code":"T-28000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-28000"},{"system":"http://snomed.info/sct/731000124108","code":"39607008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7195"}],"text":"Lungs"}}},{"fullUrl":"Observation/b6a7c561-40cd-4f4c-9e3d-4010424f7dcd","resource":{"resourceType":"Observation","id":"b6a7c561-40cd-4f4c-9e3d-4010424f7dcd","extension":[{"extension":[{"url":"offset","valueInteger":4405},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015230","display":"Exanthema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000022958"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00609"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014681"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029440"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"RASH"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000988"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R21"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.1"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU027334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001699"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85046091"},{"system":"http://loinc.org","code":"LA29194-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10037844"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"273176"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"208"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005076"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"638"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.1"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01533"},{"system":"http://ncimeta.nci.nih.gov","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2033"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C111884"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C39594"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070301"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU047706"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26.02"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07J"},{"system":"http://snomed.info/sct","code":"M-48400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-01710"},{"system":"http://snomed.info/sct/731000124108","code":"271807003"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0028"}],"text":"rashes"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4395},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1123023","display":"Skin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002281"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0012516"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000054821"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-0373"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7163"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004333"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85123164"},{"system":"http://loinc.org","code":"LP76007-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012867"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"47720"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N7.."},{"system":"http://snomed.info/sct","code":"T-01000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-01000"},{"system":"http://snomed.info/sct/731000124108","code":"39937001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7163"}],"text":"Skin"}}},{"fullUrl":"Observation/b903e342-8eb1-4d0a-9f10-a9a7a1f371f1","resource":{"resourceType":"Observation","id":"b903e342-8eb1-4d0a-9f10-a9a7a1f371f1","extension":[{"extension":[{"url":"offset","valueInteger":4413},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0235218","display":"Warm skin"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000023475"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"VASODILAT"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10040952"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-44078"},{"system":"http://snomed.info/sct/731000124108","code":"102599008"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0207"}],"text":"skin warm"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4395},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1123023","display":"Skin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002281"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0012516"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000054821"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-0373"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7163"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004333"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85123164"},{"system":"http://loinc.org","code":"LP76007-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012867"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"47720"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N7.."},{"system":"http://snomed.info/sct","code":"T-01000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-01000"},{"system":"http://snomed.info/sct/731000124108","code":"39937001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7163"}],"text":"Skin"}}},{"fullUrl":"Observation/f725aee3-ee72-4bad-b12c-0e1d757da440","resource":{"resourceType":"Observation","id":"f725aee3-ee72-4bad-b12c-0e1d757da440","extension":[{"extension":[{"url":"offset","valueInteger":4427},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0205222","display":"Dry"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020415"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X78yG"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-A325"},{"system":"http://snomed.info/sct/731000124108","code":"13880007"}],"text":"dry"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4395},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1123023","display":"Skin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002281"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0012516"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000054821"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-0373"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7163"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004333"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85123164"},{"system":"http://loinc.org","code":"LP76007-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012867"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"47720"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N7.."},{"system":"http://snomed.info/sct","code":"T-01000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-01000"},{"system":"http://snomed.info/sct/731000124108","code":"39937001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7163"}],"text":"Skin"}}},{"fullUrl":"Observation/e0baed06-518a-49b1-9ef3-938c45d2f488","resource":{"resourceType":"Observation","id":"e0baed06-518a-49b1-9ef3-938c45d2f488","extension":[{"extension":[{"url":"offset","valueInteger":4435},{"url":"length","valueInteger":18}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"erythematous areas"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4395},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1123023","display":"Skin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002281"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0012516"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000054821"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2716-0373"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"7163"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"S"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004333"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85123164"},{"system":"http://loinc.org","code":"LP76007-1"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012867"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"26"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"47720"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N7.."},{"system":"http://snomed.info/sct","code":"T-01000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-01000"},{"system":"http://snomed.info/sct/731000124108","code":"39937001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"7163"}],"text":"Skin"}}},{"fullUrl":"Observation/fe9c86ab-fef0-43fc-8556-f687a90461be","resource":{"resourceType":"Observation","id":"fe9c86ab-fef0-43fc-8556-f687a90461be","extension":[{"extension":[{"url":"offset","valueInteger":4466},{"url":"length","valueInteger":19}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0278005","display":"Normal bowel sounds"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000027079"},{"system":"http://loinc.org","code":"LA25030-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10070940"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7W9"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-54201"},{"system":"http://snomed.info/sct/731000124108","code":"61539000"}],"text":"Normal bowel sounds"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4456},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0000726","display":"Abdomen"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000016974"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000528"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-2204"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/ABDO"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"9577"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"ADB"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000003"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85000091"},{"system":"http://loinc.org","code":"LP6990-8"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000005"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000219"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00010"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T7"},{"system":"http://snomed.info/sct","code":"T-Y4100"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D4000"},{"system":"http://snomed.info/sct/731000124108","code":"818983003"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"9577"}],"text":"Abdomen"}}},{"fullUrl":"Observation/d1aae4cd-1487-466a-bda3-75a3b0750c4a","resource":{"resourceType":"Observation","id":"d1aae4cd-1487-466a-bda3-75a3b0750c4a","extension":[{"extension":[{"url":"offset","valueInteger":4487},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0426663","display":"Abdomen soft"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"206271"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76dh"},{"system":"http://snomed.info/sct/731000124108","code":"249543005"}],"text":"abdomen soft"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4456},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0000726","display":"Abdomen"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000016974"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000528"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-2204"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/ABDO"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"9577"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"ADB"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000003"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85000091"},{"system":"http://loinc.org","code":"LP6990-8"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000005"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000219"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00010"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T7"},{"system":"http://snomed.info/sct","code":"T-Y4100"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D4000"},{"system":"http://snomed.info/sct/731000124108","code":"818983003"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"9577"}],"text":"Abdomen"}}},{"fullUrl":"Observation/7d63cc6f-00ca-4410-b282-d1bc92d9d569","resource":{"resourceType":"Observation","id":"7d63cc6f-00ca-4410-b282-d1bc92d9d569","extension":[{"extension":[{"url":"offset","valueInteger":4504},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0520960","display":"Non-tender"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037818"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU038385"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7ig"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-A2615"},{"system":"http://snomed.info/sct/731000124108","code":"300821004"}],"text":"nontender"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4456},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0000726","display":"Abdomen"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000016974"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000528"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0468-2204"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"BODY/ABDO"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"9577"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"ADB"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000003"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85000091"},{"system":"http://loinc.org","code":"LP6990-8"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000005"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000219"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00010"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa8T7"},{"system":"http://snomed.info/sct","code":"T-Y4100"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D4000"},{"system":"http://snomed.info/sct/731000124108","code":"818983003"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"9577"}],"text":"Abdomen"}}},{"fullUrl":"Observation/8e788834-864f-4331-a51e-a5b2709af6c0","resource":{"resourceType":"Observation","id":"8e788834-864f-4331-a51e-a5b2709af6c0","extension":[{"extension":[{"url":"offset","valueInteger":4533},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013604","display":"Edema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005462"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00114"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014846"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029664"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"273"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0465-4760"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"EDEMA"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000969"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.3"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU053978"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K07003"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001504"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040948"},{"system":"http://loinc.org","code":"MTHU019803"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10030095"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"7268"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004487"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.3"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00501"},{"system":"http://ncimeta.nci.nih.gov","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1820"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045676"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"250905"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000002"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"29.01"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qw"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qw"},{"system":"http://snomed.info/sct","code":"M-36500"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-36300"},{"system":"http://snomed.info/sct/731000124108","code":"267038008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"66941"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0398"}],"text":"edema"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4516},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Extremeties"}}},{"fullUrl":"Observation/c4114093-1e0e-42d3-a1a7-053cda0021e1","resource":{"resourceType":"Observation","id":"c4114093-1e0e-42d3-a1a7-053cda0021e1","extension":[{"extension":[{"url":"offset","valueInteger":4540},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0010520","display":"Cyanosis"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004378"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1003234"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003516"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2604-4949"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"CYANOSIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000918"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000961"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R23.0"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R23.0"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R23.0"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.5"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU020248"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"S08011"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001228"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85035033"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10011703"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"11139"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003490"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00267"},{"system":"http://ncimeta.nci.nih.gov","code":"C26737"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1798"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044019"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C26737"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"040032"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU036837"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"28.05"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM07N"},{"system":"http://snomed.info/sct","code":"M-04120"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-04100"},{"system":"http://snomed.info/sct/731000124108","code":"3415004"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0501"}],"text":"cyanosis"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4516},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Extremeties"}}},{"fullUrl":"Observation/76abe39a-811d-4457-8a34-77a18666157f","resource":{"resourceType":"Observation","id":"76abe39a-811d-4457-8a34-77a18666157f","extension":[{"extension":[{"url":"offset","valueInteger":4552},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0149651","display":"Clubbing"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00177"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0055338"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000016640"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000140"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000972"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001217"},{"system":"http://loinc.org","code":"LA19080-3"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10009691"},{"system":"http://ncimeta.nci.nih.gov","code":"C85489"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU006479"},{"system":"http://snomed.info/sct","code":"M-71530"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-78050"},{"system":"http://snomed.info/sct/731000124108","code":"367004"}],"text":"clubbing"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4516},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"Extremeties"}}},{"fullUrl":"Observation/44f87849-ec09-4f87-94e0-010f7cdcb7e8","resource":{"resourceType":"Observation","id":"44f87849-ec09-4f87-94e0-010f7cdcb7e8","extension":[{"extension":[{"url":"offset","valueInteger":4596},{"url":"length","valueInteger":22}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"normal range of motion"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4563},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0497254","display":"Musculoskeletal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00516"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0047159"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037430"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"L"},{"system":"http://loinc.org","code":"LP89781-6"},{"system":"http://ncimeta.nci.nih.gov","code":"C25348"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044938"}],"text":"Musculo Skeletal"}}},{"fullUrl":"Observation/ae964a2a-ae2e-4d80-82e3-4ec52bed2587","resource":{"resourceType":"Observation","id":"ae964a2a-ae2e-4d80-82e3-4ec52bed2587","extension":[{"extension":[{"url":"offset","valueInteger":4623},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038999","display":"Swelling"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004456"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000701"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011957"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A08"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A08"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A08003"},{"system":"http://loinc.org","code":"LA22440-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042674"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://ncimeta.nci.nih.gov","code":"C3399"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2091"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"191325"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU067007"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76Eu"},{"system":"http://snomed.info/sct","code":"M-02570"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-02570"},{"system":"http://snomed.info/sct/731000124108","code":"442672001"}],"text":"swollen"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4563},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0497254","display":"Musculoskeletal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00516"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0047159"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037430"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"L"},{"system":"http://loinc.org","code":"LP89781-6"},{"system":"http://ncimeta.nci.nih.gov","code":"C25348"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044938"}],"text":"Musculo Skeletal"}}},{"fullUrl":"Observation/ee352509-095a-4c0b-b37a-1ed1080b62a2","resource":{"resourceType":"Observation","id":"ee352509-095a-4c0b-b37a-1ed1080b62a2","extension":[{"extension":[{"url":"offset","valueInteger":4634},{"url":"length","valueInteger":21}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0240085","display":"JOINT ERYTHEMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002215"}],"text":"erythematous joints"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4563},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0497254","display":"Musculoskeletal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00516"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0047159"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037430"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"L"},{"system":"http://loinc.org","code":"LP89781-6"},{"system":"http://ncimeta.nci.nih.gov","code":"C25348"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044938"}],"text":"Musculo Skeletal"}}},{"fullUrl":"Observation/d404a332-dcfa-4fe6-9f50-5323c3d78013","resource":{"resourceType":"Observation","id":"d404a332-dcfa-4fe6-9f50-5323c3d78013","extension":[{"extension":[{"url":"offset","valueInteger":4586},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0451362","display":"Oxford grading scale for muscle strength"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000036033"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XM0gn"},{"system":"http://snomed.info/sct/731000124108","code":"273677009"}],"text":"strength"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueString":"5/5","interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4563},{"url":"length","valueInteger":16}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0497254","display":"Musculoskeletal"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00516"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0047159"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037430"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"L"},{"system":"http://loinc.org","code":"LP89781-6"},{"system":"http://ncimeta.nci.nih.gov","code":"C25348"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044938"}],"text":"Musculo Skeletal"}}},{"fullUrl":"Observation/337c4352-fe91-4c00-8b75-ede0f8d09e3c","resource":{"resourceType":"Observation","id":"337c4352-fe91-4c00-8b75-ede0f8d09e3c","extension":[{"extension":[{"url":"offset","valueInteger":4674},{"url":"length","valueInteger":22}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"Alert and oriented x 3"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4659},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0205494","display":"Neurologic (qualifier value)"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00565"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0045754"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020628"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"N"},{"system":"http://loinc.org","code":"LA16973-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25262"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25262"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000057"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-B119"},{"system":"http://snomed.info/sct/731000124108","code":"1199008"}],"text":"Neurological"}}},{"fullUrl":"Observation/ef257aa0-740c-41f3-be98-dfae30ce099c","resource":{"resourceType":"Observation","id":"ef257aa0-740c-41f3-be98-dfae30ce099c","extension":[{"extension":[{"url":"offset","valueInteger":4706},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"text":"grossly intact"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}],"bodySite":{"extension":[{"extension":[{"url":"offset","valueInteger":4659},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0205494","display":"Neurologic (qualifier value)"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00565"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0045754"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020628"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"N"},{"system":"http://loinc.org","code":"LA16973-2"},{"system":"http://ncimeta.nci.nih.gov","code":"C25262"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044117"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25262"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000057"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-B119"},{"system":"http://snomed.info/sct/731000124108","code":"1199008"}],"text":"Neurological"}}},{"fullUrl":"List/4353769c-64cc-4659-a239-efea24311f2e","resource":{"resourceType":"List","id":"4353769c-64cc-4659-a239-efea24311f2e","status":"current","mode":"snapshot","title":"Physical Examination","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Observation/6d6344e6-464a-4652-a6dc-f20c2a3869d6","type":"Observation","display":"Temp"}},{"item":{"reference":"Observation/38f84639-0240-4b1e-a6da-22f079a5dc3d","type":"Observation","display":"Pulse"}},{"item":{"reference":"Observation/accba11a-ad34-462f-b16a-174afe057995","type":"Observation","display":"O2"}},{"item":{"reference":"Observation/93d28e03-64b7-404e-8c4c-8497a3c1f244","type":"Observation","display":"RR"}},{"item":{"reference":"Observation/c6dab3c6-9e14-40ab-9cbd-f7f70b23400b","type":"Observation","display":"BP"}},{"item":{"reference":"Observation/001ef1a6-ed67-4758-8c01-3d7ab54382c9","type":"Observation","display":"NAD"}},{"item":{"reference":"Observation/ba2453b5-c68c-4d75-8eb6-d5b73de8a578","type":"Observation","display":"up in bed"}},{"item":{"reference":"Observation/92e2a522-850e-402e-a13c-c8d6a33a79c8","type":"Observation","display":"well groomed"}},{"item":{"reference":"Observation/0305a72e-1be6-4b63-b418-1d641ebd106d","type":"Observation","display":"nightgown"}},{"item":{"reference":"Observation/c006ed4f-e3e5-43da-9e47-cea7525a28d1","type":"Observation","display":"PERRLA"}},{"item":{"reference":"Observation/2062769e-4713-4ebd-a1b2-1c98429361dc","type":"Observation","display":"EOM intact"}},{"item":{"reference":"Observation/b27f0400-9139-47cd-a5c4-837f19cb8aaa","type":"Observation","display":"swollen tounge"}},{"item":{"reference":"Observation/69c84ffd-5600-4890-b0bc-d61a2a446fd6","type":"Observation","display":"tounge was large"}},{"item":{"reference":"Observation/69471b6b-abc4-457b-bfcd-33911b31a7ee","type":"Observation","display":"obscured the view"}},{"item":{"reference":"Observation/f73baecf-902d-4d27-96a6-a27baa41d1bc","type":"Observation","display":"swelling"}},{"item":{"reference":"Observation/b769bf15-c1ce-4e99-a16b-497a4717a1a5","type":"Observation","display":"redness"}},{"item":{"reference":"Observation/c54a60b0-0a04-4f17-8ac3-ea1ea7ce40ab","type":"Observation","display":"rash"}},{"item":{"reference":"Observation/f7f0c8c0-b473-4df7-aa3b-2f0b425a5342","type":"Observation","display":"lymphadenopathy"}},{"item":{"reference":"Observation/ce0ef48b-7d52-446f-a501-d398c070c0e9","type":"Observation","display":"RRR"}},{"item":{"reference":"Observation/23a08c8f-5293-4761-b144-d8b4776ea4e6","type":"Observation","display":"m/r/g"}},{"item":{"reference":"Observation/e134033b-7d5a-41eb-bb13-0e9cd149fe2a","type":"Observation","display":"JVD"}},{"item":{"reference":"Observation/8bb175d9-7a0d-434b-a62d-bf97a49bb261","type":"Observation","display":"carotid bruits"}},{"item":{"reference":"Observation/ef9a50ee-6b56-45c2-9769-04e2fc7e1052","type":"Observation","display":"Clear to auscltation"}},{"item":{"reference":"Observation/62c4a367-4b79-4e4f-b6cd-f6063d41b0b1","type":"Observation","display":"use of acessory muscles"}},{"item":{"reference":"Observation/b0e3e645-fdfe-4e2e-9e1f-e3af0f99580a","type":"Observation","display":"crackles"}},{"item":{"reference":"Observation/08fd4874-bbd6-447e-b65d-6ef0541b9be8","type":"Observation","display":"wheezes"}},{"item":{"reference":"Observation/b6a7c561-40cd-4f4c-9e3d-4010424f7dcd","type":"Observation","display":"rashes"}},{"item":{"reference":"Observation/b903e342-8eb1-4d0a-9f10-a9a7a1f371f1","type":"Observation","display":"skin warm"}},{"item":{"reference":"Observation/f725aee3-ee72-4bad-b12c-0e1d757da440","type":"Observation","display":"dry"}},{"item":{"reference":"Observation/e0baed06-518a-49b1-9ef3-938c45d2f488","type":"Observation","display":"erythematous areas"}},{"item":{"reference":"Observation/fe9c86ab-fef0-43fc-8556-f687a90461be","type":"Observation","display":"Normal bowel sounds"}},{"item":{"reference":"Observation/d1aae4cd-1487-466a-bda3-75a3b0750c4a","type":"Observation","display":"abdomen soft"}},{"item":{"reference":"Observation/7d63cc6f-00ca-4410-b282-d1bc92d9d569","type":"Observation","display":"nontender"}},{"item":{"reference":"Observation/8e788834-864f-4331-a51e-a5b2709af6c0","type":"Observation","display":"edema"}},{"item":{"reference":"Observation/c4114093-1e0e-42d3-a1a7-053cda0021e1","type":"Observation","display":"cyanosis"}},{"item":{"reference":"Observation/76abe39a-811d-4457-8a34-77a18666157f","type":"Observation","display":"clubbing"}},{"item":{"reference":"Observation/44f87849-ec09-4f87-94e0-010f7cdcb7e8","type":"Observation","display":"normal range of motion"}},{"item":{"reference":"Observation/ae964a2a-ae2e-4d80-82e3-4ec52bed2587","type":"Observation","display":"swollen"}},{"item":{"reference":"Observation/ee352509-095a-4c0b-b37a-1ed1080b62a2","type":"Observation","display":"erythematous joints"}},{"item":{"reference":"Observation/d404a332-dcfa-4fe6-9f50-5323c3d78013","type":"Observation","display":"strength"}},{"item":{"reference":"Observation/337c4352-fe91-4c00-8b75-ede0f8d09e3c","type":"Observation","display":"Alert and oriented x 3"}},{"item":{"reference":"Observation/ef257aa0-740c-41f3-be98-dfae30ce099c","type":"Observation","display":"grossly intact"}}]}},{"fullUrl":"Condition/30a28633-ff5a-466e-a0a9-73de181c594c","resource":{"resourceType":"Condition","id":"30a28633-ff5a-466e-a0a9-73de181c594c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":4917},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"unconfirmed","display":"Unconfirmed"}],"text":"Unconfirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}],"text":"Problem List Item"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0022116","display":"Ischemia"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005321"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0042499"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000006936"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000392"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0571-6706"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU040398"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002515"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85068338"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10061255"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"351304"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D007511"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003303"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"03400"},{"system":"http://ncimeta.nci.nih.gov","code":"C34738"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1942"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000630922"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"26660"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79pz"},{"system":"http://snomed.info/sct","code":"F-72240"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-39340"},{"system":"http://snomed.info/sct/731000124108","code":"52674009"}],"text":"ischemia"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Observation/d4ec6ca7-6c61-486c-9b41-6197805c977b","resource":{"resourceType":"Observation","id":"d4ec6ca7-6c61-486c-9b41-6197805c977b","extension":[{"extension":[{"url":"offset","valueInteger":4758},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0037473","display":"sodium"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005817"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0024754"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011478"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32070"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2730-2702"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"2082"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004374"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85124249"},{"system":"http://loinc.org","code":"LP15099-2"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3666"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"5467"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D012964"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"9NEZ333N27"},{"system":"http://ncimeta.nci.nih.gov","code":"C830"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C830"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"31090"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"9NEZ333N27"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044731"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"000755"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"48590"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X80D5"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"9853"},{"system":"http://snomed.info/sct","code":"F-10580"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-15500"},{"system":"http://snomed.info/sct/731000124108","code":"39972003"},{"system":"http://hl7.org/fhir/ndfrt","code":"4018159"}],"text":"Na"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":140},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/00e92723-a0db-48c2-ba13-306ccaae8c6b","resource":{"resourceType":"Observation","id":"00e92723-a0db-48c2-ba13-306ccaae8c6b","extension":[{"extension":[{"url":"offset","valueInteger":4767},{"url":"length","valueInteger":1}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0202194","display":"Potassium measurement"},{"system":"http://www.nlm.nih.gov/research/umls/alt","code":"DEBAG"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020017"},{"system":"http://www.ama-assn.org/go/cpt","code":"80048"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A34014"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10036439"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"324291"},{"system":"http://ncimeta.nci.nih.gov","code":"C64853"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_crch","code":"C68280"},{"system":"http://snomed.info/sct","code":"P-4020"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-73850"},{"system":"http://snomed.info/sct/731000124108","code":"59573005"}],"text":"K"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":4.5},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/c0c43185-02f2-4e7c-97e7-88cec0c161ce","resource":{"resourceType":"Observation","id":"c0c43185-02f2-4e7c-97e7-88cec0c161ce","extension":[{"extension":[{"url":"offset","valueInteger":4775},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0201952","display":"Chloride measurement"},{"system":"http://www.nlm.nih.gov/research/umls/alt","code":"DEBAC"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000019962"},{"system":"http://www.ama-assn.org/go/cpt","code":"80053"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10008572"},{"system":"http://ncimeta.nci.nih.gov","code":"C64495"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-72420"},{"system":"http://snomed.info/sct/731000124108","code":"46511006"}],"text":"Cl"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":109},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/777735eb-1122-4e71-9bae-2a6687fbb970","resource":{"resourceType":"Observation","id":"777735eb-1122-4e71-9bae-2a6687fbb970","extension":[{"extension":[{"url":"offset","valueInteger":4784},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0201930","display":"Carbon dioxide content measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020012"},{"system":"http://www.ama-assn.org/go/cpt","code":"82374"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"82374"},{"system":"http://loinc.org","code":"LP188646-6"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10007220"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000356"},{"system":"http://ncimeta.nci.nih.gov","code":"C64545"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X799H"},{"system":"http://snomed.info/sct","code":"P-4020"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-72250"},{"system":"http://snomed.info/sct/731000124108","code":"31542002"}],"text":"Co2"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":23},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/a1154c31-f30d-4a44-889a-be0de1275f17","resource":{"resourceType":"Observation","id":"a1154c31-f30d-4a44-889a-be0de1275f17","extension":[{"extension":[{"url":"offset","valueInteger":4793},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0005845","display":"Blood urea nitrogen measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000057776"},{"system":"http://www.ama-assn.org/go/cpt","code":"84520"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0633-5558"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"84520"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10005845"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"12167"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001806"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000141"},{"system":"http://ncimeta.nci.nih.gov","code":"C61019"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C61019"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C61019"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-74191"},{"system":"http://snomed.info/sct/731000124108","code":"105011006"}],"text":"BUN"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":29},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/0436e09c-d08f-46d5-9399-89f8ea7f503f","resource":{"resourceType":"Observation","id":"0436e09c-d08f-46d5-9399-89f8ea7f503f","extension":[{"extension":[{"url":"offset","valueInteger":4802},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0201975","display":"Creatinine measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000031640"},{"system":"http://www.ama-assn.org/go/cpt","code":"82565"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"82565"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"U34002"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10005480"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"327261"},{"system":"http://ncimeta.nci.nih.gov","code":"C64547"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C64547"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C64547"},{"system":"http://snomed.info/sct","code":"P-4020"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-72600"},{"system":"http://snomed.info/sct/731000124108","code":"70901006"}],"text":"Cr"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":1.0},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70","resource":{"resourceType":"Observation","id":"e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70","extension":[{"extension":[{"url":"offset","valueInteger":4811},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0201925","display":"Calcium measurement"},{"system":"http://www.nlm.nih.gov/research/umls/alt","code":"DEBAB"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037314"},{"system":"http://www.ama-assn.org/go/cpt","code":"82310"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"82310"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10006891"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"327180"},{"system":"http://ncimeta.nci.nih.gov","code":"C64488"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTESTCD"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C64488"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-72230"},{"system":"http://snomed.info/sct/731000124108","code":"71878006"}],"text":"Ca"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":9.9},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/cc10796c-76b3-4f5b-8161-2b2b01c836de","resource":{"resourceType":"Observation","id":"cc10796c-76b3-4f5b-8161-2b2b01c836de","extension":[{"extension":[{"url":"offset","valueInteger":4820},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0373675","display":"Magnesium measurement"},{"system":"http://www.nlm.nih.gov/research/umls/alt","code":"DEBAE"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000031648"},{"system":"http://www.ama-assn.org/go/cpt","code":"83735"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"83735"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10025430"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"403353"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000385"},{"system":"http://ncimeta.nci.nih.gov","code":"C64840"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C64840"},{"system":"http://snomed.info/sct","code":"P-4020"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-73480"},{"system":"http://snomed.info/sct/731000124108","code":"38151008"}],"text":"Mg"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":1.4},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/cb44c630-a949-4f2b-96aa-9c15d4a23b4b","resource":{"resourceType":"Observation","id":"cb44c630-a949-4f2b-96aa-9c15d4a23b4b","extension":[{"extension":[{"url":"offset","valueInteger":4829},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0523826","display":"Phosphate measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000038223"},{"system":"http://www.ama-assn.org/go/cpt","code":"84100"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"84100"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10034928"},{"system":"http://ncimeta.nci.nih.gov","code":"C64857"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C64857"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-73759"},{"system":"http://snomed.info/sct/731000124108","code":"104866001"}],"text":"Phos"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":3.6},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/1407819d-8e9b-458a-ad93-44962f0f823e","resource":{"resourceType":"Observation","id":"1407819d-8e9b-458a-ad93-44962f0f823e","extension":[{"extension":[{"url":"offset","valueInteger":4842},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0030605","display":"Activated Partial Thromboplastin Time measurement"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007272"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1010832"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009335"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32162"},{"system":"http://www.ama-assn.org/go/cpt","code":"1011869"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10000630"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"12133"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010314"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000082"},{"system":"http://ncimeta.nci.nih.gov","code":"C38462"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://snomed.info/sct","code":"P-2256"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-10590"},{"system":"http://snomed.info/sct/731000124108","code":"42525009"}],"text":"PTT"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":26.7},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/78010f01-3865-41fd-aa16-3e8f208cee1d","resource":{"resourceType":"Observation","id":"78010f01-3865-41fd-aa16-3e8f208cee1d","extension":[{"extension":[{"url":"offset","valueInteger":4855},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0023508","display":"White Blood Cell Count procedure"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007246"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007357"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32937"},{"system":"http://www.ama-assn.org/go/cpt","code":"85004"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0455-4964"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"85004"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10047939"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"12012"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D007958"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U002041"},{"system":"http://ncimeta.nci.nih.gov","code":"C51948"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C51948"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C51948"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C51948"},{"system":"http://snomed.info/sct","code":"P-2945"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-30520"},{"system":"http://snomed.info/sct/731000124108","code":"767002"}],"text":"WBC"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":9.9},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/4bdb2158-fd49-4f92-bc8c-81ea30d855af","resource":{"resourceType":"Observation","id":"4bdb2158-fd49-4f92-bc8c-81ea30d855af","extension":[{"extension":[{"url":"offset","valueInteger":4865},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0518015","display":"Hemoglobin measurement"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0053182"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000037622"},{"system":"http://www.ama-assn.org/go/cpt","code":"88738"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"88738"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"B34018"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10018876"},{"system":"http://ncimeta.nci.nih.gov","code":"C64848"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C64848"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C64848"},{"system":"http://snomed.info/sct","code":"P-2852"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-34100"}],"text":"Hgb"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":10.0},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/15ed1f67-8720-4656-89cd-b49dc51df4dd","resource":{"resourceType":"Observation","id":"15ed1f67-8720-4656-89cd-b49dc51df4dd","extension":[{"extension":[{"url":"offset","valueInteger":4876},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0018935","display":"Hematocrit procedure"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000024263"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0053669"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005948"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32824"},{"system":"http://www.ama-assn.org/go/cpt","code":"85014"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0455-2482"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"85014"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002130"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85060126"},{"system":"http://loinc.org","code":"LP15101-6"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10018837"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"327272"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006400"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U001974"},{"system":"http://ncimeta.nci.nih.gov","code":"C64796"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTESTCD"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C64796"},{"system":"http://snomed.info/sct","code":"P-2851"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-34080"},{"system":"http://snomed.info/sct/731000124108","code":"28317006"}],"text":"Hct"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":30.3},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/8c156cdd-f6ab-4513-af22-037a1042b7a4","resource":{"resourceType":"Observation","id":"8c156cdd-f6ab-4513-af22-037a1042b7a4","extension":[{"extension":[{"url":"offset","valueInteger":4887},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0032181","display":"Platelet Count measurement"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007263"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000009833"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"32921"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10035525"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"12024"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D010976"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000021"},{"system":"http://ncimeta.nci.nih.gov","code":"C51951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C51951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C51951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C51951"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C51951"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"42P.."},{"system":"http://snomed.info/sct","code":"P-2883"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-30600"},{"system":"http://snomed.info/sct/731000124108","code":"61928009"}],"text":"Plt"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueQuantity":{"value":373},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/57f1eb8b-1a8a-42c5-aed8-0552b5c02bff","resource":{"resourceType":"Observation","id":"57f1eb8b-1a8a-42c5-aed8-0552b5c02bff","extension":[{"extension":[{"url":"offset","valueInteger":4899},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1623258","display":"Electrocardiography"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007414"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0060892"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1393-7104"},{"system":"http://www.nlm.nih.gov/research/umls/hcpcs","code":"Level 2: G0403-G0405"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001526"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85042098"},{"system":"http://loinc.org","code":"LP100599-2"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10014084"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004562"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"007"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"89.52"},{"system":"http://ncimeta.nci.nih.gov","code":"C38053"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C38053"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000635410"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"16480"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"32..."},{"system":"http://snomed.info/sct","code":"P-7100"},{"system":"http://snomed.info/sct/900000000000207008","code":"P2-31000"},{"system":"http://snomed.info/sct/731000124108","code":"29303009"}],"text":"EKG"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"List/6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210","resource":{"resourceType":"List","id":"6bbdb74b-0263-4e3f-9cf0-e3f44dfe1210","status":"current","mode":"snapshot","title":"Pertinent Diagnostic Tests","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Condition/30a28633-ff5a-466e-a0a9-73de181c594c","type":"Condition","display":"ischemia"}},{"item":{"reference":"Observation/d4ec6ca7-6c61-486c-9b41-6197805c977b","type":"Observation","display":"Na"}},{"item":{"reference":"Observation/00e92723-a0db-48c2-ba13-306ccaae8c6b","type":"Observation","display":"K"}},{"item":{"reference":"Observation/c0c43185-02f2-4e7c-97e7-88cec0c161ce","type":"Observation","display":"Cl"}},{"item":{"reference":"Observation/777735eb-1122-4e71-9bae-2a6687fbb970","type":"Observation","display":"Co2"}},{"item":{"reference":"Observation/a1154c31-f30d-4a44-889a-be0de1275f17","type":"Observation","display":"BUN"}},{"item":{"reference":"Observation/0436e09c-d08f-46d5-9399-89f8ea7f503f","type":"Observation","display":"Cr"}},{"item":{"reference":"Observation/e6e1a3d4-9d4f-45b5-a6f0-9550cccdab70","type":"Observation","display":"Ca"}},{"item":{"reference":"Observation/cc10796c-76b3-4f5b-8161-2b2b01c836de","type":"Observation","display":"Mg"}},{"item":{"reference":"Observation/cb44c630-a949-4f2b-96aa-9c15d4a23b4b","type":"Observation","display":"Phos"}},{"item":{"reference":"Observation/1407819d-8e9b-458a-ad93-44962f0f823e","type":"Observation","display":"PTT"}},{"item":{"reference":"Observation/78010f01-3865-41fd-aa16-3e8f208cee1d","type":"Observation","display":"WBC"}},{"item":{"reference":"Observation/4bdb2158-fd49-4f92-bc8c-81ea30d855af","type":"Observation","display":"Hgb"}},{"item":{"reference":"Observation/15ed1f67-8720-4656-89cd-b49dc51df4dd","type":"Observation","display":"Hct"}},{"item":{"reference":"Observation/8c156cdd-f6ab-4513-af22-037a1042b7a4","type":"Observation","display":"Plt"}},{"item":{"reference":"Observation/57f1eb8b-1a8a-42c5-aed8-0552b5c02bff","type":"Observation","display":"EKG"}}]}},{"fullUrl":"Condition/77cd7165-bb64-4cfd-aa2b-bb48cc46e531","resource":{"resourceType":"Condition","id":"77cd7165-bb64-4cfd-aa2b-bb48cc46e531","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":4991},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0002994","display":"Angioedema"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00587"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1001287"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001177"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1849-1576"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ANGIOEDEMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000116"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0100665"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU006380"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A92010"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000249"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005030"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10002424"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"31834"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000799"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"995.1"},{"system":"http://ncimeta.nci.nih.gov","code":"C112175"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"4536"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C112175"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"041714"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU010698"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"SN51."},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"SN51."},{"system":"http://snomed.info/sct","code":"D-3541"},{"system":"http://snomed.info/sct/900000000000207008","code":"D0-20100"},{"system":"http://snomed.info/sct/731000124108","code":"41291007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0003"}],"text":"angioedema"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":5018},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0040408","display":"Tongue"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005476"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000012352"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2139-2049"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"54640"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"TONG"},{"system":"http://hl7.org/fhir/sid/icf-nl","code":"s3203"},{"system":"http://hl7.org/fhir/sid/icf-cy","code":"s3203"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004718"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85135992"},{"system":"http://loinc.org","code":"LP30556-2"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D014059"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U002312"},{"system":"http://ncimeta.nci.nih.gov","code":"C12422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C12422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C12422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C12422"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"53490"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"7N234"},{"system":"http://snomed.info/sct","code":"T-53000"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-53000"},{"system":"http://snomed.info/sct/731000124108","code":"21974007"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"54640"}],"text":"tongue"},{"extension":[{"extension":[{"url":"offset","valueInteger":5035},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0007966","display":"Cheek structure"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000016962"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000002727"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2139-1459"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"46476"},{"system":"http://www.nlm.nih.gov/research/umls/hl7v2.5","code":"CHEEK"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000928"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85022839"},{"system":"http://loinc.org","code":"LP76299-4"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D002610"},{"system":"http://ncimeta.nci.nih.gov","code":"C13070"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C13070"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa2E3"},{"system":"http://snomed.info/sct","code":"T-Y0300"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-D1206"},{"system":"http://snomed.info/sct/731000124108","code":"60819002"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"46476"}],"text":"inner cheek"}],"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"note":[{"text":"significant"}]}},{"fullUrl":"Condition/84e0eb82-5459-4999-b953-ea05b89e79c0","resource":{"resourceType":"Condition","id":"84e0eb82-5459-4999-b953-ea05b89e79c0","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5061},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0002994","display":"Angioedema"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00587"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1001287"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001177"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1849-1576"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ANGIOEDEMA"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U000116"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0100665"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"T78.3"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU006380"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A92010"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000249"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005030"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10002424"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"31834"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000799"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"995.1"},{"system":"http://ncimeta.nci.nih.gov","code":"C112175"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"4536"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C112175"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"041714"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU010698"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"SN51."},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"SN51."},{"system":"http://snomed.info/sct","code":"D-3541"},{"system":"http://snomed.info/sct/900000000000207008","code":"D0-20100"},{"system":"http://snomed.info/sct/731000124108","code":"41291007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0003"}],"text":"angioedema"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/3d019165-1eb8-4431-982c-d2bffeafb22d","resource":{"resourceType":"Condition","id":"3d019165-1eb8-4431-982c-d2bffeafb22d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5080},{"url":"length","valueInteger":29}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"text":"allergic anaphylaxis reaction"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/5c47dbb1-5514-487e-a564-e12402f51c57","resource":{"resourceType":"Condition","id":"5c47dbb1-5514-487e-a564-e12402f51c57","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5111},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0458082","display":"Drug-induced"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000036769"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0vQ"},{"system":"http://snomed.info/sct/731000124108","code":"278993004"}],"text":"drug induced"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/6bdde1ff-93a7-4683-b73f-b48e4af1ff31","resource":{"resourceType":"Condition","id":"6bdde1ff-93a7-4683-b73f-b48e4af1ff31","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5125},{"url":"length","valueInteger":27}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0162820","display":"Dermatitis, Allergic Contact"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000017993"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"L23.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"L23.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"L23.9"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"S88"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU018967"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10056265"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"319771"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017449"},{"system":"http://ncimeta.nci.nih.gov","code":"C26998"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X505x"},{"system":"http://snomed.info/sct","code":"M-47610"},{"system":"http://snomed.info/sct/731000124108","code":"238575004"}],"text":"allergic contact dermatitis"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/112cc672-89ec-4bcc-aaad-daa42d1b891c","resource":{"resourceType":"Condition","id":"112cc672-89ec-4bcc-aaad-daa42d1b891c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5154},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0042769","display":"Virus Diseases"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004796"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00714"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0035009"},{"system":"http://www.nlm.nih.gov/research/umls/ccs","code":"1.3"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"INF008"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"INF008"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000013022"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000723"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"3099-8150"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"INFECT VIRAL"},{"system":"http://www.nlm.nih.gov/research/umls/go","code":"GO:0016032"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"B34.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"B34.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"B34.9"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU038648"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A77005"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004960"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85143818"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10047461"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"90185"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"454"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D014777"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"789"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"079.99"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"03374"},{"system":"http://ncimeta.nci.nih.gov","code":"C3439"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C3439"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2248"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3439"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C3439"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU054517"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000643529"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"55780"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X70Iu"},{"system":"http://snomed.info/sct","code":"D-0350"},{"system":"http://snomed.info/sct/900000000000207008","code":"DE-30000"},{"system":"http://snomed.info/sct/731000124108","code":"34014006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0740"}],"text":"viral infection"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/c39abf61-4871-4af2-a4da-1742d57366df","resource":{"resourceType":"Condition","id":"c39abf61-4871-4af2-a4da-1742d57366df","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5171},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0458082","display":"Drug-induced"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000036769"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa0vQ"},{"system":"http://snomed.info/sct/731000124108","code":"278993004"}],"text":"drug induced"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33","resource":{"resourceType":"Condition","id":"dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5190},{"url":"length","valueInteger":32}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"text":"C1 inhibitor deficiency disorder"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"note":[{"text":"hereditary"}]}},{"fullUrl":"Condition/16972d09-73fe-48c9-a2a4-e22ad9f97f4a","resource":{"resourceType":"Condition","id":"16972d09-73fe-48c9-a2a4-e22ad9f97f4a","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5285},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0040425","display":"Tonsillitis"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1013382"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000012362"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000679"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PHARYNGITIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004087"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0011110"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU074496"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R76003"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004721"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85136023"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10044008"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"31373"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"6440"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D014069"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"463"},{"system":"http://ncimeta.nci.nih.gov","code":"C116006"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C116006"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU071368"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7I0"},{"system":"http://snomed.info/sct","code":"M-40000"},{"system":"http://snomed.info/sct/900000000000207008","code":"DC-71200"},{"system":"http://snomed.info/sct/731000124108","code":"90176007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0523"}],"text":"tonsillitis"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/8c8aef3f-ad3f-43aa-87ec-1a27a9d79974","resource":{"resourceType":"Condition","id":"8c8aef3f-ad3f-43aa-87ec-1a27a9d79974","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5298},{"url":"length","valueInteger":20}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"text":"peritonsilar abscess"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/289d84a2-ba55-4913-9b1c-0a26a764de98","resource":{"resourceType":"Condition","id":"289d84a2-ba55-4913-9b1c-0a26a764de98","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5402},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"unconfirmed","display":"Unconfirmed"}],"text":"Unconfirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0000833","display":"Abscess"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004497"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017218"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000562"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"016"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0944-6244"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"ABSCESS"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0025615"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A78037"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000008"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85000225"},{"system":"http://loinc.org","code":"LP6994-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10000269"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"359505"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"3063"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000038"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"682.9"},{"system":"http://ncimeta.nci.nih.gov","code":"C26686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C26686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C26686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1690"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044786"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C26686"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C26686"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU059473"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa9Gg"},{"system":"http://snomed.info/sct","code":"M-41740"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-41610"},{"system":"http://snomed.info/sct/731000124108","code":"128477000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0887"}],"text":"abscess"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/f0146bb6-0421-455c-8d99-3910655c92e6","resource":{"resourceType":"Condition","id":"f0146bb6-0421-455c-8d99-3910655c92e6","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5413},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"unconfirmed","display":"Unconfirmed"}],"text":"Unconfirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0040425","display":"Tonsillitis"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1013382"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000012362"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"U000679"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"PHARYNGITIS"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U004087"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0011110"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU074496"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R76003"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004721"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85136023"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10044008"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"31373"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"6440"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D014069"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"463"},{"system":"http://ncimeta.nci.nih.gov","code":"C116006"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C116006"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU071368"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"Xa7I0"},{"system":"http://snomed.info/sct","code":"M-40000"},{"system":"http://snomed.info/sct/900000000000207008","code":"DC-71200"},{"system":"http://snomed.info/sct/731000124108","code":"90176007"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0523"}],"text":"tonsillitis"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Condition/8a00a3c1-8df7-4446-8d10-cb9e87f54776","resource":{"resourceType":"Condition","id":"8a00a3c1-8df7-4446-8d10-cb9e87f54776","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"]},"extension":[{"extension":[{"url":"offset","valueInteger":5488},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}],"text":"Encounter Diagnosis"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3714514","display":"Infection"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004491"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"K25.6"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1018029"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000006691"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"413"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"INFECT"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002090"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10023032"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU038002"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A78051"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U002423"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85066076"},{"system":"http://loinc.org","code":"LP130385-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10021789"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"363071"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"12"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D007239"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"11_37"},{"system":"http://ncimeta.nci.nih.gov","code":"C128320"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C128320"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C128320"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"110607"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"50.01"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_07010.00"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041393"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"25150"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79pw"},{"system":"http://snomed.info/sct","code":"D-0070"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0736"}],"text":"infection"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"Observation/db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8","resource":{"resourceType":"Observation","id":"db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8","extension":[{"extension":[{"url":"offset","valueInteger":5247},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0023052","display":"Laryngeal Edema"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0025764"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000007220"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"EDEMA LARYNX"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U002322"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0012027"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"J38.4"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"J38.4"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"J38.4"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"J38.4"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"J38.4"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"478.6"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU054028"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10023845"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"6873"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D007819"},{"system":"http://ncimeta.nci.nih.gov","code":"C79607"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E13393"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070601"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU019551"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"H1y6."},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"H1y6."},{"system":"http://snomed.info/sct/900000000000207008","code":"D2-04460"},{"system":"http://snomed.info/sct/731000124108","code":"51599000"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0522"}],"text":"Laryngeal edema"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/3ba4adfa-8a50-4015-b4f4-1a4258a4e78a","resource":{"resourceType":"Observation","id":"3ba4adfa-8a50-4015-b4f4-1a4258a4e78a","extension":[{"extension":[{"url":"offset","valueInteger":5322},{"url":"length","valueInteger":23}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0161010","display":"Foreign body in pharynx"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000017733"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"T17.2"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"T17.2"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"T17.2"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"933.0"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU019574"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"R87007"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10017030"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"30801"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"933.0"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"SG30."},{"system":"http://snomed.info/sct/900000000000207008","code":"DD-61410"},{"system":"http://snomed.info/sct/731000124108","code":"25479004"}],"text":"pharyngeal foreign body"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/96088972-8e18-477f-b634-064edf59a1ba","resource":{"resourceType":"Observation","id":"96088972-8e18-477f-b634-064edf59a1ba","extension":[{"extension":[{"url":"offset","valueInteger":5386},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0013604","display":"Edema"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000005462"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00114"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1014846"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000029664"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"273"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0465-4760"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"EDEMA"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0000969"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-ae","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-amae","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R60.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"782.3"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU053978"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"K07003"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001504"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85040948"},{"system":"http://loinc.org","code":"MTHU019803"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10030095"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"7268"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004487"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"782.3"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"00501"},{"system":"http://ncimeta.nci.nih.gov","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1820"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045676"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3002"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"250905"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU000002"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"29.01"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XE0qw"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"XE0qw"},{"system":"http://snomed.info/sct","code":"M-36500"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-36300"},{"system":"http://snomed.info/sct/731000124108","code":"267038008"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"66941"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0398"}],"text":"edema"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"ND","display":"Not Detected"}],"text":"Not Detected"}]}},{"fullUrl":"Observation/f97026d8-5906-44e8-9eca-834c2ede6406","resource":{"resourceType":"Observation","id":"f97026d8-5906-44e8-9eca-834c2ede6406","extension":[{"extension":[{"url":"offset","valueInteger":5464},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015967","display":"Fever"},{"system":"http://www.nlm.nih.gov/research/umls/air","code":"FEVER"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004396"},{"system":"http://www.nlm.nih.gov/research/umls/bi","code":"BI00751"},{"system":"http://www.nlm.nih.gov/research/umls/ccc","code":"K25.2"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1017166"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_10","code":"SYM002"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10cm","code":"SYM002"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005010"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"300"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"65287"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2871-4310"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"FEVER"},{"system":"http://www.nlm.nih.gov/research/umls/dxp","code":"U001483"},{"system":"http://www.nlm.nih.gov/research/umls/go","code":"GO:0001660"},{"system":"http://www.nlm.nih.gov/research/umls/hpo","code":"HP:0001945"},{"system":"http://hl7.org/fhir/sid/icd-10","code":"R50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-am","code":"R50.9"},{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"R50.9"},{"system":"http://hl7.org/fhir/sid/icd-9-cm","code":"780.60"},{"system":"http://www.nlm.nih.gov/research/umls/icnp","code":"10041539"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A03"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A03"},{"system":"http://hl7.org/fhir/sid/icpc2icd10eng","code":"MTHU041751"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A03002"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U001776"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85047994"},{"system":"http://loinc.org","code":"MTHU013518"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10005911"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"6005"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"511"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005334"},{"system":"http://www.nlm.nih.gov/research/umls/mthicd9","code":"780.60"},{"system":"http://www.nlm.nih.gov/research/umls/nanda-i","code":"01128"},{"system":"http://ncimeta.nci.nih.gov","code":"C3038"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctcae","code":"E11102"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"1858"},{"system":"http://www.nlm.nih.gov/research/umls/nci_gdc","code":"C3038"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000450108"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C3038"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C3038"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"070307"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU005439"},{"system":"http://www.nlm.nih.gov/research/umls/oms","code":"50.03"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"PRB_11020.02"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000775882"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"23840"},{"system":"http://www.nlm.nih.gov/research/umls/qmr","code":"Q0200115"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76EI"},{"system":"http://snomed.info/sct","code":"F-03003"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-03003"},{"system":"http://snomed.info/sct/731000124108","code":"386661006"},{"system":"http://www.nlm.nih.gov/research/umls/who","code":"0725"}],"text":"fever"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"NEG","display":"Negative"}],"text":"Negative"}]}},{"fullUrl":"Observation/541b22ee-0c28-48fe-b8c5-342d4271e4d0","resource":{"resourceType":"Observation","id":"541b22ee-0c28-48fe-b8c5-342d4271e4d0","extension":[{"extension":[{"url":"offset","valueInteger":5479},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0311392","display":"Physical findings"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0037333"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000028401"},{"system":"http://www.nlm.nih.gov/research/umls/cst","code":"GENSIGNS"},{"system":"http://loinc.org","code":"LP73100-7"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"208847"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U003414"},{"system":"http://ncimeta.nci.nih.gov","code":"C53458"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-01280"},{"system":"http://snomed.info/sct/731000124108","code":"72670004"}],"text":"signs"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/bcefc8a5-b7dd-479d-aee0-1f8dd0497708","resource":{"resourceType":"Observation","id":"bcefc8a5-b7dd-479d-aee0-1f8dd0497708","extension":[{"extension":[{"url":"offset","valueInteger":5526},{"url":"length","valueInteger":8}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0038999","display":"Swelling"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000004456"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1000701"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000011957"},{"system":"http://www.nlm.nih.gov/research/umls/costar","code":"715"},{"system":"http://www.nlm.nih.gov/research/umls/icpc","code":"A08"},{"system":"http://www.nlm.nih.gov/research/umls/icpc2eeng","code":"A08"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A08003"},{"system":"http://loinc.org","code":"LA22440-4"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10042674"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"1229"},{"system":"http://ncimeta.nci.nih.gov","code":"C3399"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2091"},{"system":"http://www.nlm.nih.gov/research/umls/noc","code":"191325"},{"system":"http://www.nlm.nih.gov/research/umls/omim","code":"MTHU067007"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X76Eu"},{"system":"http://snomed.info/sct","code":"M-02570"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-02570"},{"system":"http://snomed.info/sct/731000124108","code":"442672001"}],"text":"swelling"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"extension":[{"extension":[{"url":"offset","valueInteger":5506},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"sudden onset"},{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"Positive"}]}},{"fullUrl":"Observation/58f6222d-e30e-49bb-8535-82b6985e1a80","resource":{"resourceType":"Observation","id":"58f6222d-e30e-49bb-8535-82b6985e1a80","extension":[{"extension":[{"url":"offset","valueInteger":5580},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"exam","display":"Exam"}],"text":"Exam"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0016542","display":"Foreign Bodies"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1005216"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005208"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U006444"},{"system":"http://loinc.org","code":"LP35022-0"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10070245"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"5607"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D005547"},{"system":"http://www.nlm.nih.gov/research/umls/mthmst","code":"MT160021"},{"system":"http://ncimeta.nci.nih.gov","code":"C34620"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C34620"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"2687"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79hh"},{"system":"http://snomed.info/sct","code":"M-30400"},{"system":"http://snomed.info/sct/900000000000207008","code":"M-30400"},{"system":"http://snomed.info/sct/731000124108","code":"19227008"}],"text":"foreign body"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"ND","display":"Not Detected"}],"text":"Not Detected"}]}},{"fullUrl":"ServiceRequest/adec7107-9636-40e0-86df-1948e119d5ec","resource":{"resourceType":"ServiceRequest","id":"adec7107-9636-40e0-86df-1948e119d5ec","extension":[{"extension":[{"url":"offset","valueInteger":5635},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0278260","display":"scopy"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000027149"},{"system":"http://snomed.info/sct/900000000000207008","code":"P1-07000"}],"text":"scoped"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"List/affbdb9c-c8d0-4774-89e9-e8486fd5379a","resource":{"resourceType":"List","id":"affbdb9c-c8d0-4774-89e9-e8486fd5379a","status":"current","mode":"snapshot","title":"Assessment and Plan","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"Condition/77cd7165-bb64-4cfd-aa2b-bb48cc46e531","type":"Condition","display":"angioedema"}},{"item":{"reference":"Condition/84e0eb82-5459-4999-b953-ea05b89e79c0","type":"Condition","display":"angioedema"}},{"item":{"reference":"Condition/3d019165-1eb8-4431-982c-d2bffeafb22d","type":"Condition","display":"allergic anaphylaxis reaction"}},{"item":{"reference":"Condition/5c47dbb1-5514-487e-a564-e12402f51c57","type":"Condition","display":"drug induced"}},{"item":{"reference":"Condition/6bdde1ff-93a7-4683-b73f-b48e4af1ff31","type":"Condition","display":"allergic contact dermatitis"}},{"item":{"reference":"Condition/112cc672-89ec-4bcc-aaad-daa42d1b891c","type":"Condition","display":"viral infection"}},{"item":{"reference":"Condition/c39abf61-4871-4af2-a4da-1742d57366df","type":"Condition","display":"drug induced"}},{"item":{"reference":"Condition/dcb0f56b-bdd4-4d6c-8e9d-921f98f14d33","type":"Condition","display":"C1 inhibitor deficiency disorder"}},{"item":{"reference":"Condition/16972d09-73fe-48c9-a2a4-e22ad9f97f4a","type":"Condition","display":"tonsillitis"}},{"item":{"reference":"Condition/8c8aef3f-ad3f-43aa-87ec-1a27a9d79974","type":"Condition","display":"peritonsilar abscess"}},{"item":{"reference":"Condition/289d84a2-ba55-4913-9b1c-0a26a764de98","type":"Condition","display":"abscess"}},{"item":{"reference":"Condition/f0146bb6-0421-455c-8d99-3910655c92e6","type":"Condition","display":"tonsillitis"}},{"item":{"reference":"Condition/8a00a3c1-8df7-4446-8d10-cb9e87f54776","type":"Condition","display":"infection"}},{"item":{"reference":"Observation/db7f2572-ddd6-4e2e-b8ab-33c72eca6ee8","type":"Observation","display":"Laryngeal edema"}},{"item":{"reference":"Observation/3ba4adfa-8a50-4015-b4f4-1a4258a4e78a","type":"Observation","display":"pharyngeal foreign body"}},{"item":{"reference":"Observation/96088972-8e18-477f-b634-064edf59a1ba","type":"Observation","display":"edema"}},{"item":{"reference":"Observation/f97026d8-5906-44e8-9eca-834c2ede6406","type":"Observation","display":"fever"}},{"item":{"reference":"Observation/541b22ee-0c28-48fe-b8c5-342d4271e4d0","type":"Observation","display":"signs"}},{"item":{"reference":"Observation/bcefc8a5-b7dd-479d-aee0-1f8dd0497708","type":"Observation","display":"swelling"}},{"item":{"reference":"Observation/58f6222d-e30e-49bb-8535-82b6985e1a80","type":"Observation","display":"foreign body"}},{"item":{"reference":"ServiceRequest/adec7107-9636-40e0-86df-1948e119d5ec","type":"ServiceRequest","display":"scoped"}}]}},{"fullUrl":"MedicationRequest/b66ac041-2556-4bee-9594-bcb151778222","resource":{"resourceType":"MedicationRequest","id":"b66ac041-2556-4bee-9594-bcb151778222","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":5697},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001617","display":"Adrenal Cortex Hormones"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000018706"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000762"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0059-5614"},{"system":"http://loinc.org","code":"LP31653-6"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4557"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000305"},{"system":"http://ncimeta.nci.nih.gov","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045658"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00990"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x002V"},{"system":"http://snomed.info/sct","code":"E-8510"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-B2400"},{"system":"http://snomed.info/sct/731000124108","code":"21568003"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021625"}],"text":"corticosteroid"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/77a51afd-e3f8-4266-9685-b093e2117b8f","resource":{"resourceType":"MedicationRequest","id":"77a51afd-e3f8-4266-9685-b093e2117b8f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":5805},{"url":"length","valueInteger":13}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0011777","display":"dexamethasone"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000018816"},{"system":"http://www.whocc.no/atc","code":"D07XB05"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003823"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0059-7733"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB01234"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"1014"},{"system":"http://loinc.org","code":"LP32530-5"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40973"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00206"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D003907"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"7S5I7G3JQL"},{"system":"http://ncimeta.nci.nih.gov","code":"C422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C422"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"00512"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0034521"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"7S5I7G3JQL"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045262"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"002174"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000039789"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"13905"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02M3"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"3264"},{"system":"http://snomed.info/sct","code":"E-8515"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-A0250"},{"system":"http://snomed.info/sct/731000124108","code":"372584003"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m23280"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001262"},{"system":"http://hl7.org/fhir/ndfrt","code":"4017922"}],"text":"Dexamethasone"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"text":"10 mg","timing":{"repeat":{"duration":4,"durationUnit":"d","frequency":3,"period":1,"periodUnit":"d"},"code":{"text":"tid, 4 days"}},"route":{"extension":[{"extension":[{"url":"offset","valueInteger":5825},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"IV"},"doseAndRate":[{"doseQuantity":{"value":10,"unit":"mg"}}]}]}},{"fullUrl":"MedicationRequest/b6517ef9-0757-4c29-8b25-eff19601d92e","resource":{"resourceType":"MedicationRequest","id":"b6517ef9-0757-4c29-8b25-eff19601d92e","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":5850},{"url":"length","valueInteger":13}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0019590","display":"Histamine Antagonists"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000019291"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0061867"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000006158"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1524-9334"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U005637"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005683"},{"system":"http://loinc.org","code":"LP18065-0"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40432"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006633"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"03160"},{"system":"http://snomed.info/sct","code":"E-8830"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-51000"},{"system":"http://snomed.info/sct/731000124108","code":"372806008"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001615"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021756"}],"text":"antihistamine"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/34446a47-a405-490a-9239-1a437eb75196","resource":{"resourceType":"MedicationRequest","id":"34446a47-a405-490a-9239-1a437eb75196","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":5905},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0012522","display":"diphenhydramine"},{"system":"http://www.whocc.no/atc","code":"R06AA02"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0011620"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003981"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2268-3427"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB01075"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4149"},{"system":"http://loinc.org","code":"MTHU063001"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"199649"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00212"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004155"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"8GTS82S83M"},{"system":"http://ncimeta.nci.nih.gov","code":"C61728"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C61728"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"01519"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"8GTS82S83M"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000449930"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004787"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"14310"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X79JE"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"3498"},{"system":"http://snomed.info/sct","code":"E-8845"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-51450"},{"system":"http://snomed.info/sct/731000124108","code":"372682005"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019724"}],"text":"Diphenhydramine"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"text":"25 mg","timing":{"repeat":{"duration":4,"durationUnit":"d","frequency":2,"period":1,"periodUnit":"d"},"code":{"text":"bid, 4 days"}},"doseAndRate":[{"doseQuantity":{"value":25,"unit":"mg"}}]}]}},{"fullUrl":"MedicationRequest/c55c95d4-7789-43e2-9833-32a97ac38630","resource":{"resourceType":"MedicationRequest","id":"c55c95d4-7789-43e2-9833-32a97ac38630","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6283},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationReference":{"reference":"Medication/1c24ba62-c729-4acf-8810-caa34bcc23eb","type":"Medication","display":"albuterol"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"timing":{"code":{"text":"prn"}}}]}},{"fullUrl":"MedicationRequest/983917ca-151d-4616-84d1-857bfb1ddbfe","resource":{"resourceType":"MedicationRequest","id":"983917ca-151d-4616-84d1-857bfb1ddbfe","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6297},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationReference":{"reference":"Medication/69bde4ad-e54f-4858-a0d9-637521768380","type":"Medication","display":"ipratropium"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"timing":{"code":{"text":"prn"}}}]}},{"fullUrl":"MedicationRequest/7b007cb2-4b34-4066-a917-4416c9209e41","resource":{"resourceType":"MedicationRequest","id":"7b007cb2-4b34-4066-a917-4416c9209e41","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6329},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0039771","display":"theophylline"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000000658"},{"system":"http://www.whocc.no/atc","code":"R03DA04"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000012157"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"30864"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2503-3937"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00277"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"2592"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U004643"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85134710"},{"system":"http://loinc.org","code":"LP16288-0"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41479"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00142"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D013806"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000362"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"C137DTR5RG"},{"system":"http://ncimeta.nci.nih.gov","code":"C872"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C872"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"00815"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0002066"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"C137DTR5RG"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045358"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"000602"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000041340"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"52580"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X795w"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"10438"},{"system":"http://snomed.info/sct","code":"E-8916"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-69510"},{"system":"http://snomed.info/sct/731000124108","code":"372810006"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m82120"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001656"},{"system":"http://hl7.org/fhir/ndfrt","code":"4018129"}],"text":"theophylline"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/222d4371-0ce2-4499-87bd-1a927742f33f","resource":{"resourceType":"MedicationRequest","id":"222d4371-0ce2-4499-87bd-1a927742f33f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6402},{"url":"length","valueInteger":15}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001617","display":"Adrenal Cortex Hormones"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000018706"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000762"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0059-5614"},{"system":"http://loinc.org","code":"LP31653-6"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"4557"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000305"},{"system":"http://ncimeta.nci.nih.gov","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045658"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C2322"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"00990"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x002V"},{"system":"http://snomed.info/sct","code":"E-8510"},{"system":"http://snomed.info/sct/900000000000207008","code":"F-B2400"},{"system":"http://snomed.info/sct/731000124108","code":"21568003"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021625"}],"text":"corticosteroids"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/be6d6d20-2971-420d-a384-d2b94b45ca66","resource":{"resourceType":"MedicationRequest","id":"be6d6d20-2971-420d-a384-d2b94b45ca66","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6486},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"normal insulin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"text":"sliding scale"}]}},{"fullUrl":"MedicationRequest/d14b5a1c-e540-4999-9c37-269c95f69772","resource":{"resourceType":"MedicationRequest","id":"d14b5a1c-e540-4999-9c37-269c95f69772","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6538},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0678176","display":"Neurontin"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000042761"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"2269"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000077206"},{"system":"http://ncimeta.nci.nih.gov","code":"C1108"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000038402"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02ko"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"196498"}],"text":"neurontin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/31a7f227-500f-4278-af67-405b7fad691c","resource":{"resourceType":"MedicationRequest","id":"31a7f227-500f-4278-af67-405b7fad691c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6641},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0012373","display":"diltiazem"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000020881"},{"system":"http://www.whocc.no/atc","code":"C08DB01"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000003959"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0314-7897"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00343"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4148"},{"system":"http://loinc.org","code":"LP17238-4"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"197220"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00045"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D004110"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"EE92BBP03H"},{"system":"http://ncimeta.nci.nih.gov","code":"C61725"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"30307"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"EE92BBP03H"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004514"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01CU"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"3443"},{"system":"http://snomed.info/sct","code":"E-7719"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-803A0"},{"system":"http://snomed.info/sct/731000124108","code":"372793000"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU000928"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019722"}],"text":"Diltiazem"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"dosageInstruction":[{"text":"5mg/hour","route":{"extension":[{"extension":[{"url":"offset","valueInteger":6651},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"drip"},"doseAndRate":[{"doseQuantity":{"value":5}}]}]}},{"fullUrl":"MedicationRequest/3bd8c031-1382-4ddb-8a64-176c3cfd426d","resource":{"resourceType":"MedicationRequest","id":"3bd8c031-1382-4ddb-8a64-176c3cfd426d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6674},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0878061","display":"Altace"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000045298"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"315"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D017257"},{"system":"http://ncimeta.nci.nih.gov","code":"C29411"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000686948"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02tS"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"262418"}],"text":"altace"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/0a9794ae-f73b-4db1-9a21-9bb2169d29d0","resource":{"resourceType":"MedicationRequest","id":"0a9794ae-f73b-4db1-9a21-9bb2169d29d0","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6682},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0003015","display":"Angiotensin-Converting Enzyme Inhibitors"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0063008"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001185"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1037-0850"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005040"},{"system":"http://loinc.org","code":"LP31444-0"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41889"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000806"},{"system":"http://ncimeta.nci.nih.gov","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000335481"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bi..."},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80150"},{"system":"http://snomed.info/sct/731000124108","code":"372733002"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001019"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021577"}],"text":"ACEI"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/05fdfe6e-d45d-40f4-8e88-7ab743df1f1c","resource":{"resourceType":"MedicationRequest","id":"05fdfe6e-d45d-40f4-8e88-7ab743df1f1c","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6760},{"url":"length","valueInteger":14}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"draft","intent":"order","medicationCodeableConcept":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}],"text":"HTN medication"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/bc5965e1-20e2-48de-bff7-0f2b7b36604f","resource":{"resourceType":"MedicationRequest","id":"bc5965e1-20e2-48de-bff7-0f2b7b36604f","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6790},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"cancelled","intent":"proposal","doNotPerform":true,"medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0003015","display":"Angiotensin-Converting Enzyme Inhibitors"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0063008"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001185"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"1037-0850"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85005040"},{"system":"http://loinc.org","code":"LP31444-0"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41889"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000806"},{"system":"http://ncimeta.nci.nih.gov","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000335481"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/nci_pcdc","code":"C247"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bi..."},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80150"},{"system":"http://snomed.info/sct/731000124108","code":"372733002"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001019"},{"system":"http://hl7.org/fhir/ndfrt","code":"4021577"}],"text":"ACEI"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/c30e24bb-7fd9-4fef-935a-98b7a2a43c8e","resource":{"resourceType":"MedicationRequest","id":"c30e24bb-7fd9-4fef-935a-98b7a2a43c8e","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6808},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"cancelled","intent":"proposal","doNotPerform":true,"medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0020261","display":"hydrochlorothiazide"},{"system":"http://www.whocc.no/atc","code":"C03AA03"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000006347"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00999"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"637"},{"system":"http://loinc.org","code":"MTHU060558"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40606"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"4834"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006852"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"0J48LPH2TH"},{"system":"http://ncimeta.nci.nih.gov","code":"C29098"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"01646"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"0J48LPH2TH"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"002294"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"b26.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"5487"},{"system":"http://snomed.info/sct","code":"E-8899"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-72260"},{"system":"http://snomed.info/sct/731000124108","code":"387525002"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m37940"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU000981"},{"system":"http://hl7.org/fhir/ndfrt","code":"4017615"}],"text":"HCTZ"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/780dd0b6-34fe-460f-9682-395008e06289","resource":{"resourceType":"MedicationRequest","id":"780dd0b6-34fe-460f-9682-395008e06289","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6871},{"url":"length","valueInteger":12}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001645","display":"Adrenergic beta-Antagonists"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000028638"},{"system":"http://www.whocc.no/atc","code":"C07"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000779"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2059-1394"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85001009"},{"system":"http://loinc.org","code":"LP18062-7"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40578"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000319"},{"system":"http://ncimeta.nci.nih.gov","code":"C29576"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"05827"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bd..."},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80135"},{"system":"http://snomed.info/sct/731000124108","code":"373254001"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU002894"}],"text":"beta blocker"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/e96b0073-1154-483f-b50d-991663610a41","resource":{"resourceType":"MedicationRequest","id":"e96b0073-1154-483f-b50d-991663610a41","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6948},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0074554","display":"simvastatin"},{"system":"http://www.whocc.no/atc","code":"C10AA01"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000014812"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"5001-0024"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00641"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"2080"},{"system":"http://loinc.org","code":"LP171640-8"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"44437"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00746"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D019821"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"AGG2FN16EV"},{"system":"http://ncimeta.nci.nih.gov","code":"C29454"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C29454"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"02582"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"AGG2FN16EV"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"003621"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000455226"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"bxd.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"36567"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-80812"},{"system":"http://snomed.info/sct/731000124108","code":"387584000"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m75450"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001010"},{"system":"http://hl7.org/fhir/ndfrt","code":"4020400"}],"text":"simvastatin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/b34162ca-71fa-4c96-9e7c-27545adbc5cb","resource":{"resourceType":"MedicationRequest","id":"b34162ca-71fa-4c96-9e7c-27545adbc5cb","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":6964},{"url":"length","valueInteger":7}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0004057","display":"aspirin"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000028840"},{"system":"http://www.whocc.no/atc","code":"B01AC06"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0061721"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000001530"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"2270-2387"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00945"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"181"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000401"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85008731"},{"system":"http://loinc.org","code":"LA26702-3"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40170"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00170"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D001241"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000320"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"R16CO5Y76E"},{"system":"http://ncimeta.nci.nih.gov","code":"C287"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C287"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dcp","code":"00739"},{"system":"http://www.nlm.nih.gov/research/umls/nci_dtp","code":"NSC0406186"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"R16CO5Y76E"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000045176"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"001587"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000039152"},{"system":"http://www.nlm.nih.gov/research/umls/psy","code":"04050"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x02LX"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"1191"},{"system":"http://snomed.info/sct","code":"E-7771"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-60320"},{"system":"http://snomed.info/sct/731000124108","code":"387458008"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m6240"},{"system":"http://hl7.org/fhir/ndfrt","code":"4017536"}],"text":"aspirin"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"MedicationRequest/6b3eda4d-1083-4975-8513-3508b14cb479","resource":{"resourceType":"MedicationRequest","id":"6b3eda4d-1083-4975-8513-3508b14cb479","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"]},"extension":[{"extension":[{"url":"offset","valueInteger":7025},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0015620","display":"famotidine"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000020846"},{"system":"http://www.whocc.no/atc","code":"A02BA03"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000004890"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00927"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"693"},{"system":"http://loinc.org","code":"LP14346-8"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41926"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00141"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D015738"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"5QZO15J2Z8"},{"system":"http://ncimeta.nci.nih.gov","code":"C29045"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C29045"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"5QZO15J2Z8"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"003417"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000574268"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"a68.."},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"4278"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-84020"},{"system":"http://snomed.info/sct/731000124108","code":"387211002"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m32600"},{"system":"http://www.nlm.nih.gov/research/umls/uspmg","code":"MTHU001191"},{"system":"http://hl7.org/fhir/ndfrt","code":"4017970"}],"text":"famotidine"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"ServiceRequest/2c2f9063-16ba-47d3-a978-ffab2cc4fd34","resource":{"resourceType":"ServiceRequest","id":"2c2f9063-16ba-47d3-a978-ffab2cc4fd34","extension":[{"extension":[{"url":"offset","valueInteger":6183},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0419179","display":"NPO - Nothing by mouth"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000033028"},{"system":"http://loinc.org","code":"LA16917-9"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"40007"},{"system":"http://ncimeta.nci.nih.gov","code":"C28250"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000256571"},{"system":"http://www.nlm.nih.gov/research/umls/pcds","code":"ORC_10200.00"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"8B51."},{"system":"http://snomed.info/sct/731000124108","code":"182923009"}],"text":"NPO"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/2ce4103c-a317-4151-9d74-11f34d382636","resource":{"resourceType":"ServiceRequest","id":"2ce4103c-a317-4151-9d74-11f34d382636","extension":[{"extension":[{"url":"offset","valueInteger":6369},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"text":"meds"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":6364},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0442027","display":"Oral"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002273"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000034973"},{"system":"http://loinc.org","code":"LP32603-0"},{"system":"http://ncimeta.nci.nih.gov","code":"C25311"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0031"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044068"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X810r"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-51000"},{"system":"http://snomed.info/sct/731000124108","code":"260548002"}],"text":"oral"}]}},{"fullUrl":"ServiceRequest/4132cb37-7186-4361-b36e-bdf7ec83e1f9","resource":{"resourceType":"ServiceRequest","id":"4132cb37-7186-4361-b36e-bdf7ec83e1f9","extension":[{"extension":[{"url":"offset","valueInteger":6568},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0029167","display":"Oral Medicine"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008996"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U005446"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85128280"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D019242"}],"text":"oral meds"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962","resource":{"resourceType":"ServiceRequest","id":"c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962","extension":[{"extension":[{"url":"offset","valueInteger":6625},{"url":"length","valueInteger":10}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"text":"BP control"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/1aac5492-4c7a-4639-9658-3cd6a2a37d92","resource":{"resourceType":"ServiceRequest","id":"1aac5492-4c7a-4639-9658-3cd6a2a37d92","extension":[{"extension":[{"url":"offset","valueInteger":6925},{"url":"length","valueInteger":3}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1532338","display":"Percutaneous Coronary Intervention"},{"system":"http://www.nlm.nih.gov/research/umls/ccsr_icd10pcs","code":"CAR004"},{"system":"http://loinc.org","code":"LP266258-5"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10065608"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D062645"},{"system":"http://ncimeta.nci.nih.gov","code":"C99521"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"C99521"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cptac","code":"C99521"},{"system":"http://snomed.info/sct/731000124108","code":"415070008"}],"text":"PCI"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"occurrenceDateTime":"1999","requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/9470ec53-87ac-4f19-825a-501207f31206","resource":{"resourceType":"ServiceRequest","id":"9470ec53-87ac-4f19-825a-501207f31206","extension":[{"extension":[{"url":"offset","valueInteger":7046},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"text":"meds"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"},"bodySite":[{"extension":[{"extension":[{"url":"offset","valueInteger":7041},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0442027","display":"Oral"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000002273"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000034973"},{"system":"http://loinc.org","code":"LP32603-0"},{"system":"http://ncimeta.nci.nih.gov","code":"C25311"},{"system":"http://www.nlm.nih.gov/research/umls/nci_edqm-hc","code":"0031"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nci-gloss","code":"CDR0000044068"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X810r"},{"system":"http://snomed.info/sct/900000000000207008","code":"T-51000"},{"system":"http://snomed.info/sct/731000124108","code":"260548002"}],"text":"oral"}]}},{"fullUrl":"ServiceRequest/51900d61-5fa7-4413-91bc-f675d4b1beca","resource":{"resourceType":"ServiceRequest","id":"51900d61-5fa7-4413-91bc-f675d4b1beca","extension":[{"extension":[{"url":"offset","valueInteger":5951},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C1446409","display":"Positive"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"0023688"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020358"},{"system":"http://ncimeta.nci.nih.gov","code":"C25246"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cadsr","code":"C25246"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X80xp"},{"system":"http://snomed.info/sct/900000000000207008","code":"G-A200"},{"system":"http://snomed.info/sct/731000124108","code":"10828004"}],"text":"rule"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/582d39aa-739a-40eb-8bb6-78f632cca439","resource":{"resourceType":"ServiceRequest","id":"582d39aa-739a-40eb-8bb6-78f632cca439","extension":[{"extension":[{"url":"offset","valueInteger":5979},{"url":"length","valueInteger":6}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"revoked","intent":"proposal","doNotPerform":true,"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0347997","display":"Physical object"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000031165"},{"system":"http://www.nlm.nih.gov/research/umls/cpm","code":"48"},{"system":"http://ncimeta.nci.nih.gov","code":"C45281"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X902f"},{"system":"http://snomed.info/sct/731000124108","code":"260787004"}],"text":"object"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"Observation/cc9935e9-b7cd-415e-814c-26ca365df019","resource":{"resourceType":"Observation","id":"cc9935e9-b7cd-415e-814c-26ca365df019","extension":[{"extension":[{"url":"offset","valueInteger":5996},{"url":"length","valueInteger":2}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C3496353","display":"C1 adrenaline cells"},{"system":"http://www.nlm.nih.gov/research/umls/neu","code":"1758"}],"text":"C1"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueString":"decreased","interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"Observation/ff4c3830-2416-4e21-8595-43348eb2e56d","resource":{"resourceType":"Observation","id":"ff4c3830-2416-4e21-8595-43348eb2e56d","extension":[{"extension":[{"url":"offset","valueInteger":6003},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"final","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0446414","display":"C4 level"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000035631"},{"system":"http://www.nlm.nih.gov/research/umls/fma","code":"20316"},{"system":"http://loinc.org","code":"LA32081-4"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"XB009"},{"system":"http://snomed.info/sct/731000124108","code":"263281001"},{"system":"http://www.nlm.nih.gov/research/umls/uwda","code":"20316"}],"text":"C4 levels"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"_effectiveDateTime":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/data-absent-reason","valueCode":"unknown"}]},"valueString":"decreased","interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation","code":"POS","display":"Positive"}],"text":"positive"}]}},{"fullUrl":"ServiceRequest/e76d4e07-a7e2-49b6-9434-a54bfe4dd656","resource":{"resourceType":"ServiceRequest","id":"e76d4e07-a7e2-49b6-9434-a54bfe4dd656","extension":[{"extension":[{"url":"offset","valueInteger":6096},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0202230","display":"Thyroid stimulating hormone measurement"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000020026"},{"system":"http://www.ama-assn.org/go/cpt","code":"84443"},{"system":"http://www.nlm.nih.gov/research/umls/hcpt","code":"84443"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"T34028"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10043768"},{"system":"http://www.nlm.nih.gov/research/umls/mth","code":"U000402"},{"system":"http://ncimeta.nci.nih.gov","code":"C64813"},{"system":"http://www.nlm.nih.gov/research/umls/nci_cdisc","code":"SDTM-LBTEST"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C64813"},{"system":"http://snomed.info/sct/900000000000207008","code":"P3-74120"},{"system":"http://snomed.info/sct/731000124108","code":"61167004"}],"text":"TSH level"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"ServiceRequest/a51ed1d0-4cc2-40af-92a4-571cdeab7295","resource":{"resourceType":"ServiceRequest","id":"a51ed1d0-4cc2-40af-92a4-571cdeab7295","extension":[{"extension":[{"url":"offset","valueInteger":6432},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"status":"active","intent":"order","code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0018941","display":"Hematologic Tests"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000007241"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000005951"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"0455-1241"},{"system":"http://hl7.org/fhir/sid/icpc-2p","code":"A34001"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85014929"},{"system":"http://www.nlm.nih.gov/research/umls/mdr","code":"10061726"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"12001"},{"system":"http://www.nlm.nih.gov/research/umls/medlineplus","code":"6351"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D006403"},{"system":"http://ncimeta.nci.nih.gov","code":"C49286"},{"system":"http://www.nlm.nih.gov/research/umls/nci_ctrp","code":"C49286"},{"system":"http://www.nlm.nih.gov/research/umls/nci_nichd","code":"C49286"},{"system":"http://www.nlm.nih.gov/research/umls/pdq","code":"CDR0000575387"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"X77Yh"},{"system":"http://www.nlm.nih.gov/research/umls/rcdae","code":"X77Yh"},{"system":"http://snomed.info/sct/731000124108","code":"396550006"}],"text":"blood"},"subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"requester":{"reference":"Practitioner/082e9fc4-7483-4ef8-b83d-ea0733859cdc","type":"Practitioner","display":"Unknown"}}},{"fullUrl":"AllergyIntolerance/5b39edaa-8e80-4a2d-8805-e634a746424d","resource":{"resourceType":"AllergyIntolerance","id":"5b39edaa-8e80-4a2d-8805-e634a746424d","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"]},"extension":[{"extension":[{"url":"offset","valueInteger":6824},{"url":"length","valueInteger":5}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"active","display":"Active"}],"text":"Active"},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"confirmed","display":"Confirmed"}],"text":"Confirmed"},"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0749139","display":"sulfa"},{"system":"http://www.nlm.nih.gov/research/umls/ccpss","code":"1012728"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000048179"}],"text":"sulfa"},"patient":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"}}},{"fullUrl":"List/6f292c58-8a59-44d9-9efe-7d8968684466","resource":{"resourceType":"List","id":"6f292c58-8a59-44d9-9efe-7d8968684466","status":"current","mode":"snapshot","title":"Plan","subject":{"reference":"Patient/894a042e-625c-48b3-a710-759e09454897","type":"Patient"},"encounter":{"reference":"Encounter/d6535404-17da-4282-82c2-2eb7b9b86a47","type":"Encounter","display":"unknown"},"entry":[{"item":{"reference":"MedicationRequest/b66ac041-2556-4bee-9594-bcb151778222","type":"MedicationRequest","display":"corticosteroid"}},{"item":{"reference":"MedicationRequest/77a51afd-e3f8-4266-9685-b093e2117b8f","type":"MedicationRequest","display":"Dexamethasone"}},{"item":{"reference":"MedicationRequest/b6517ef9-0757-4c29-8b25-eff19601d92e","type":"MedicationRequest","display":"antihistamine"}},{"item":{"reference":"MedicationRequest/34446a47-a405-490a-9239-1a437eb75196","type":"MedicationRequest","display":"Diphenhydramine"}},{"item":{"reference":"MedicationRequest/c55c95d4-7789-43e2-9833-32a97ac38630","type":"MedicationRequest","display":"albuterol"}},{"item":{"reference":"MedicationRequest/983917ca-151d-4616-84d1-857bfb1ddbfe","type":"MedicationRequest","display":"ipratropium"}},{"item":{"reference":"MedicationRequest/7b007cb2-4b34-4066-a917-4416c9209e41","type":"MedicationRequest","display":"theophylline"}},{"item":{"reference":"MedicationRequest/222d4371-0ce2-4499-87bd-1a927742f33f","type":"MedicationRequest","display":"corticosteroids"}},{"item":{"reference":"MedicationRequest/be6d6d20-2971-420d-a384-d2b94b45ca66","type":"MedicationRequest","display":"normal insulin"}},{"item":{"reference":"MedicationRequest/d14b5a1c-e540-4999-9c37-269c95f69772","type":"MedicationRequest","display":"neurontin"}},{"item":{"reference":"MedicationRequest/31a7f227-500f-4278-af67-405b7fad691c","type":"MedicationRequest","display":"Diltiazem"}},{"item":{"reference":"MedicationRequest/3bd8c031-1382-4ddb-8a64-176c3cfd426d","type":"MedicationRequest","display":"altace"}},{"item":{"reference":"MedicationRequest/0a9794ae-f73b-4db1-9a21-9bb2169d29d0","type":"MedicationRequest","display":"ACEI"}},{"item":{"reference":"MedicationRequest/05fdfe6e-d45d-40f4-8e88-7ab743df1f1c","type":"MedicationRequest","display":"HTN medication"}},{"item":{"reference":"MedicationRequest/bc5965e1-20e2-48de-bff7-0f2b7b36604f","type":"MedicationRequest","display":"ACEI"}},{"item":{"reference":"MedicationRequest/c30e24bb-7fd9-4fef-935a-98b7a2a43c8e","type":"MedicationRequest","display":"HCTZ"}},{"item":{"reference":"MedicationRequest/780dd0b6-34fe-460f-9682-395008e06289","type":"MedicationRequest","display":"beta blocker"}},{"item":{"reference":"MedicationRequest/e96b0073-1154-483f-b50d-991663610a41","type":"MedicationRequest","display":"simvastatin"}},{"item":{"reference":"MedicationRequest/b34162ca-71fa-4c96-9e7c-27545adbc5cb","type":"MedicationRequest","display":"aspirin"}},{"item":{"reference":"MedicationRequest/6b3eda4d-1083-4975-8513-3508b14cb479","type":"MedicationRequest","display":"famotidine"}},{"item":{"reference":"ServiceRequest/2c2f9063-16ba-47d3-a978-ffab2cc4fd34","type":"ServiceRequest","display":"NPO"}},{"item":{"reference":"ServiceRequest/2ce4103c-a317-4151-9d74-11f34d382636","type":"ServiceRequest","display":"meds"}},{"item":{"reference":"ServiceRequest/4132cb37-7186-4361-b36e-bdf7ec83e1f9","type":"ServiceRequest","display":"oral meds"}},{"item":{"reference":"ServiceRequest/c0b7dcc8-3299-4d8e-8ec2-e3fc2d3e6962","type":"ServiceRequest","display":"BP control"}},{"item":{"reference":"ServiceRequest/1aac5492-4c7a-4639-9658-3cd6a2a37d92","type":"ServiceRequest","display":"PCI"}},{"item":{"reference":"ServiceRequest/9470ec53-87ac-4f19-825a-501207f31206","type":"ServiceRequest","display":"meds"}},{"item":{"reference":"ServiceRequest/51900d61-5fa7-4413-91bc-f675d4b1beca","type":"ServiceRequest","display":"rule"}},{"item":{"reference":"ServiceRequest/582d39aa-739a-40eb-8bb6-78f632cca439","type":"ServiceRequest","display":"object"}},{"item":{"reference":"Observation/cc9935e9-b7cd-415e-814c-26ca365df019","type":"Observation","display":"C1"}},{"item":{"reference":"Observation/ff4c3830-2416-4e21-8595-43348eb2e56d","type":"Observation","display":"C4 levels"}},{"item":{"reference":"ServiceRequest/e76d4e07-a7e2-49b6-9434-a54bfe4dd656","type":"ServiceRequest","display":"TSH level"}},{"item":{"reference":"ServiceRequest/a51ed1d0-4cc2-40af-92a4-571cdeab7295","type":"ServiceRequest","display":"blood"}},{"item":{"reference":"AllergyIntolerance/5b39edaa-8e80-4a2d-8805-e634a746424d","type":"AllergyIntolerance","display":"sulfa"}}]}},{"fullUrl":"Medication/1c24ba62-c729-4acf-8810-caa34bcc23eb","resource":{"resourceType":"Medication","id":"1c24ba62-c729-4acf-8810-caa34bcc23eb","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"]},"extension":[{"extension":[{"url":"offset","valueInteger":6283},{"url":"length","valueInteger":9}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0001927","display":"albuterol"},{"system":"http://www.nlm.nih.gov/research/umls/aod","code":"0000020136"},{"system":"http://www.whocc.no/atc","code":"R03CC02"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000000861"},{"system":"http://www.nlm.nih.gov/research/umls/csp","code":"4007-0002"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB01001"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"47"},{"system":"http://www.nlm.nih.gov/research/umls/lch","code":"U000128"},{"system":"http://www.nlm.nih.gov/research/umls/lch_nw","code":"sh85003253"},{"system":"http://loinc.org","code":"LP17843-1"},{"system":"http://www.nlm.nih.gov/research/umls/medcin","code":"41470"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00749"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D000420"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"QF8SVZ843E"},{"system":"http://ncimeta.nci.nih.gov","code":"C215"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"QF8SVZ843E"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"001814"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x00Af"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"435"},{"system":"http://snomed.info/sct/900000000000207008","code":"C-68010"},{"system":"http://snomed.info/sct/731000124108","code":"372897005"},{"system":"http://www.nlm.nih.gov/research/umls/usp","code":"m1195"},{"system":"http://hl7.org/fhir/ndfrt","code":"4018796"}],"text":"albuterol"},"form":{"extension":[{"extension":[{"url":"offset","valueInteger":6309},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"nebs"}}},{"fullUrl":"Medication/69bde4ad-e54f-4858-a0d9-637521768380","resource":{"resourceType":"Medication","id":"69bde4ad-e54f-4858-a0d9-637521768380","meta":{"profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"]},"extension":[{"extension":[{"url":"offset","valueInteger":6297},{"url":"length","valueInteger":11}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"code":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls","code":"C0027235","display":"ipratropium"},{"system":"http://www.nlm.nih.gov/research/umls/chv","code":"0000008455"},{"system":"http://www.nlm.nih.gov/research/umls/drugbank","code":"DB00332"},{"system":"http://www.nlm.nih.gov/research/umls/gs","code":"4326"},{"system":"http://loinc.org","code":"LP171404-9"},{"system":"http://www.nlm.nih.gov/research/umls/mmsl","code":"d00265"},{"system":"http://www.nlm.nih.gov/research/umls/msh","code":"D009241"},{"system":"http://www.nlm.nih.gov/research/umls/mthspl","code":"GR88G0I6UL"},{"system":"http://ncimeta.nci.nih.gov","code":"C61794"},{"system":"http://www.nlm.nih.gov/research/umls/nci_fda","code":"GR88G0I6UL"},{"system":"http://www.nlm.nih.gov/research/umls/nddf","code":"004943"},{"system":"http://www.nlm.nih.gov/research/umls/rcd","code":"x01Db"},{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"7213"},{"system":"http://snomed.info/sct/731000124108","code":"372518007"},{"system":"http://hl7.org/fhir/ndfrt","code":"4019791"}],"text":"ipratropium"},"form":{"extension":[{"extension":[{"url":"offset","valueInteger":6309},{"url":"length","valueInteger":4}],"url":"http://hl7.org/fhir/StructureDefinition/derivation-reference"}],"text":"nebs"}}}]} diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py new file mode 100644 index 000000000000..8af076ea0357 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -0,0 +1,143 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports +from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient + +""" +FILE: sample_match_trials_fhir.py + +DESCRIPTION: + Trial Eligibility Assessment for a Custom Trial. + + Trial Matcher can be used to understand the gaps of eligibility criteria for a specific patient for a given clinical + trial. In this case, the trial is not taken from clinicaltrials.gov, however the trial is a custom trial that might + be not published clinicaltrials.gov yet. The custom trial eligibility criteria section is provided as an input to + the Trial Matcher. + + In this use case, the patient clinical information is provided to the Trial Matcher as a FHIR bundle. + Note that the Trial Matcher configuration include reference to the FHIR Server where the patient FHIR bundle is located. + + +USAGE: + python sample_match_trials_fhir.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def match_trials(self): + KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" + ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + + # Create an Trial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Create clinical info list + # + clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2")] + + # + + # Construct Patient + # + patient1 = self.get_patient_from_fhir_patient() + # + + # Create registry filter + registry_filters = ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["Non-small cell lung cancer"] + # Limit the clinical trial to a certain phase, phase 1 + registry_filters.phases = [ClinicalTrialPhase.PHASE1] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + # Limit the trial to a specific study type, interventional + registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Health Insights Trial match trials + try: + poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = await poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + def print_results(self, trial_matcher_result): + if trial_matcher_result.status == JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + def get_patient_from_fhir_patient(self) -> PatientRecord: + patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) + patient_data = PatientDocument(type=DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content()), + clinical_type=ClinicalDocumentType.CONSULTATION) + return PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) + + def get_patient_doc_content(self) -> str: + with open("match_trial_fhir_data.txt", 'r', encoding='utf-8-sig') as f: + content = f.read() + return content + + +async def main(): + sample = HealthInsightsSamples() + await sample.match_trials() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py new file mode 100644 index 000000000000..6af0abdeb8bf --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -0,0 +1,149 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports +from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient + +""" +FILE: sample_match_trials_structured_coded_elements.py + +DESCRIPTION: + Finding potential eligible trials for a patient, based on patient’s structured medical information. + + Trial Matcher model matches a single patient to a set of relevant clinical trials, + that this patient appears to be qualified for. This use case will demonstrate: + a. How to use the trial matcher when patient clinical health information is provided to the + Trial Matcher in a key-value structure with coded elements. + b. How to use the clinical trial configuration to narrow down the trial condition, + recruitment status, location and other criteria that the service users may choose to prioritize. + +USAGE: + python sample_match_trials_structured_coded_elements.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTH_DECISION_SUPPORT_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def match_trials(self): + KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" + ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + + # Create an Trial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Create clinical info list + # + clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="METASTATIC", + name="metastatic", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019163", + name="Hepatitis B", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0018802", + name="Congestive heart failure", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019196", + name="Hepatitis C", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0220650", + name="Metastatic malignant neoplasm to brain", + value="true")] + + # + + # Construct Patient + # + patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list) + patient1 = PatientRecord(id="patient_id", info=patient_info) + # + + # Create registry filter + registry_filters = ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["Non-small cell lung cancer"] + # Limit the clinical trial to a certain phase, phase 1 + registry_filters.phases = [ClinicalTrialPhase.PHASE1] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + # Limit the trial to a specific study type, interventional + registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Insights Trial match trials + try: + poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = await poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + def print_results(self, trial_matcher_result): + if trial_matcher_result.status == JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + +async def main(): + sample = HealthInsightsSamples() + await sample.match_trials() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py new file mode 100644 index 000000000000..fa14782fd190 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py @@ -0,0 +1,125 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient + +""" +FILE: sample_match_trials_structured_coded_elements_sync.py + +DESCRIPTION: + Finding potential eligible trials for a patient, based on patient’s structured medical information. + It uses **SYNC** function unlike other samples that uses async function. + + Trial Matcher model matches a single patient to a set of relevant clinical trials, + that this patient appears to be qualified for. This use case will demonstrate: + a. How to use the trial matcher when patient clinical health information is provided to the + Trial Matcher in a key-value structure with coded elements. + b. How to use the clinical trial configuration to narrow down the trial condition, + recruitment status, location and other criteria that the service users may choose to prioritize. + + +USAGE: + python sample_match_trials_structured_coded_elements_sync.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + def match_trials(self): + KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" + ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + + # Create an Trial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Create clinical info list + # + clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0032181", + name="Platelet count", + value="250000"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0002965", + name="Unstable Angina", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Radiotherapy", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0242957", + name="GeneOrProtein-Expression", + value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="cancer stage", + value="2")] + + # + + # Construct Patient + # + patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list) + patient1 = PatientRecord(id="patient_id", info=patient_info) + # + + # Create registry filter + registry_filters = ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["non small cell lung cancer (nsclc)"] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + # Limit the trial to a specific recruitment status + registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Insights Trial match trials + try: + poller = trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + def print_results(self, trial_matcher_result): + if trial_matcher_result.status == JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + +if __name__ == "__main__": + sample = HealthInsightsSamples() + sample.match_trials() + diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py new file mode 100644 index 000000000000..92c74cca5d96 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py @@ -0,0 +1,248 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports +from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient + +""" +FILE: sample_match_trials_unstructured_clinical_note.py + +DESCRIPTION: + Finding potential eligible trials for a patient, provided as unstructured clinical note, and + understanding Trial Matcher inferences. + + Trial Matcher model matches a single patient, whom the clinical health information is + provided in an unstructured clinical note. The conclusion of the Trial Matcher decision + support model is a list of inferences made regarding the patient. For each trial that was + queried for the patient, the model will return and indication of whether the patient appears + eligible or ineligible for the trial. If the model concluded the patient is ineligible for a + trial, it will also provide a evidence to support its conclusion. + This use case will demonstrate: + a. How to use the trial matcher when patient clinical health information is provided to the + Trial Matcher as an unstructured clinical note. + b. How to handle Trial Matcher inferences regarding the patient and retrieving evidence + information. + + +USAGE: + python sample_match_trials_unstructured_clinical_note.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def match_trials(self): + KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" + ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + + # Create an Trial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # + patient_data_list = [PatientDocument(type=DocumentType.NOTE, id="12-consult_15", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content()))] + + # + + # Construct Patient + # + patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) + patient1 = PatientRecord(id="patient_id", info=patient_info, data=patient_data_list) + # + + # Create registry filter + registry_filters = ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["non small cell lung cancer (nsclc)"] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + # Limit the trial to a specific recruitment status + registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Insights Trial match trials + try: + poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = await poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + def print_results(self, trial_matcher_result): + if trial_matcher_result.status == JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + def get_patient_doc_content(self) -> str: + content = "TITLE: Cardiology Consult\r\n DIVISION OF CARDIOLOGY\r\n " \ + " COMPREHENSIVE CONSULTATION NOTE\r\nCHIEF " \ + "COMPLAINT: Patient is seen in consultation today at the\r\nrequest of Dr. [**Last Name (STitle) " \ + "13959**]. We are asked to give consultative advice\r\nregarding evaluation and management of Acute " \ + "CHF.\r\nHISTORY OF PRESENT ILLNESS:\r\n71 year old man with CAD w/ diastolic dysfunction, CKD, " \ + "Renal\r\nCell CA s/p left nephrectomy, CLL, known lung masses and recent\r\nbrochial artery bleed, " \ + "s/p embolization of LLL bronchial artery\r\n[**1-17**], readmitted with hemoptysis on [" \ + "**2120-2-3**] from [**Hospital 328**] [**Hospital 9250**]\r\ntransferred from BMT floor following " \ + "second episode of hypoxic\r\nrespiratory failure, HTN and tachycardia in 3 days. Per report," \ + "\r\non the evening of transfer to the [**Hospital Unit Name 1**], patient continued to\r\nremain " \ + "tachypnic in upper 30s and was receiving IVF NS at\r\n100cc/hr for concern of hypovolemic " \ + "hypernatremia. He also had\r\nreceived 1unit PRBCs with temp rise for 98.3 to 100.4, " \ + "he was\r\ncultured at that time, and transfusion rxn work up was initiated.\r\nAt around 5:30am, " \ + "he was found to be newly hypertensive with SBP\r\n>200 with a regular tachycardia to 160 with new " \ + "hypoxia requiring\r\nshovel mask. He received 1mg IV ativan, 1mg morphine, lasix 40mg\r\nIV x1, " \ + "and lopressor 5mg IV. ABG 7.20/63/61 on shovel mask. He\r\nwas transferred to the ICU for further " \ + "care. On arrival to the\r\n[**Hospital Unit Name 1**], he received 5mg IV Dilt and was found to be " \ + "febrile to\r\n101.3. Blood and urine cultures were draw. He was placed on BIPAP\r\n12/5 with " \ + "improvement in his respiratory rate and sats. Repeat\r\nABG 7.43/34/130.\r\nOvernight, " \ + "he continued to be tachycardic, with stable O2 sats.\r\nHe was treated for agitation with haldol, " \ + "as well as IV beta\r\nblockers, with some improvement in his heart rate to the 80s at\r\nrest. He " \ + "has and continues to deny symptoms of chest pain. When\r\nassessed, he grunted responses to " \ + "questions, and was non-verbal.\r\nOn cardiac review of symptoms, no chest pain or other " \ + "discomfort.\r\nFurther questions limited by mental status.\r\nPAST MEDICAL HISTORY:\r\nCLL x 20 " \ + "yrs\r\n-s/p fludarabine and Cytoxan ([**7-14**]) with good response\r\n-auto-immune hemolytic " \ + "anemia on chronic steroids\r\n-mediastinal lymphadenopathy\r\n-h/o bilat pleural effusions with + " \ + "cytology ([**6-13**])\r\nRCC s/p Left nephrectomy [**2106**]\r\nCKD: prior baseline CR 1.5, " \ + "most recently 1.1-1.2\r\nBPH vs Prostate cancer\r\n- h/o multiple prostate biopsies with only 1 " \ + "c/w adenocarcinoma\r\n([**Doctor Last Name 2470**] 3+3)\r\nGERD\r\nType II DM: -recently started " \ + "insulin\r\nR-sided Exotropia\r\nGallstone pancreatitis [**12-10**]; s/p lap " \ + "chole\r\nHyperlipidemia\r\nCAD s/p cath [**4-13**] with diffuse 2 vessel dz\r\n- 70% RCA/PDA, " \ + "60%prox/mid LAD)\r\nHypogammaglobumenia, recurrent URI/PNA, on IVIG X 2years, good\r\nresponse (" \ + "last dose [**2118-11-11**])\r\nAllergic rhinitis\r\nGilberts disease\r\nHypotesteronemia\r\nR " \ + "humeral fracture ([**12-16**])\r\nEnlarged spleen secondary to CLL vs portal " \ + "hypertension.\r\nCardiac Risk Factors include diabetes, dyslipidemia,\r\nhypertension, and family " \ + "history of CAD.\r\nHOME MEDICATIONS:\r\nAlbuterol 90 mcg 2 puffs PRN\r\nAllopurinol 100mg PO " \ + "Daily\r\nFolic Acid 2mg PO Daily\r\nInsulin Lispro Protam & Lispro As Directed\r\nMetoprolol " \ + "Succinate 25mg PO BID\r\nNitroglycerin [NitroQuick] 0.3mg SL PRN\r\nPrednisone 2mg PO " \ + "daily\r\nRosuvastatin 5mg PO daily\r\nDocusate Sodium [Colace] 100mg PO BID\r\nSenna 8.6 PO BID " \ + "PRN\r\nCURRENT MEDICATIONS:\r\nAluminum-Magnesium Hydrox.-Simethicone 15-30 mL PO/NG " \ + "QID:PRN\r\ndyspepsia\r\nAllopurinol 100 mg PO/NG DAILY\r\nAlbuterol 0.083% Neb Soln 1 NEB IH " \ + "Q6H:PRN\r\nBisacodyl 10 mg PO/PR DAILY:PRN constipation\r\nCaphosol 30 mL ORAL QID:PRN dry " \ + "mouth\r\nDextrose 50% 12.5 gm IV PRN hypoglycemia\r\nDocusate Sodium 100 mg PO BID\r\nFamotidine " \ + "20 mg IV Q24H\r\nGlucagon 1 mg IM Q15MIN:PRN\r\nGuaifenesin-Dextromethorphan 10 mL PO/NG Q6H:PRN " \ + "cough\r\nInsulin SC SS\r\nIpratropium Bromide Neb 1 NEB IH Q6H:PRN\r\nMagnesium Sulfate " \ + "Replacement (Oncology) IV Sliding Scale\r\nMetoprolol Tartrate 5 mg IV " \ + "Q6H\r\nPiperacillin-Tazobactam 2.25 g IV Q6H\r\nPotassium Chloride Replacement (Oncology) IV " \ + "Sliding\r\nHydrocortisone Na Succ. 20 mg IV Q24H\r\nSenna 1 TAB PO/NG [**Hospital1 7**]:PRN " \ + "constipation\r\nVancomycin 1000 mg IV\r\nMetoprolol Tartrate 10 mg IV Q6H\r\nDiltiazem 5 mg IV " \ + "ONCE\r\nMetoprolol Tartrate 5 mg IV ONCE\r\nFurosemide 40 mg IV " \ + "ONCE\r\nALLERGIES:\r\nNKDA\r\nSOCIAL HISTORY:\r\nMarried, lives with wife [**Name (NI) **] in [" \ + "**Location (un) 12995**]. Has long history\r\nof CLL since [**2096**]. Is a rabbi working in " \ + "academics with 30 year\r\nhistory prior to that of congregation work in [**State 1698**]. " \ + "They\r\nhave two adult children in [**Location (un) 3063**] and LA and three\r\ngrandchildren. " \ + "Life-time nonsmoker, rare EtOH, no illicit drug\r\nuse.\r\nFAMILY HISTORY:\r\nFather w/ [**Name2 (" \ + "NI) 118**] cancer and coronary artery disease. Multiple\r\nrelatives with DM.\r\nREVIEW OF " \ + "SYSTEMS: ALL OTHER SYSTEMS NEGATIVE EXCEPT AS NOTED\r\nABOVE\r\nPHYSICAL EXAMINATION\r\nVitals: " \ + "T: 97.8 degrees Farenheit (max 101.3), BP: 128/73 mmHg\r\nsupine, HR 97 bpm, RR 35 bpm, " \ + "O2: 94 % on 0.4 aerosol mask.\r\nCONSTITUTIONAL: No acute distress.\r\nEYES: No conjunctival " \ + "pallor. No icterus.\r\nENT/Mouth: MMM. OP clear.\r\nTHYROID: No thyromegaly or thyroid " \ + "nodules.\r\nCV: Nondisplaced PMI. Tachycardic. Regular rhythm. nl S1, S2. No\r\nextra heart " \ + "sounds. No appreciable murmurs. No JVD. Normal\r\ncarotid upstroke without bruits.\r\nLUNGS: " \ + "Breath sounds bilaterally. No crackles, wheezes or rhonchi\r\nappreciated.\r\nGI: NABS. Soft, NT, " \ + "ND. No HSM. No abdominal bruits.\r\nMUSCULO: Supple neck. Normal muscle tone. Full strength " \ + "grossly.\r\nHEME/LYMPH: No palpable LAD. No peripheral edema. Full distal\r\npulses " \ + "bilaterally.\r\nSKIN: Warm extremities. No rashes/lesions, ecchymoses.\r\nNEURO: Limited responses " \ + "to questions. [**Name8 (MD) 54**] RN, the patient tends\r\nto wax and wane throughout the day; at " \ + "times answering questions\r\nand conversing, at other times being more confused. Other " \ + "exam\r\ngrossly normal without any significant focal deficits\r\nPSYCH: Mood and affect were " \ + "appropriate.\r\nTELEMETRY: Sinus tachycardia at 101. Runs of sinus tachycardia\r\nto 120s, " \ + "with brief episodes of atrial tach vs AF.\r\nECG ([**2120-2-15**]): Sinus tach @ 124. Normal " \ + "Axis/intervals.\r\nDiffuse nonspecific TW flattening with inferolateral T wave\r\ninversions, " \ + "not appreciably worse, and probably better than\r\nprior. No ECG tracing available more proximal " \ + "to this admission\r\nto ICU.\r\nTRANSTHORACIC ECHOCARDIOGRAM ([**2120-1-15**]):\r\nThe left atrium " \ + "is elongated. No atrial septal defect is seen by\r\n2D or color Doppler. Left ventricular wall " \ + "thicknesses and cavity\r\nsize are normal. There is probably mild regional left " \ + "ventricular\r\nsystolic dysfunction with distal lateral/apical lateral\r\nhypokinesis . There is " \ + "no ventricular septal defect. Right\r\nventricular chamber size and free wall motion are normal. " \ + "The\r\naortic root is mildly dilated at the sinus level. The aortic\r\nvalve leaflets (3) are " \ + "mildly thickened but aortic stenosis is\r\nnot present. No aortic regurgitation is seen. The " \ + "mitral valve\r\nleaflets are mildly thickened. There is no mitral valve prolapse.\r\nTrivial " \ + "mitral regurgitation is seen. The estimated pulmonary\r\nartery systolic pressure is normal. There " \ + "is no pericardial\r\neffusion. Compared with the prior study (images reviewed) of\r\n[" \ + "**2119-1-11**], mild regional LV systolic dysfunction is new.\r\nETT ([**2114-11-13**]):\r\nThe " \ + "patient\r\nexercised for 9.5 minutes of [**Initials (NamePattern4) **] [**Last Name (NamePattern4) " \ + "84**] protocol and was stopped at\r\nrequest for fatigue. This represents an average " \ + "functional\r\ncapacity.\r\nThere were no chest, neck, back, or arm discomforts reported " \ + "by\r\npatient throughout the procedure. There were no significant ST\r\nsegment\r\nchanges at peak " \ + "exercise or during recovery. The rhythm was sinus\r\nwith\r\nrare APBs and VPBs. The hemodynamic " \ + "response to exercise was\r\nappropriate.\r\nIMPRESSION: No anginal symptoms or ischemic EKG " \ + "changes at the\r\nachieved\r\nworkload. Nuclear report sent separately. Compared to ETT " \ + "report\r\n[**2113-11-29**], there are now no EKG changes noted and the " \ + "exercise\r\ntolerance\r\nhas increased by one minute.\r\nMIBI: 1) Again noted is mild, reversible " \ + "basilar inferior wall\r\nperfusion\r\ndefect in the face of soft tissue attenuation from the " \ + "diaphragm.\r\n2) Normal\r\nleft ventricular cavity size and function.\r\nCath: [**4-13**]:\r\n1. " \ + "Coronary angiography in this right-dominant system revealed:\r\n--the LMCA had no angiographically " \ + "apparent disease.\r\n--the LAD had diffuse proximal-mid 60% stenosis\r\n--the LCX had minimal " \ + "disease\r\n--the RCA was a small vessel with a distal 70% lesion going into\r\nthe RPDA\r\n2. " \ + "Limited resting hemodynamics revealed elevated left-sided\r\nfilling pressures, with LVEDP 18 " \ + "mmHg. There was high-normal\r\nsystemic arterial systolic pressures, with SBP 134 mmHg. " \ + "There\r\nwas no significant gradient upon pullback of the angled pigtail\r\ncatheter from LV to " \ + "ascending aorta.\r\nOTHER TESTING:\r\nCXR: Worsening fluid status versus prior. Followup needed to " \ + "see\r\nairspace processes track with CHF or are independent and in the\r\nlatter\r\nsituation " \ + "could represent pneumonia.\r\nLABORATORY DATA: Reviewed in OMR\r\nASSESSMENT AND PLAN:\r\n71 year " \ + "old man with complicated medical history including CAD w/\r\ndiastolic dysfunction, CKD, " \ + "Renal Cell CA s/p left nephrectomy,\r\nCLL, known lung masses and recent brochial artery bleed, " \ + "who has\r\nhad a complicated hospital course including s/p embolization of\r\nLLL bronchial artery " \ + "[**1-17**], readmitted with hemoptysis on [**2120-2-3**]\r\nfrom [**Hospital 328**] Rehab, " \ + "and is now transferred from BMT floor for a\r\nsecond episode of hypoxic respiratory failure, " \ + "HTN and\r\ntachycardia in 3 days. Although details with regard to the\r\ninitiating event last " \ + "night are limited by difficulty with\r\nobtaining a history, review of his relevant data indicates " \ + "that\r\nventilatory failure as indicated by his elevated PCO2 appears to\r\nhave played a " \ + "significant role. He clearly has a history of\r\nobstructive coronary artery disease, and likely " \ + "had some element\r\nof diastolic dysfunction in the setting of his " \ + "acute\r\ntachycardia/hypoxia/hypertensive episode yesterday, although\r\nthere is no obvious " \ + "indication that his CAD was a primary cause\r\nof these events based on the history (an ECG from " \ + "the peri-event\r\nwould be helpful, but non-specific). According to his RN, he has\r\nnot had " \ + "excess secretions today, although he has a new fever and\r\nWBC, which indicates that he could " \ + "have had some mucous plugging\r\nin the setting of a new PNA, which is currently being " \ + "treated\r\nwith antibiotics. Otherwise, would not diurese him any further\r\nas he looks quite " \ + "dry by exam and labs. Would try gentle\r\nhydration, and monitor his volume status closely. I'm " \ + "not sure\r\nthat a TTE will shed a whole lot more light on the current\r\nsituation, but it will " \ + "at least assess any myocardial damage he\r\nmight have sustained.\r\nRecs:\r\n--Continue beta " \ + "blocker as you are\r\n--Hold diuretics, start gentle IV hydration, close monitor " \ + "of\r\nhemodynamics\r\n--Obtain an ECG, monitor for any new changes\r\n--Consider pulmonary causes " \ + "(decreased alveolar ventilation) for hypoxia\r\nThe Assessment and Plan will be reviewed with Dr. " \ + "[**Last Name (STitle) 5550**] in\r\nmulti- disciplinary rounds. Please see his/her note in " \ + "the\r\n[**Hospital 7382**] medical record for further comments and\r\nrecommendations. Thank you " \ + "for allowing us to participate in the\r\ncare of this patient. Please feel free to contact us with " \ + "any\r\nquestions or concerns.\r\n"; + return content + + +async def main(): + sample = HealthInsightsSamples() + await sample.match_trials() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py new file mode 100644 index 000000000000..243ee36d3f01 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# coding: utf-8 + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-healthinsights-clinicalmatching" +PACKAGE_PPRINT_NAME = "None" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace("-", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft None Client Library for Python", + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + "azure.healthinsights", + ] + ), + include_package_data=True, + package_data={ + "pytyped": ["py.typed"], + }, + install_requires=[ + "isodate<1.0.0,>=0.6.1", + "azure-core<2.0.0,>=1.24.0", + "typing-extensions>=4.3.0; python_version<'3.8.0'", + ], + python_requires=">=3.7", +) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/__init__.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py new file mode 100644 index 000000000000..ce09206dd299 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/conftest.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# coding=utf-8 + +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import os +import platform +import pytest +import sys + +from dotenv import load_dotenv + +from devtools_testutils import test_proxy, add_general_regex_sanitizer + +load_dotenv() + + +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + healthinsights_endpoint = os.environ.get( + "HEALTHINSIGHTS_ENDPOINT", "https://fake_ad_resource.cognitiveservices.azure.com/" + ) + healthinsights_key = os.environ.get("HEALTHINSIGHTS_KEY", "00000000000000000000000000000000") + add_general_regex_sanitizer( + regex=healthinsights_endpoint, value="https://fake_ad_resource.cognitiveservices.azure.com/" + ) + add_general_regex_sanitizer( + regex=healthinsights_key, value="00000000000000000000000000000000" + ) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json new file mode 100644 index 000000000000..f6025f09771f --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json @@ -0,0 +1,369 @@ +{ + "Entries": [ + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs?api-version=2023-03-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Content-Length": "1056", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": { + "configuration": { + "clinicalTrials": { + "registryFilters": [ + { + "conditions": [ + "non small cell lung cancer (nsclc)" + ], + "sources": [ + "clinicaltrials_gov" + ], + "recruitmentStatuses": [ + "recruiting" + ], + "facilityLocations": [ + { + "city": "gilbert", + "state": "arizona", + "country": "United States" + } + ] + } + ] + }, + "includeEvidence": true + }, + "patients": [ + { + "id": "patient1", + "info": { + "sex": "male", + "birthDate": "1961-04-25T09:54:29.5210127\u002B00:00", + "clinicalInfo": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "name": "Platelet count", + "value": "250000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0242957", + "name": "GeneOrProtein-Expression", + "value": "Negative;EntityType:GENEORPROTEIN-EXPRESSION" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1300072", + "name": "cancer stage", + "value": "2" + } + ] + } + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "d47aef12-2bd1-4a47-a0da-239c1de6ab2b", + "Content-Length": "0", + "Date": "Mon, 06 Mar 2023 15:34:26 GMT", + "Operation-Location": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "267d83df-294e-4e41-9f72-adf13dddd464", + "Content-Length": "199", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:26 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "notStarted" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "26f7b342-c674-4ffb-81bb-d0c012c591bb", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:28 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d4e95d1b-db8a-4851-bc36-a977a2b6464f", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:29 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e71a79a3-971e-40dd-bc82-7215eb10df98", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:30 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7269071d-4fc0-416a-8237-83cc30a1a1b4", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:31 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c4428247-7d19-4b0c-880f-080da4452b6c", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:33 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "66e767ae-51c3-412c-a20d-24e656378cb9", + "Content-Length": "196", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:34 GMT", + "Retry-After": "1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:26Z", + "status": "running" + } + }, + { + "RequestUri": "https://fake_ad_resource.cognitiveservices.azure.com//healthinsights/trialmatcher/jobs/b7263d15-e9f5-4116-ab0f-904d1a6257fa?api-version=2023-03-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate", + "Connection": "keep-alive", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "User-Agent": "azsdk-python-health-insights-ClinicalMatching/1.0.0b1 Python/3.11.1 (Windows-10-10.0.22621-SP0)" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c1e20b50-d504-488a-8301-1bb0a7103860", + "Content-Length": "1038", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 06 Mar 2023 15:34:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "results": { + "patients": [ + { + "id": "patient1", + "inferences": [ + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: Has a radiation therapy plan approved by the central radiation therapy quality assurance vendor", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: Is able to receive SBRT and does not have an ultra-centrally located tumor", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + } + ], + "id": "NCT03924869", + "source": "clinicaltrials.gov", + "value": "Ineligible", + "confidenceScore": 0.0 + } + ], + "neededClinicalInfo": [] + } + ], + "modelVersion": "2023.130.1.0", + "knowledgeGraphLastUpdateDate": "01/11/2023" + }, + "jobId": "b7263d15-e9f5-4116-ab0f-904d1a6257fa", + "createdDateTime": "2023-03-06T15:34:26Z", + "expirationDateTime": "2023-03-06T16:34:26Z", + "lastUpdateDateTime": "2023-03-06T15:34:35Z", + "status": "succeeded" + } + } + ], + "Variables": {} +} diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py new file mode 100644 index 000000000000..ad2e8281d4e1 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py @@ -0,0 +1,101 @@ +import functools +import json + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient + +from devtools_testutils import ( + AzureRecordedTestCase, + PowerShellPreparer, + recorded_by_proxy, +) + +HealthInsightsEnvPreparer = functools.partial( + PowerShellPreparer, + "healthinsights", + healthinsights_endpoint="https://fake_ad_resource.cognitiveservices.azure.com/", + healthinsights_key="00000000000000000000000000000000", +) + + +class TestMatchTrials(AzureRecordedTestCase): + + @HealthInsightsEnvPreparer() + @recorded_by_proxy + def test_match_trials(self, healthinsights_endpoint, healthinsights_key): + clinical_matching_client = ClinicalMatchingClient(healthinsights_endpoint, + AzureKeyCredential(healthinsights_key)) + + assert clinical_matching_client is not None + + data = { + "configuration": { + "clinicalTrials": { + "registryFilters": [ + { + "conditions": [ + "non small cell lung cancer (nsclc)" + ], + "sources": [ + "clinicaltrials_gov" + ], + "recruitmentStatuses": [ + "recruiting" + ], + "facilityLocations": [ + { + "city": "gilbert", + "state": "arizona", + "country": "United States" + } + ] + } + ] + }, + "includeEvidence": True + }, + "patients": [ + { + "id": "patient1", + "info": { + "sex": "male", + "birthDate": "1961-04-25T09:54:29.5210127+00:00", + "clinicalInfo": [{ + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "name": "Platelet count", + "value": "250000" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0242957", + "name": "GeneOrProtein-Expression", + "value": "Negative;EntityType:GENEORPROTEIN-EXPRESSION" + }, + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1300072", + "name": "cancer stage", + "value": "2" + }] + } + } + ] + } + + poller = clinical_matching_client.begin_match_trials(data) + result = poller.result() + + assert len(result.results.patients[0].inferences) is not 0 diff --git a/sdk/healthinsights/ci.yml b/sdk/healthinsights/ci.yml new file mode 100644 index 000000000000..b6cd0c3ca813 --- /dev/null +++ b/sdk/healthinsights/ci.yml @@ -0,0 +1,37 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/healthinsights/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/healthinsights/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: healthinsights + TestProxy: true + Artifacts: + - name: azure-healthinsights-cancerprofiling + safeName: azurehealthinsightscancerprofiling + + - name: azure-healthinsights-clinicalmatching + safeName: azurehealthinsightsclinicalmatching diff --git a/shared_requirements.txt b/shared_requirements.txt index d4416750d89c..203d6405ccfb 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -836,6 +836,12 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-ai-anomalydetector isodate<1.0.0,>=0.6.1 #override azure-ai-anomalydetector azure-core<2.0.0,>=1.24.0 #override azure-ai-anomalydetector typing-extensions>=4.3.0; python_version<'3.8.0' +#override azure-healthinsights-clinicalmatching isodate<1.0.0,>=0.6.1 +#override azure-healthinsights-cancerprofiling isodate<1.0.0,>=0.6.1 +#override azure-healthinsights-clinicalmatching azure-core<2.0.0,>=1.24.0 +#override azure-healthinsights-cancerprofiling azure-core<2.0.0,>=1.24.0 +#override azure-healthinsights-clinicalmatching typing-extensions>=4.3.0; python_version<'3.8.0' +#override azure-healthinsights-cancerprofiling typing-extensions>=4.3.0; python_version<'3.8.0' #override azure-mgmt-vmwarecloudsimple msrest>=0.7.1 #override azure-developer-devcenter azure-core<2.0.0,>=1.24.0 #override azure-developer-devcenter typing-extensions>=4.3.0; python_version<'3.8.0' From f22688c7959cc681baa73d7b2ba6918330b5d848 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Tue, 14 Mar 2023 15:41:57 +0200 Subject: [PATCH 02/17] rename country to country_or_region --- .../healthinsights/cancerprofiling/_client.py | 2 +- .../cancerprofiling/_model_base.py | 12 +- .../_operations/_operations.py | 3 +- .../cancerprofiling/aio/_client.py | 2 +- .../aio/_operations/_operations.py | 3 +- .../cancerprofiling/models/_models.py | 30 ++--- .../clinicalmatching/_client.py | 2 +- .../clinicalmatching/_model_base.py | 10 +- .../_operations/_operations.py | 3 +- .../clinicalmatching/aio/_client.py | 2 +- .../aio/_operations/_operations.py | 3 +- .../clinicalmatching/models/_models.py | 119 +++++++++--------- .../samples/sample_match_trials_fhir.py | 2 +- ..._match_trials_structured_coded_elements.py | 2 +- ...h_trials_structured_coded_elements_sync.py | 2 +- ...match_trials_unstructured_clinical_note.py | 2 +- ...ls.pyTestMatchTrialstest_match_trials.json | 2 +- .../tests/test_match_trials.py | 2 +- 18 files changed, 97 insertions(+), 106 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py index 2d21a0c6bd32..692697cfacf2 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py @@ -37,7 +37,7 @@ class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: di def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: _endpoint = "{endpoint}/healthinsights" self._config = CancerProfilingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) - self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + self._client: PipelineClient = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py index c6fcd9a18c25..c37b9314ab90 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py @@ -635,7 +635,7 @@ def _deserialize_with_callable( # for unknown value, return raw value return value if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value) # type: ignore + return deserializer._deserialize(value) return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -653,7 +653,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, is_discriminator: bool = False, readonly: bool = False, default: typing.Any = _UNSET, @@ -672,7 +672,7 @@ def _rest_name(self) -> str: raise ValueError("Rest name was never set") return self._rest_name_input - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + def __get__(self, obj: Model, type=None): # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class item = obj.get(self._rest_name) @@ -692,7 +692,7 @@ def __set__(self, obj: Model, value) -> None: obj.__setitem__(self._rest_name, _deserialize(self._type, value)) obj.__setitem__(self._rest_name, _serialize(value)) - def _get_deserialize_callable_from_annotation( # pylint: disable=redefined-builtin + def _get_deserialize_callable_from_annotation( self, annotation: typing.Any ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: return _get_deserialize_callable_from_annotation(annotation, self._module, self) @@ -701,7 +701,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=redefined-buil def rest_field( *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, readonly: bool = False, default: typing.Any = _UNSET, ) -> typing.Any: @@ -709,6 +709,6 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py index 433560af91dc..1f488a110c7f 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_operations/_operations.py @@ -129,8 +129,9 @@ def _infer_cancer_profile_initial( } request.url = self._client.format_url(request.url, **path_format_arguments) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py index 990db21b2aea..f1c88e35b696 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_client.py @@ -37,7 +37,7 @@ class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: di def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: _endpoint = "{endpoint}/healthinsights" self._config = CancerProfilingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) - self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py index 9cf09e362695..7d03f6f8261a 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/aio/_operations/_operations.py @@ -85,8 +85,9 @@ async def _infer_cancer_profile_initial( } request.url = self._client.format_url(request.url, **path_format_arguments) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py index f91de6cc4e79..f432e5c342b5 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py @@ -127,9 +127,9 @@ class DocumentContent(_model_base.Model): """ source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") - """The type of the content's source. In case the source type is 'inline', the content is given as a string (for - instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values - are: \"inline\" and \"reference\". """ + """The type of the content's source. +In case the source type is 'inline', the content is given as a string (for instance, text). +In case the source type is 'reference', the content is given as a URI. Required. Known values are: \"inline\" and \"reference\".""" value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -347,10 +347,8 @@ class OncoPhenotypeInference(_model_base.Model): :vartype case_id: str """ - type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() # pylint: disable=redefined-builtin - """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", - \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", - and \"pathologicStageM\". """ + type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() + """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", and \"pathologicStageM\".""" value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ description: Optional[str] = rest_field() @@ -366,7 +364,7 @@ class OncoPhenotypeInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.OncoPhenotypeInferenceType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.OncoPhenotypeInferenceType"], value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, @@ -415,8 +413,7 @@ class OncoPhenotypeModelConfiguration(_model_base.Model): This could be used if only part of the Onco Phenotype inferences are required. If this list is omitted or empty, the model will return all the inference types. """ check_for_cancer_case: bool = rest_field(name="checkForCancerCase", default=False) - """An indication whether to perform a preliminary step on the patient's documents to determine whether they - relate to a Cancer case. """ + """An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case. """ @overload def __init__( @@ -511,8 +508,7 @@ class OncoPhenotypeResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", - \"failed\", and \"partiallyCompleted\". """ + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.OncoPhenotypeResults"] = rest_field(readonly=True) @@ -583,12 +579,10 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.cancerprofiling.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin - """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). - Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ + type: Union[str, "_models.DocumentType"] = rest_field() + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", - \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\".""" id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() @@ -602,7 +596,7 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"], id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py index e1660a68e86a..ae3c44691fb8 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_client.py @@ -39,7 +39,7 @@ class ClinicalMatchingClient( def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: _endpoint = "{endpoint}/healthinsights" self._config = ClinicalMatchingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) - self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + self._client: PipelineClient = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py index cedbc25ec4df..c37b9314ab90 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py @@ -635,7 +635,7 @@ def _deserialize_with_callable( # for unknown value, return raw value return value if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value) # type: ignore + return deserializer._deserialize(value) return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -653,7 +653,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, is_discriminator: bool = False, readonly: bool = False, default: typing.Any = _UNSET, @@ -672,7 +672,7 @@ def _rest_name(self) -> str: raise ValueError("Rest name was never set") return self._rest_name_input - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + def __get__(self, obj: Model, type=None): # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class item = obj.get(self._rest_name) @@ -701,7 +701,7 @@ def _get_deserialize_callable_from_annotation( def rest_field( *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + type: typing.Optional[typing.Callable] = None, readonly: bool = False, default: typing.Any = _UNSET, ) -> typing.Any: @@ -709,6 +709,6 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py index f9fddf946835..b196f6ab5a38 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_operations/_operations.py @@ -129,8 +129,9 @@ def _match_trials_initial( } request.url = self._client.format_url(request.url, **path_format_arguments) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py index cf7ecdb394c1..dfebacf83a9e 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_client.py @@ -39,7 +39,7 @@ class ClinicalMatchingClient( def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) -> None: _endpoint = "{endpoint}/healthinsights" self._config = ClinicalMatchingClientConfiguration(endpoint=endpoint, credential=credential, **kwargs) - self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) self._serialize = Serializer() self._deserialize = Deserializer() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py index 9d0489d6c845..4de54baf9d20 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/aio/_operations/_operations.py @@ -85,8 +85,9 @@ async def _match_trials_initial( } request.url = self._client.format_url(request.url, **path_format_arguments) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py index 7bcd19b856f9..f40763b2a982 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py @@ -114,7 +114,7 @@ class AreaGeometry(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonGeometryType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonGeometryType"], coordinates: List[float], ): ... @@ -272,8 +272,7 @@ class ClinicalTrialDemographics(_model_base.Model): """ accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = rest_field(name="acceptedSex") - """Indication of the sex of people who may participate in the clinical trial. Known values are: \"all\", - \"female\", and \"male\". """ + """Indication of the sex of people who may participate in the clinical trial. Known values are: \"all\", \"female\", and \"male\".""" accepted_age_range: Optional["_models.AcceptedAgeRange"] = rest_field(name="acceptedAgeRange") """A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. """ @@ -378,13 +377,11 @@ class ClinicalTrialMetadata(_model_base.Model): """Phases which are relevant for the clinical trial. Each clinical trial can be in a certain phase or in multiple phases. """ study_type: Optional[Union[str, "_models.ClinicalTrialStudyType"]] = rest_field(name="studyType") - """Possible study types of a clinical trial. Known values are: \"interventional\", \"observational\", - \"expandedAccess\", and \"patientRegistries\". """ + """Possible study types of a clinical trial. Known values are: \"interventional\", \"observational\", \"expandedAccess\", and \"patientRegistries\".""" recruitment_status: Optional[Union[str, "_models.ClinicalTrialRecruitmentStatus"]] = rest_field( name="recruitmentStatus" ) - """Possible recruitment status of a clinical trial. Known values are: \"unknownStatus\", \"notYetRecruiting\", - \"recruiting\", and \"enrollingByInvitation\". """ + """Possible recruitment status of a clinical trial. Known values are: \"unknownStatus\", \"notYetRecruiting\", \"recruiting\", and \"enrollingByInvitation\".""" conditions: List[str] = rest_field() """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. Required. """ sponsors: Optional[List[str]] = rest_field() @@ -475,40 +472,40 @@ class ClinicalTrialRegistryFilter(_model_base.Model): # pylint: disable=too-man """ conditions: Optional[List[str]] = rest_field() - """Trials with any of the given medical conditions will be included in the selection (provided that other - limitations are satisfied). Leaving this list empty will not limit the medical conditions. """ + """Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the medical conditions. """ study_types: Optional[List[Union[str, "_models.ClinicalTrialStudyType"]]] = rest_field(name="studyTypes") - """Trials with any of the given study types will be included in the selection (provided that other limitations - are satisfied). Leaving this list empty will not limit the study types. """ + """Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the study types. """ recruitment_statuses: Optional[List[Union[str, "_models.ClinicalTrialRecruitmentStatus"]]] = rest_field( name="recruitmentStatuses" ) - """Trials with any of the given recruitment statuses will be included in the selection (provided that other - limitations are satisfied). Leaving this list empty will not limit the recruitment statuses. """ + """Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the recruitment statuses. """ sponsors: Optional[List[str]] = rest_field() - """Trials with any of the given sponsors will be included in the selection (provided that other limitations are - satisfied). Leaving this list empty will not limit the sponsors. """ + """Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the sponsors. """ phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = rest_field() - """Trials with any of the given phases will be included in the selection (provided that other limitations are - satisfied). Leaving this list empty will not limit the phases. """ + """Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the phases. """ purposes: Optional[List[Union[str, "_models.ClinicalTrialPurpose"]]] = rest_field() - """Trials with any of the given purposes will be included in the selection (provided that other limitations are - satisfied). Leaving this list empty will not limit the purposes. """ + """Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the purposes. """ ids: Optional[List[str]] = rest_field() - """Trials with any of the given identifiers will be included in the selection (provided that other limitations - are satisfied). Leaving this list empty will not limit the trial identifiers. """ + """Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial identifiers. """ sources: Optional[List[Union[str, "_models.ClinicalTrialSource"]]] = rest_field() - """Trials with any of the given sources will be included in the selection (provided that other limitations are - satisfied). Leaving this list empty will not limit the sources. """ + """Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the sources. """ facility_names: Optional[List[str]] = rest_field(name="facilityNames") - """Trials with any of the given facility names will be included in the selection (provided that other limitations - are satisfied). Leaving this list empty will not limit the trial facility names. """ + """Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility names. """ facility_locations: Optional[List["_models.GeographicLocation"]] = rest_field(name="facilityLocations") - """Trials with any of the given facility locations will be included in the selection (provided that other - limitations are satisfied). Leaving this list empty will not limit the trial facility locations. """ + """Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility locations. """ facility_areas: Optional[List["_models.GeographicArea"]] = rest_field(name="facilityAreas") - """Trials with any of the given facility area boundaries will be included in the selection (provided that other - limitations are satisfied). Leaving this list empty will not limit the trial facility area boundaries. """ + """Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied). +Leaving this list empty will not limit the trial facility area boundaries. """ @overload def __init__( @@ -550,8 +547,8 @@ class ClinicalTrialResearchFacility(_model_base.Model): :vartype city: str :ivar state: State name. :vartype state: str - :ivar country: Country name. Required. - :vartype country: str + :ivar country_or_region: Country/region name. Required. + :vartype country_or_region: str """ name: str = rest_field() @@ -560,15 +557,15 @@ class ClinicalTrialResearchFacility(_model_base.Model): """City name. """ state: Optional[str] = rest_field() """State name. """ - country: str = rest_field() - """Country name. Required. """ + country_or_region: str = rest_field(name="countryOrRegion") + """Country/region name. Required. """ @overload def __init__( self, *, name: str, - country: str, + country_or_region: str, city: Optional[str] = None, state: Optional[str] = None, ): @@ -682,9 +679,9 @@ class DocumentContent(_model_base.Model): """ source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") - """The type of the content's source. In case the source type is 'inline', the content is given as a string (for - instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values - are: \"inline\" and \"reference\". """ + """The type of the content's source. +In case the source type is 'inline', the content is given as a string (for instance, text). +In case the source type is 'reference', the content is given as a URI. Required. Known values are: \"inline\" and \"reference\".""" value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -793,8 +790,7 @@ class ExtendedClinicalCodedElement(_model_base.Model): value: Optional[str] = rest_field() """A value associated with the code within the given clinical coding system. """ semantic_type: Optional[str] = rest_field(name="semanticType") - """The `UMLS semantic type `_ associated - with the coded concept. """ + """The `UMLS semantic type `_ associated with the coded concept. """ category: Optional[str] = rest_field() """The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. """ @@ -824,7 +820,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GeographicArea(_model_base.Model): """A geographic area, expressed as a ``Circle`` geometry represented using a ``GeoJSON Feature`` - (see `GeoJSON spec `_ ). + (see `GeoJSON spec `_\ ). All required parameters must be populated in order to send to Azure. @@ -836,7 +832,7 @@ class GeographicArea(_model_base.Model): :vartype properties: ~azure.healthinsights.clinicalmatching.models.AreaProperties """ - type: Union[str, "_models.GeoJsonType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonType"] = rest_field() """``GeoJSON`` type. Required. \"Feature\"""" geometry: "_models.AreaGeometry" = rest_field() """``GeoJSON`` geometry, representing the area circle's center. Required. """ @@ -847,7 +843,7 @@ class GeographicArea(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.GeoJsonType"], geometry: "_models.AreaGeometry", properties: "_models.AreaProperties", ): @@ -865,10 +861,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GeographicLocation(_model_base.Model): - """A location given as a combination of city/state/country. It could specify a - city, a state or a country.:code:`
`In case a city is specified, either state + - country or country (for countries where there are no states) should be added. - In case a state is specified (without a city), country should be added. + """A location given as a combination of city, state and country/region. It could specify a city, a + state or a country/region. + In case a city is specified, either state +country/region or country/region (for + countries/regions where there are no states) should be added. + In case a state is specified (without a city), country/region should be added. All required parameters must be populated in order to send to Azure. @@ -876,22 +873,22 @@ class GeographicLocation(_model_base.Model): :vartype city: str :ivar state: State name. :vartype state: str - :ivar country: Country name. Required. - :vartype country: str + :ivar country_or_region: Country/region name. Required. + :vartype country_or_region: str """ city: Optional[str] = rest_field() """City name. """ state: Optional[str] = rest_field() """State name. """ - country: str = rest_field() - """Country name. Required. """ + country_or_region: str = rest_field(name="countryOrRegion") + """Country/region name. Required. """ @overload def __init__( self, *, - country: str, + country_or_region: str, city: Optional[str] = None, state: Optional[str] = None, ): @@ -972,12 +969,10 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.clinicalmatching.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin - """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). - Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ + type: Union[str, "_models.DocumentType"] = rest_field() + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", - \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\".""" id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() @@ -991,7 +986,7 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.DocumentType"], id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, @@ -1157,7 +1152,7 @@ class TrialMatcherInference(_model_base.Model): :vartype metadata: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialMetadata """ - type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() # pylint: disable=redefined-builtin + type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() """The type of the Trial Matcher inference. Required. \"trialEligibility\"""" value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ @@ -1178,7 +1173,7 @@ class TrialMatcherInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.TrialMatcherInferenceType"], # pylint: disable=redefined-builtin + type: Union[str, "_models.TrialMatcherInferenceType"], value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, @@ -1320,8 +1315,7 @@ class TrialMatcherPatientResult(_model_base.Model): inferences: List["_models.TrialMatcherInference"] = rest_field() """The model's inferences for the given patient. Required. """ needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = rest_field(name="neededClinicalInfo") - """Clinical information which is needed to provide better trial matching results for the patient. Clinical - information which is needed to provide better trial matching results for the patient. """ + """Clinical information which is needed to provide better trial matching results for the patient. Clinical information which is needed to provide better trial matching results for the patient.""" @overload def __init__( @@ -1379,8 +1373,7 @@ class TrialMatcherResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", - \"failed\", and \"partiallyCompleted\". """ + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.TrialMatcherResults"] = rest_field(readonly=True) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index 8af076ea0357..e16f137e219e 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -83,7 +83,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py index 6af0abdeb8bf..fe9c8ff4e0e7 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -103,7 +103,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py index fa14782fd190..c1ead0fd77c0 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py @@ -82,7 +82,7 @@ def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py index 92c74cca5d96..49efeec98860 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py @@ -69,7 +69,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json index f6025f09771f..01c1a5956a9d 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/recordings/test_match_trials.pyTestMatchTrialstest_match_trials.json @@ -30,7 +30,7 @@ { "city": "gilbert", "state": "arizona", - "country": "United States" + "countryOrRegion": "United States" } ] } diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py index ad2e8281d4e1..24da4826c1d3 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/tests/test_match_trials.py @@ -46,7 +46,7 @@ def test_match_trials(self, healthinsights_endpoint, healthinsights_key): { "city": "gilbert", "state": "arizona", - "country": "United States" + "countryOrRegion": "United States" } ] } From 58b084e43b17dbd987864140def391b4bf542625 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Wed, 15 Mar 2023 12:23:34 +0200 Subject: [PATCH 03/17] update product name to azure-health-insights --- .../azure-healthinsights-cancerprofiling/samples/README.md | 2 +- .../azure-healthinsights-clinicalmatching/samples/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md index ffd9f6131743..bb198fc1f209 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md @@ -5,7 +5,7 @@ languages: products: - azure - azure-cognitive-services - - azure-healthinsights-cancerprofiling + - azure-health-insights urlFragment: healthinsights-cancerprofiling-samples --- diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md index ed7b7758fe0e..076db7848984 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md @@ -5,7 +5,7 @@ languages: products: - azure - azure-cognitive-services - - azure-healthinsights-clinicalmatching + - azure-health-insights urlFragment: healthinsights-clinicalmatching-samples --- From 9b77da1a8349bb7410fb7a20fee412d9c20367b0 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 11:33:35 +0200 Subject: [PATCH 04/17] fix spell check --- .vscode/cspell.json | 28 +++++++++++++++++++ .../samples/sample_infer_cancer_profiling.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 8000ae2e0a06..8a26e1c0190d 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -60,6 +60,8 @@ "sdk/eventhub/azure-eventhub/**", "sdk/easm/azure-defender-easm/azure/defender/easm/**", "sdk/graphrbac/azure-graphrbac/**", + "sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/**", + "sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/**", "sdk/formrecognizer/azure-ai-formrecognizer/samples/sample_forms/**", "sdk/formrecognizer/azure-ai-formrecognizer/tests/sample_forms/**", "sdk/personalizer/azure-ai-personalizer/azure/ai/personalizer/**", @@ -607,6 +609,32 @@ ] }, { + "filename": "sdk/healthinsights/**", + "words": [ + "ACEI", + "acessory", + "auscltation", + "fhir", + "Gastro", + "hypercholesterolemia", + "hystarectomy", + "IADLs", + "LVEF", + "Musculo", + "nxoperex", + "onco", + "PERRLA", + "Phos" + "Prilosec", + "solumedrol", + "sulfonylurea", + "Theophyline", + "tounge", + "tounge", + "Uniphyl", + "Zocor" + ] + }, { "filename": "sdk/keyvault/**", "words": [ "eddsa" diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index 956186662f00..fde5d1c9a79e 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -114,7 +114,7 @@ async def infer_cancer_profiling(self): created_date_time=datetime.datetime(2021, 10, 20)) doc_content3 = "PATHOLOGY REPORT" \ - + " Clinical Iדדnformation" \ + + " Clinical Information" \ + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC" \ + " Diagnosis" \ + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:" \ From bf2945d02c713e4c0a35f7bc6fa3175bf9aaa58f Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 11:51:42 +0200 Subject: [PATCH 05/17] fix cspell syntax --- .vscode/cspell.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 8a26e1c0190d..21508f31f9dc 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -624,7 +624,7 @@ "nxoperex", "onco", "PERRLA", - "Phos" + "Phos", "Prilosec", "solumedrol", "sulfonylurea", From f369b44b5c82f6f6c504d785e2c1d8c672b54cc3 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 12:39:35 +0200 Subject: [PATCH 06/17] add spell words to fix samples --- .vscode/cspell.json | 85 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 21508f31f9dc..1f7da58782fc 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -611,30 +611,113 @@ { "filename": "sdk/healthinsights/**", "words": [ + "ABDO", "ACEI", "acessory", + "Angioedema", + "ANGIOEDEMA", + "angioedema", + "Apyrexial", "auscltation", + "bilat", + "BIPAP", + "Bisacodyl", + "brochial", + "Caphosol", + "CARDIOVASC", + "chole", + "Cytoxan", + "DCIS", + "DEBAB", + "DEBAC", + "DEBAE", + "DEFIC", + "Dilt", + "diurese", + "dyslipidemia", + "ecchymoses", + "ENDO", + "Farenheit", "fhir", + "fludarabine", "Gastro", + "Gastroesophageal", + "GENEORPROTEIN", + "GENEORPROTEIN", + "Hematocrit", + "hemodynamic", + "hemodynamics", + "hemolytic", + "hemoptysis", + "hemoptysis", + "Hydrox", "hypercholesterolemia", + "HYPERLIPEM", + "hypernatremia", + "Hypogammaglobumenia", "hystarectomy", "IADLs", + "inferolateral", + "IVIG", + "KIDN", + "lasix", + "LBTEST", + "LBTEST", + "LBTEST", + "LBTEST", + "LBTEST", + "LBTESTCD", + "LMCA", + "lopressor", + "LVEDP", "LVEF", + "LYMPHADENO", + "MALIG", + "Medrol", + "meds", + "MIBI", + "Mirena", + "MTHU", "Musculo", + "MYCNF", + "MYOCARD", + "nbrochial", + "NEURO", + "nhemodynamics", + "NKDA", + "nsclc", "nxoperex", + "Omecprazole", "onco", "PERRLA", "Phos", + "PRBCs", "Prilosec", + "retrorubral", + "RPDA", + "sats", + "scopy", + "SDTM", + "Soln", + "Solu", "solumedrol", + "Succ", "sulfonylurea", + "tachycardic", + "tachypnic", + "Tazobactam", "Theophyline", + "thyromegaly", "tounge", "tounge", "Uniphyl", + "VASODILAT", + "VSTESTCD", + "xoperex", "Zocor" ] - }, { + }, + { "filename": "sdk/keyvault/**", "words": [ "eddsa" From 0d6b17e58194b0b638320159f2994dbe91f82fc6 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 13:12:45 +0200 Subject: [PATCH 07/17] fix syntax typo --- .../samples/sample_match_trials_fhir.py | 2 +- .../samples/sample_match_trials_structured_coded_elements.py | 2 +- .../samples/sample_match_trials_unstructured_clinical_note.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index e16f137e219e..a6d24e030954 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -83,7 +83,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py index fe9c8ff4e0e7..f84f05938f61 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -103,7 +103,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py index 49efeec98860..5fbcb835da11 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py @@ -69,7 +69,7 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region=="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] From 3f68e5122a326468c37b01f41cf22eb3bf7bddeb Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 14:47:18 +0200 Subject: [PATCH 08/17] lint issues --- .../healthinsights/cancerprofiling/_client.py | 4 +- .../cancerprofiling/models/_models.py | 20 ++++-- .../clinicalmatching/models/_models.py | 66 ++++++++++++------- 3 files changed, 61 insertions(+), 29 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py index 692697cfacf2..4ac3aa0699a5 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_client.py @@ -18,7 +18,9 @@ from ._serialization import Deserializer, Serializer -class CancerProfilingClient(CancerProfilingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword +class CancerProfilingClient( + CancerProfilingClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword """CancerProfilingClient. :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py index f432e5c342b5..e23fc0c2c7f6 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py @@ -129,7 +129,8 @@ class DocumentContent(_model_base.Model): source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") """The type of the content's source. In case the source type is 'inline', the content is given as a string (for instance, text). -In case the source type is 'reference', the content is given as a URI. Required. Known values are: \"inline\" and \"reference\".""" +In case the source type is 'reference', the content is given as a URI. +Required. Known values are: \"inline\" and \"reference\".""" value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -348,7 +349,9 @@ class OncoPhenotypeInference(_model_base.Model): """ type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() - """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", and \"pathologicStageM\".""" + """The type of the Onco Phenotype inference. + Required. Known values are: \"tumorSite\", \"histology\", \"clinicalStageT\", \"clinicalStageN\", + \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", and \"pathologicStageM\".""" value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ description: Optional[str] = rest_field() @@ -413,7 +416,8 @@ class OncoPhenotypeModelConfiguration(_model_base.Model): This could be used if only part of the Onco Phenotype inferences are required. If this list is omitted or empty, the model will return all the inference types. """ check_for_cancer_case: bool = rest_field(name="checkForCancerCase", default=False) - """An indication whether to perform a preliminary step on the patient's documents to determine whether they relate to a Cancer case. """ + """An indication whether to perform a preliminary step on the patient's documents + to determine whether they relate to a Cancer case. """ @overload def __init__( @@ -508,7 +512,8 @@ class OncoPhenotypeResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" + """The status of the processing job. + Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.OncoPhenotypeResults"] = rest_field(readonly=True) @@ -580,9 +585,12 @@ class PatientDocument(_model_base.Model): """ type: Union[str, "_models.DocumentType"] = rest_field() - """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\".""" + """The type of the clinical document. + Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", + \"imaging\", \"laboratory\", and \"pathology\".""" id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py index f40763b2a982..86c577e7d088 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py @@ -272,9 +272,11 @@ class ClinicalTrialDemographics(_model_base.Model): """ accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = rest_field(name="acceptedSex") - """Indication of the sex of people who may participate in the clinical trial. Known values are: \"all\", \"female\", and \"male\".""" + """Indication of the sex of people who may participate in the clinical trial. +Known values are: \"all\", \"female\", and \"male\".""" accepted_age_range: Optional["_models.AcceptedAgeRange"] = rest_field(name="acceptedAgeRange") - """A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. """ + """A definition of the range of ages accepted by a clinical trial. + Contains a minimum age and/or a maximum age. """ @overload def __init__( @@ -377,13 +379,15 @@ class ClinicalTrialMetadata(_model_base.Model): """Phases which are relevant for the clinical trial. Each clinical trial can be in a certain phase or in multiple phases. """ study_type: Optional[Union[str, "_models.ClinicalTrialStudyType"]] = rest_field(name="studyType") - """Possible study types of a clinical trial. Known values are: \"interventional\", \"observational\", \"expandedAccess\", and \"patientRegistries\".""" + """Possible study types of a clinical trial. + Known values are: \"interventional\", \"observational\", \"expandedAccess\", and \"patientRegistries\".""" recruitment_status: Optional[Union[str, "_models.ClinicalTrialRecruitmentStatus"]] = rest_field( name="recruitmentStatus" ) - """Possible recruitment status of a clinical trial. Known values are: \"unknownStatus\", \"notYetRecruiting\", \"recruiting\", and \"enrollingByInvitation\".""" + """Possible recruitment status of a clinical trial. + Known values are: \"unknownStatus\", \"notYetRecruiting\", \"recruiting\", and \"enrollingByInvitation\".""" conditions: List[str] = rest_field() - """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. Required. """ + """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings.Required. """ sponsors: Optional[List[str]] = rest_field() """Sponsors/collaborators involved with the trial. """ contacts: Optional[List["_models.ContactDetails"]] = rest_field() @@ -472,39 +476,50 @@ class ClinicalTrialRegistryFilter(_model_base.Model): # pylint: disable=too-man """ conditions: Optional[List[str]] = rest_field() - """Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given medical conditions will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the medical conditions. """ study_types: Optional[List[Union[str, "_models.ClinicalTrialStudyType"]]] = rest_field(name="studyTypes") - """Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given study types will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the study types. """ recruitment_statuses: Optional[List[Union[str, "_models.ClinicalTrialRecruitmentStatus"]]] = rest_field( name="recruitmentStatuses" ) - """Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given recruitment statuses will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the recruitment statuses. """ sponsors: Optional[List[str]] = rest_field() - """Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given sponsors will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the sponsors. """ phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = rest_field() - """Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given phases will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the phases. """ purposes: Optional[List[Union[str, "_models.ClinicalTrialPurpose"]]] = rest_field() - """Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given purposes will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the purposes. """ ids: Optional[List[str]] = rest_field() - """Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given identifiers will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the trial identifiers. """ sources: Optional[List[Union[str, "_models.ClinicalTrialSource"]]] = rest_field() - """Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given sources will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the sources. """ facility_names: Optional[List[str]] = rest_field(name="facilityNames") - """Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given facility names will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the trial facility names. """ facility_locations: Optional[List["_models.GeographicLocation"]] = rest_field(name="facilityLocations") - """Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given facility locations will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the trial facility locations. """ facility_areas: Optional[List["_models.GeographicArea"]] = rest_field(name="facilityAreas") - """Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied). + """Trials with any of the given facility area boundaries will be included in the selection +(provided that other limitations are satisfied). Leaving this list empty will not limit the trial facility area boundaries. """ @overload @@ -681,7 +696,8 @@ class DocumentContent(_model_base.Model): source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") """The type of the content's source. In case the source type is 'inline', the content is given as a string (for instance, text). -In case the source type is 'reference', the content is given as a URI. Required. Known values are: \"inline\" and \"reference\".""" +In case the source type is 'reference', the content is given as a URI. +Required. Known values are: \"inline\" and \"reference\".""" value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -790,7 +806,8 @@ class ExtendedClinicalCodedElement(_model_base.Model): value: Optional[str] = rest_field() """A value associated with the code within the given clinical coding system. """ semantic_type: Optional[str] = rest_field(name="semanticType") - """The `UMLS semantic type `_ associated with the coded concept. """ + """The `UMLS semantic type `_ + associated with the coded concept. """ category: Optional[str] = rest_field() """The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. """ @@ -970,9 +987,12 @@ class PatientDocument(_model_base.Model): """ type: Union[str, "_models.DocumentType"] = rest_field() - """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" + """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\".""" + """The type of the clinical document. + Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", + \"imaging\", \"laboratory\", and \"pathology\".""" id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() @@ -1315,7 +1335,8 @@ class TrialMatcherPatientResult(_model_base.Model): inferences: List["_models.TrialMatcherInference"] = rest_field() """The model's inferences for the given patient. Required. """ needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = rest_field(name="neededClinicalInfo") - """Clinical information which is needed to provide better trial matching results for the patient. Clinical information which is needed to provide better trial matching results for the patient.""" + """Clinical information which is needed to provide better trial matching results for the patient. + Clinical information which is needed to provide better trial matching results for the patient.""" @overload def __init__( @@ -1373,7 +1394,8 @@ class TrialMatcherResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" + """The status of the processing job. + Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.TrialMatcherResults"] = rest_field(readonly=True) From c7f401cef89bb371474091aa4d22b75fdb7a8e06 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 16 Mar 2023 15:33:39 +0200 Subject: [PATCH 09/17] lint issues --- .../cancerprofiling/_model_base.py | 12 +- .../cancerprofiling/models/_models.py | 36 +++--- .../clinicalmatching/_model_base.py | 10 +- .../clinicalmatching/models/_models.py | 114 ++++++++---------- 4 files changed, 78 insertions(+), 94 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py index c37b9314ab90..c6fcd9a18c25 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/_model_base.py @@ -635,7 +635,7 @@ def _deserialize_with_callable( # for unknown value, return raw value return value if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value) + return deserializer._deserialize(value) # type: ignore return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -653,7 +653,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, readonly: bool = False, default: typing.Any = _UNSET, @@ -672,7 +672,7 @@ def _rest_name(self) -> str: raise ValueError("Rest name was never set") return self._rest_name_input - def __get__(self, obj: Model, type=None): + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class item = obj.get(self._rest_name) @@ -692,7 +692,7 @@ def __set__(self, obj: Model, value) -> None: obj.__setitem__(self._rest_name, _deserialize(self._type, value)) obj.__setitem__(self._rest_name, _serialize(value)) - def _get_deserialize_callable_from_annotation( + def _get_deserialize_callable_from_annotation( # pylint: disable=redefined-builtin self, annotation: typing.Any ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: return _get_deserialize_callable_from_annotation(annotation, self._module, self) @@ -701,7 +701,7 @@ def _get_deserialize_callable_from_annotation( def rest_field( *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin readonly: bool = False, default: typing.Any = _UNSET, ) -> typing.Any: @@ -709,6 +709,6 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py index e23fc0c2c7f6..f91de6cc4e79 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/azure/healthinsights/cancerprofiling/models/_models.py @@ -127,10 +127,9 @@ class DocumentContent(_model_base.Model): """ source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") - """The type of the content's source. -In case the source type is 'inline', the content is given as a string (for instance, text). -In case the source type is 'reference', the content is given as a URI. -Required. Known values are: \"inline\" and \"reference\".""" + """The type of the content's source. In case the source type is 'inline', the content is given as a string (for + instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values + are: \"inline\" and \"reference\". """ value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -348,10 +347,10 @@ class OncoPhenotypeInference(_model_base.Model): :vartype case_id: str """ - type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() - """The type of the Onco Phenotype inference. - Required. Known values are: \"tumorSite\", \"histology\", \"clinicalStageT\", \"clinicalStageN\", - \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", and \"pathologicStageM\".""" + type: Union[str, "_models.OncoPhenotypeInferenceType"] = rest_field() # pylint: disable=redefined-builtin + """The type of the Onco Phenotype inference. Required. Known values are: \"tumorSite\", \"histology\", + \"clinicalStageT\", \"clinicalStageN\", \"clinicalStageM\", \"pathologicStageT\", \"pathologicStageN\", + and \"pathologicStageM\". """ value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ description: Optional[str] = rest_field() @@ -367,7 +366,7 @@ class OncoPhenotypeInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.OncoPhenotypeInferenceType"], + type: Union[str, "_models.OncoPhenotypeInferenceType"], # pylint: disable=redefined-builtin value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, @@ -416,8 +415,8 @@ class OncoPhenotypeModelConfiguration(_model_base.Model): This could be used if only part of the Onco Phenotype inferences are required. If this list is omitted or empty, the model will return all the inference types. """ check_for_cancer_case: bool = rest_field(name="checkForCancerCase", default=False) - """An indication whether to perform a preliminary step on the patient's documents - to determine whether they relate to a Cancer case. """ + """An indication whether to perform a preliminary step on the patient's documents to determine whether they + relate to a Cancer case. """ @overload def __init__( @@ -512,8 +511,8 @@ class OncoPhenotypeResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. - Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", + \"failed\", and \"partiallyCompleted\". """ errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.OncoPhenotypeResults"] = rest_field(readonly=True) @@ -584,13 +583,12 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.cancerprofiling.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). - Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. - Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", - \"imaging\", \"laboratory\", and \"pathology\".""" + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", + \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() @@ -604,7 +602,7 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py index c37b9314ab90..cedbc25ec4df 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/_model_base.py @@ -635,7 +635,7 @@ def _deserialize_with_callable( # for unknown value, return raw value return value if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value) + return deserializer._deserialize(value) # type: ignore return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) except Exception as e: raise DeserializationError() from e @@ -653,7 +653,7 @@ def __init__( self, *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, readonly: bool = False, default: typing.Any = _UNSET, @@ -672,7 +672,7 @@ def _rest_name(self) -> str: raise ValueError("Rest name was never set") return self._rest_name_input - def __get__(self, obj: Model, type=None): + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class item = obj.get(self._rest_name) @@ -701,7 +701,7 @@ def _get_deserialize_callable_from_annotation( def rest_field( *, name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin readonly: bool = False, default: typing.Any = _UNSET, ) -> typing.Any: @@ -709,6 +709,6 @@ def rest_field( def rest_discriminator( - *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None + *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None # pylint: disable=redefined-builtin ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py index 86c577e7d088..c9627ce32ad3 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/azure/healthinsights/clinicalmatching/models/_models.py @@ -114,7 +114,7 @@ class AreaGeometry(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonGeometryType"], + type: Union[str, "_models.GeoJsonGeometryType"], # pylint: disable=redefined-builtin coordinates: List[float], ): ... @@ -272,11 +272,10 @@ class ClinicalTrialDemographics(_model_base.Model): """ accepted_sex: Optional[Union[str, "_models.ClinicalTrialAcceptedSex"]] = rest_field(name="acceptedSex") - """Indication of the sex of people who may participate in the clinical trial. -Known values are: \"all\", \"female\", and \"male\".""" + """Indication of the sex of people who may participate in the clinical trial. Known values are: \"all\", + \"female\", and \"male\". """ accepted_age_range: Optional["_models.AcceptedAgeRange"] = rest_field(name="acceptedAgeRange") - """A definition of the range of ages accepted by a clinical trial. - Contains a minimum age and/or a maximum age. """ + """A definition of the range of ages accepted by a clinical trial. Contains a minimum age and/or a maximum age. """ @overload def __init__( @@ -379,15 +378,15 @@ class ClinicalTrialMetadata(_model_base.Model): """Phases which are relevant for the clinical trial. Each clinical trial can be in a certain phase or in multiple phases. """ study_type: Optional[Union[str, "_models.ClinicalTrialStudyType"]] = rest_field(name="studyType") - """Possible study types of a clinical trial. - Known values are: \"interventional\", \"observational\", \"expandedAccess\", and \"patientRegistries\".""" + """Possible study types of a clinical trial. Known values are: \"interventional\", \"observational\", + \"expandedAccess\", and \"patientRegistries\". """ recruitment_status: Optional[Union[str, "_models.ClinicalTrialRecruitmentStatus"]] = rest_field( name="recruitmentStatus" ) - """Possible recruitment status of a clinical trial. - Known values are: \"unknownStatus\", \"notYetRecruiting\", \"recruiting\", and \"enrollingByInvitation\".""" + """Possible recruitment status of a clinical trial. Known values are: \"unknownStatus\", \"notYetRecruiting\", + \"recruiting\", and \"enrollingByInvitation\". """ conditions: List[str] = rest_field() - """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings.Required. """ + """Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. Required. """ sponsors: Optional[List[str]] = rest_field() """Sponsors/collaborators involved with the trial. """ contacts: Optional[List["_models.ContactDetails"]] = rest_field() @@ -476,51 +475,40 @@ class ClinicalTrialRegistryFilter(_model_base.Model): # pylint: disable=too-man """ conditions: Optional[List[str]] = rest_field() - """Trials with any of the given medical conditions will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the medical conditions. """ + """Trials with any of the given medical conditions will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the medical conditions. """ study_types: Optional[List[Union[str, "_models.ClinicalTrialStudyType"]]] = rest_field(name="studyTypes") - """Trials with any of the given study types will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the study types. """ + """Trials with any of the given study types will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the study types. """ recruitment_statuses: Optional[List[Union[str, "_models.ClinicalTrialRecruitmentStatus"]]] = rest_field( name="recruitmentStatuses" ) - """Trials with any of the given recruitment statuses will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the recruitment statuses. """ + """Trials with any of the given recruitment statuses will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the recruitment statuses. """ sponsors: Optional[List[str]] = rest_field() - """Trials with any of the given sponsors will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the sponsors. """ + """Trials with any of the given sponsors will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the sponsors. """ phases: Optional[List[Union[str, "_models.ClinicalTrialPhase"]]] = rest_field() - """Trials with any of the given phases will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the phases. """ + """Trials with any of the given phases will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the phases. """ purposes: Optional[List[Union[str, "_models.ClinicalTrialPurpose"]]] = rest_field() - """Trials with any of the given purposes will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the purposes. """ + """Trials with any of the given purposes will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the purposes. """ ids: Optional[List[str]] = rest_field() - """Trials with any of the given identifiers will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the trial identifiers. """ + """Trials with any of the given identifiers will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the trial identifiers. """ sources: Optional[List[Union[str, "_models.ClinicalTrialSource"]]] = rest_field() - """Trials with any of the given sources will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the sources. """ + """Trials with any of the given sources will be included in the selection (provided that other limitations are + satisfied). Leaving this list empty will not limit the sources. """ facility_names: Optional[List[str]] = rest_field(name="facilityNames") - """Trials with any of the given facility names will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the trial facility names. """ + """Trials with any of the given facility names will be included in the selection (provided that other limitations + are satisfied). Leaving this list empty will not limit the trial facility names. """ facility_locations: Optional[List["_models.GeographicLocation"]] = rest_field(name="facilityLocations") - """Trials with any of the given facility locations will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the trial facility locations. """ + """Trials with any of the given facility locations will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the trial facility locations. """ facility_areas: Optional[List["_models.GeographicArea"]] = rest_field(name="facilityAreas") - """Trials with any of the given facility area boundaries will be included in the selection -(provided that other limitations are satisfied). -Leaving this list empty will not limit the trial facility area boundaries. """ + """Trials with any of the given facility area boundaries will be included in the selection (provided that other + limitations are satisfied). Leaving this list empty will not limit the trial facility area boundaries. """ @overload def __init__( @@ -694,10 +682,9 @@ class DocumentContent(_model_base.Model): """ source_type: Union[str, "_models.DocumentContentSourceType"] = rest_field(name="sourceType") - """The type of the content's source. -In case the source type is 'inline', the content is given as a string (for instance, text). -In case the source type is 'reference', the content is given as a URI. -Required. Known values are: \"inline\" and \"reference\".""" + """The type of the content's source. In case the source type is 'inline', the content is given as a string (for + instance, text). In case the source type is 'reference', the content is given as a URI. Required. Known values + are: \"inline\" and \"reference\". """ value: str = rest_field() """The content of the document, given either inline (as a string) or as a reference (URI). Required. """ @@ -806,8 +793,8 @@ class ExtendedClinicalCodedElement(_model_base.Model): value: Optional[str] = rest_field() """A value associated with the code within the given clinical coding system. """ semantic_type: Optional[str] = rest_field(name="semanticType") - """The `UMLS semantic type `_ - associated with the coded concept. """ + """The `UMLS semantic type `_ associated + with the coded concept. """ category: Optional[str] = rest_field() """The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. """ @@ -837,7 +824,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class GeographicArea(_model_base.Model): """A geographic area, expressed as a ``Circle`` geometry represented using a ``GeoJSON Feature`` - (see `GeoJSON spec `_\ ). + (see `GeoJSON spec `_ ). All required parameters must be populated in order to send to Azure. @@ -849,7 +836,7 @@ class GeographicArea(_model_base.Model): :vartype properties: ~azure.healthinsights.clinicalmatching.models.AreaProperties """ - type: Union[str, "_models.GeoJsonType"] = rest_field() + type: Union[str, "_models.GeoJsonType"] = rest_field() # pylint: disable=redefined-builtin """``GeoJSON`` type. Required. \"Feature\"""" geometry: "_models.AreaGeometry" = rest_field() """``GeoJSON`` geometry, representing the area circle's center. Required. """ @@ -860,7 +847,7 @@ class GeographicArea(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.GeoJsonType"], + type: Union[str, "_models.GeoJsonType"], # pylint: disable=redefined-builtin geometry: "_models.AreaGeometry", properties: "_models.AreaProperties", ): @@ -986,13 +973,12 @@ class PatientDocument(_model_base.Model): :vartype content: ~azure.healthinsights.clinicalmatching.models.DocumentContent """ - type: Union[str, "_models.DocumentType"] = rest_field() + type: Union[str, "_models.DocumentType"] = rest_field() # pylint: disable=redefined-builtin """The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). - Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\".""" + Required. Known values are: \"note\", \"fhirBundle\", \"dicom\", and \"genomicSequencing\". """ clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = rest_field(name="clinicalType") - """The type of the clinical document. - Known values are: \"consultation\", \"dischargeSummary\", \"historyAndPhysical\", \"procedure\", \"progress\", - \"imaging\", \"laboratory\", and \"pathology\".""" + """The type of the clinical document. Known values are: \"consultation\", \"dischargeSummary\", + \"historyAndPhysical\", \"procedure\", \"progress\", \"imaging\", \"laboratory\", and \"pathology\". """ id: str = rest_field() """A given identifier for the document. Has to be unique across all documents for a single patient. Required. """ language: Optional[str] = rest_field() @@ -1006,7 +992,7 @@ class PatientDocument(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.DocumentType"], + type: Union[str, "_models.DocumentType"], # pylint: disable=redefined-builtin id: str, # pylint: disable=redefined-builtin content: "_models.DocumentContent", clinical_type: Optional[Union[str, "_models.ClinicalDocumentType"]] = None, @@ -1172,7 +1158,7 @@ class TrialMatcherInference(_model_base.Model): :vartype metadata: ~azure.healthinsights.clinicalmatching.models.ClinicalTrialMetadata """ - type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() + type: Union[str, "_models.TrialMatcherInferenceType"] = rest_field() # pylint: disable=redefined-builtin """The type of the Trial Matcher inference. Required. \"trialEligibility\"""" value: str = rest_field() """The value of the inference, as relevant for the given inference type. Required. """ @@ -1193,7 +1179,7 @@ class TrialMatcherInference(_model_base.Model): def __init__( self, *, - type: Union[str, "_models.TrialMatcherInferenceType"], + type: Union[str, "_models.TrialMatcherInferenceType"], # pylint: disable=redefined-builtin value: str, description: Optional[str] = None, confidence_score: Optional[float] = None, @@ -1335,8 +1321,8 @@ class TrialMatcherPatientResult(_model_base.Model): inferences: List["_models.TrialMatcherInference"] = rest_field() """The model's inferences for the given patient. Required. """ needed_clinical_info: Optional[List["_models.ExtendedClinicalCodedElement"]] = rest_field(name="neededClinicalInfo") - """Clinical information which is needed to provide better trial matching results for the patient. - Clinical information which is needed to provide better trial matching results for the patient.""" + """Clinical information which is needed to provide better trial matching results for the patient. Clinical + information which is needed to provide better trial matching results for the patient. """ @overload def __init__( @@ -1394,8 +1380,8 @@ class TrialMatcherResult(_model_base.Model): last_update_date_time: datetime.datetime = rest_field(name="lastUpdateDateTime", readonly=True) """The date and time when the processing job was last updated. Required. """ status: Union[str, "_models.JobStatus"] = rest_field(readonly=True) - """The status of the processing job. - Required. Known values are: \"notStarted\", \"running\", \"succeeded\", \"failed\", and \"partiallyCompleted\".""" + """The status of the processing job. Required. Known values are: \"notStarted\", \"running\", \"succeeded\", + \"failed\", and \"partiallyCompleted\". """ errors: Optional[List["_models.Error"]] = rest_field(readonly=True) """An array of errors, if any errors occurred during the processing job. """ results: Optional["_models.TrialMatcherResults"] = rest_field(readonly=True) From 42ca1fa8d5a6020a68d3c6ed70c83ee610425be4 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Mon, 27 Mar 2023 20:41:39 +0300 Subject: [PATCH 10/17] update readme and samples --- .../CHANGELOG.md | 4 +- .../README.md | 177 +++++++++++++----- .../samples/sample_infer_cancer_profiling.py | 2 +- .../CHANGELOG.md | 4 +- .../README.md | 124 +++++++----- .../samples/sample_match_trials_fhir.py | 2 +- 6 files changed, 211 insertions(+), 102 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md index 628743d283a9..fe2e7e3cef46 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 1.0.0b1 (1970-01-01) +## 1.0.0-beta.1 (Unreleased) -- Initial version +- Initial preview of the Azure Health Insights CancerProfiling client library. diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index 5609eef2e818..96881deda58c 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -1,9 +1,10 @@ # Azure Cognitive Services Health Insights Cancer Profiling client library for Python -Remove comment - + +[Health Insights](https://review.learn.microsoft.com/azure/azure-health-insights/?branch=release-azure-health-insights) is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources. + +The [Cancer Profiling model][cancer_profiling_docs] receives clinical records of oncology patients and outputs cancer staging, such as clinical stage TNM categories and pathologic stage TNM categories as well as tumor site, histology. + + ## Getting started @@ -31,9 +32,8 @@ This table shows the relationship between SDK versions and supported API version #### Get the endpoint -You can find the endpoint for your Health Insights service resource using the -***[Azure Portal](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights) -or [Azure CLI](https://learn.microsoft.com/cli/azure/): +You can find the endpoint for your Health Insights service resource using the [Azure Portal][azure_portal] or [Azure CLI][azure_cli] + ```bash # Get the endpoint for the Health Insights service resource @@ -51,8 +51,7 @@ az cognitiveservices account keys list --resource-group ### Cancer Profiling @@ -90,40 +89,121 @@ from azure.core.credentials import AzureKeyCredential from azure.healthinsights.cancerprofiling import CancerProfilingClient -KEY = os.environ["HEALTHINSIGHTS_KEY"] -ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] -TIME_SERIES_DATA_PATH = os.path.join("sample_data", "request-data.csv") -client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) - -poller = client.begin_infer_cancer_profile(data) -response = poller.result() - -if response.status == JobStatus.SUCCEEDED: - results = response.results - for patient_result in results.patients: - print(f"\n==== Inferences of Patient {patient_result.id} ====") - for inference in patient_result.inferences: - print( - f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ - ConfidenceScore: {inference.confidence_score} ===") - for evidence in inference.evidence: - data_evidence = evidence.patient_data_evidence - print( - f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ - {data_evidence.text}") -else: - errors = response.errors - if errors is not None: - for error in errors: - print(f"{error.code} : {error.message}") - +KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" +ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + +cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + +patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) +patient1 = PatientRecord(id="patient_id", info=patient_info) + +doc_content1 = "15.8.2021" \ + + "Jane Doe 091175-8967" \ + + "42 year old female, married with 3 children, works as a nurse. " \ + + "Healthy, no medications taken on a regular basis." \ + + "PMHx is significant for migraines with aura, uses Mirena for contraception." \ + + "Smoking history of 10 pack years (has stopped and relapsed several times)." \ + + "She is in c/o 2 weeks of productive cough and shortness of breath." \ + + "She has a fever of 37.8 and general weakness. " \ + + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. " \ + + "On PE:" \ + + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. " \ + + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing." \ + + " No crackles, rales, and wheezes. Resonant percussion. " \ + + "PLAN: " \ + + "Will be referred for a chest x-ray. " \ + + "======================================" \ + + "CXR showed mild nonspecific opacities in right lung base. " \ + + "PLAN:" \ + + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a " \ + + "follow-up CXR in 2 weeks. " + +patient_document1 = PatientDocument(type=DocumentType.NOTE, + id="doc1", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content1), + clinical_type=ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15)) + +doc_content2 = "Oncology Clinic " \ + + "20.10.2021" \ + + "Jane Doe 091175-8967" \ + + "42-year-old healthy female who works as a nurse in the ER of this hospital. " \ + + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children." \ + + "Didn’t breastfeed. " \ + + "Contraception- Mirena." \ + + "Smoking- 10 pack years. " \ + + "Mother- Belarusian. Father- Georgian. " \ + + "About 3 months prior to admission, she stated she had SOB and was febrile. " \ + + "She did a CXR as an outpatient which showed a finding in the base of the right lung- " \ + + "possibly an infiltrate." \ + + "She was treated with antibiotics with partial response. " \ + + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. " \ + + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right " \ + + "breast, lymph nodes on the right a few areas in the lungs and liver. " \ + + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic " \ + + "testing has not been done thus far. " \ + + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, " \ + + "and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). " \ + + "She is planned to undergo genetic tests because the aggressive course of the disease, " \ + + "and her young age. " \ + + "Impression:" \ + + "Stage 4 triple negative breast adenocarcinoma. " \ + + "Could benefit from biological therapy. " \ + + "Different treatment options were explained- the patient wants to get a second opinion." + +patient_document2 = PatientDocument(type=DocumentType.NOTE, + id="doc2", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content2), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20)) + +doc_content3 = "PATHOLOGY REPORT" \ + + " Clinical Information" \ + + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC" \ + + " Diagnosis" \ + + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:" \ + + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1" \ + + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; " \ + + " total score; 5/9)" \ + + " Fragments involved by invasive carcinoma: 2" \ + + " Largest measurement of invasive carcinoma on a single fragment: 7 mm" \ + + " Ductal carcinoma in situ (DCIS): Present" \ + + " Architectural pattern: Cribriform" \ + + " Nuclear grade: 2-" \ + + " -intermediate" \ + + " Necrosis: Not identified" \ + + " Fragments involved by DCIS: 1" \ + + " Largest measurement of DCIS on a single fragment: Span 2 mm" \ + + " Microcalcifications: Present in benign breast tissue and invasive carcinoma" \ + + " Blocks with invasive carcinoma: A1" \ + + " Special studies: Pending" + +patient_document3 = PatientDocument(type=DocumentType.NOTE, + id="doc3", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, + value=doc_content3), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1)) + +patient_doc_list = [patient_document1, patient_document2, patient_document3] +patient1.data = patient_doc_list + configuration = OncoPhenotypeModelConfiguration(include_evidence=True) +cancer_profiling_data = OncoPhenotypeData(patients=[patient1], configuration=configuration) + +poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) ``` ## Troubleshooting ### General -Health Insights Cancer Profiling client library will raise exceptions defined in [Azure Core](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions). +Health Insights Cancer Profiling client library will raise exceptions defined in [Azure Core][azure_core]. ### Logging @@ -142,14 +222,9 @@ Optional keyword arguments can be passed in at the client and per-operation leve The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. ## Next steps - + ### Additional documentation - +For more extensive documentation on Azure Health Insights Cancer Profiling, see the [Cancer Profiling documentation][cancer_profiling_docs] on docs.microsoft.com. ## Contributing @@ -168,5 +243,13 @@ see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. +[azure_core]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[azure_sub]: https://azure.microsoft.com/free/ \ No newline at end of file +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights +[azure_cli]: https://learn.microsoft.com/cli/azure/ +[cancer_profiling_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/overview?branch=main + + diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index fde5d1c9a79e..4d0ed3486b86 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -38,7 +38,7 @@ async def infer_cancer_profiling(self): # Create an Onco Phenotype client # cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + credential=AzureKeyCredential(KEY)) # # Construct patient diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md index 628743d283a9..df484bfa266b 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 1.0.0b1 (1970-01-01) +## 1.0.0b1 (Unreleased) -- Initial version +- Initial preview of the Azure Health Insights ClinicalMatching client library. diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md index f362839e9fa9..b41f090b58e7 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md @@ -1,9 +1,8 @@ # Azure Cognitive Services Health Insights Clinical Matching client library for Python -Remove comment - + +[Health Insights](https://review.learn.microsoft.com/azure/azure-health-insights/?branch=release-azure-health-insights) is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources. +The [Clinical Matching model][clinical_matching_docs] receives patients data and clinical trials protocols, and provides relevant clinical trials based on eligibility criteria. + ## Getting started @@ -31,9 +30,8 @@ This table shows the relationship between SDK versions and supported API version #### Get the endpoint -You can find the endpoint for your Health Insights service resource using the -***[Azure Portal](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights) -or [Azure CLI](https://learn.microsoft.com/cli/azure/): +You can find the endpoint for your Health Insights service resource using the [Azure Portal][azure_portal] or [Azure CLI][azure_cli] + ```bash # Get the endpoint for the Health Insights service resource @@ -49,10 +47,9 @@ Alternatively, you can use **Azure CLI** snippet below to get the API key of you az cognitiveservices account keys list --resource-group --name ``` -#### Create a CancerProfilingClient with an API Key Credential +#### Create a ClinicalMatchingClient with an API Key Credential -Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter -to authenticate the client: +Once you have the value for the API key, you can pass it as a string into an instance of **AzureKeyCredential**. Use the key as the credential parameter to authenticate the client: ```python from azure.core.credentials import AzureKeyCredential @@ -81,7 +78,12 @@ Trial Matcher provides the user of the services two main modes of operation: pat ## Examples -- [Match Trials - Find potential eligible trials for a patient](#match-trials) + ### Match trials @@ -91,35 +93,59 @@ Finding potential eligible trials for a patient. from azure.core.credentials import AzureKeyCredential from azure.healthinsights.clinicalmatching import ClinicalMatchingClient -KEY = os.environ["HEALTHINSIGHTS_KEY"] -ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] -TIME_SERIES_DATA_PATH = os.path.join("sample_data", "request-data.csv") -client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) - -poller = client.begin_match_trials(data) -response = poller.result() - -if response.status == JobStatus.SUCCEEDED: - results = response.results - for patient_result in results.patients: - print(f"Inferences of Patient {patient_result.id}") - for tm_inferences in patient_result.inferences: - print(f"Trial Id {tm_inferences.id}") - print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") - print(f"Description {tm_inferences.description}") -else: - errors = response.errors - if errors is not None: - for error in errors: - print(f"{error.code} : {error.message}") - +KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" +ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + +trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + +clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false"), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2")] + +patient1 = self.get_patient_from_fhir_patient() +# Create registry filter +registry_filters = ClinicalTrialRegistryFilter() +# Limit the trial to a specific patient condition ("Non-small cell lung cancer") +registry_filters.conditions = ["Non-small cell lung cancer"] +# Limit the clinical trial to a certain phase, phase 1 +registry_filters.phases = [ClinicalTrialPhase.PHASE1] +# Specify the clinical trial registry source as ClinicalTrials.Gov +registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] +# Limit the clinical trial to a certain location, in this case California, USA +registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] +# Limit the trial to a specific study type, interventional +registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] + +clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) +configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) +trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + +poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) ``` ## Troubleshooting ### General -Health Insights Clinical Matching client library will raise exceptions defined in [Azure Core](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions). +Health Insights Clinical Matching client library will raise exceptions defined in [Azure Core][azure_core]. ### Logging @@ -138,21 +164,10 @@ Optional keyword arguments can be passed in at the client and per-operation leve The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. ## Next steps - -### Additional documentation - ## Contributing @@ -171,5 +186,16 @@ see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. +[azure_core]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[azure_sub]: https://azure.microsoft.com/free/ \ No newline at end of file +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights +[azure_cli]: https://learn.microsoft.com/cli/azure/ +[clinical_matching_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/trial-matcher/overview?branch=main + + diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index a6d24e030954..94efbd3baccd 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -41,7 +41,7 @@ async def match_trials(self): # Create an Trial Matcher client # trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + credential=AzureKeyCredential(KEY)) # # Create clinical info list From d2acb9355efac1df1d4d2dabcbec3333c0925e05 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 28 Mar 2023 11:12:00 +0800 Subject: [PATCH 11/17] Update CHANGELOG.md --- .../azure-healthinsights-cancerprofiling/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md index fe2e7e3cef46..6b4401dc22bb 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0b1 (2023-03-28) - Initial preview of the Azure Health Insights CancerProfiling client library. From 72869730bdfbe953adc6842740b20a549f75dd06 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Tue, 28 Mar 2023 09:30:40 +0300 Subject: [PATCH 12/17] alignment (readme) --- .../azure-healthinsights-cancerprofiling/README.md | 2 +- .../azure-healthinsights-clinicalmatching/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index 96881deda58c..acb04ba10b71 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -223,7 +223,7 @@ The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows. ## Next steps -### Additional documentation +## Additional documentation For more extensive documentation on Azure Health Insights Cancer Profiling, see the [Cancer Profiling documentation][cancer_profiling_docs] on docs.microsoft.com. ## Contributing diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md index b41f090b58e7..71e5530fb322 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md @@ -164,7 +164,7 @@ Optional keyword arguments can be passed in at the client and per-operation leve The azure-core [reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html) describes available configurations for retries, logging, transport protocols, and more. ## Next steps -### Additional documentation +## Additional documentation For more extensive documentation on Azure Health Insights Clinical Matching, see the [Clinical Matching documentation][clinical_matching_docs] on docs.microsoft.com. From f50ef12c285e4e67471ae07cc2718e39a20fc3ce Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 28 Mar 2023 16:31:44 +0800 Subject: [PATCH 13/17] Update CHANGELOG.md --- .../azure-healthinsights-clinicalmatching/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md index df484bfa266b..7e75399d0db0 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/CHANGELOG.md @@ -1,5 +1,5 @@ # Release History -## 1.0.0b1 (Unreleased) +## 1.0.0b1 (2023-03-28) - Initial preview of the Azure Health Insights ClinicalMatching client library. From dc68642872887cf3cfa67499c3b2207ff75f004b Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Tue, 28 Mar 2023 16:30:10 +0300 Subject: [PATCH 14/17] update readme and samples --- .../README.md | 140 +++++++++--------- .../samples/README.md | 5 +- .../samples/sample_infer_cancer_profiling.py | 135 ++++++++--------- .../samples/README.md | 5 +- 4 files changed, 146 insertions(+), 139 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index acb04ba10b71..ae1d84977a5f 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -78,7 +78,8 @@ The Cancer Profiling model allows you to infer cancer attributes such as tumor s ## Examples - +The following section (#cancer-profiling) provides code snippets that demonstrate usage of the CancerProfilingClient + ### Cancer Profiling @@ -86,6 +87,7 @@ Infer key cancer attributes such as tumor site, histology, clinical stage TNM ca ```python from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling.models import * from azure.healthinsights.cancerprofiling import CancerProfilingClient @@ -98,26 +100,27 @@ cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) patient1 = PatientRecord(id="patient_id", info=patient_info) -doc_content1 = "15.8.2021" \ - + "Jane Doe 091175-8967" \ - + "42 year old female, married with 3 children, works as a nurse. " \ - + "Healthy, no medications taken on a regular basis." \ - + "PMHx is significant for migraines with aura, uses Mirena for contraception." \ - + "Smoking history of 10 pack years (has stopped and relapsed several times)." \ - + "She is in c/o 2 weeks of productive cough and shortness of breath." \ - + "She has a fever of 37.8 and general weakness. " \ - + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. " \ - + "On PE:" \ - + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. " \ - + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing." \ - + " No crackles, rales, and wheezes. Resonant percussion. " \ - + "PLAN: " \ - + "Will be referred for a chest x-ray. " \ - + "======================================" \ - + "CXR showed mild nonspecific opacities in right lung base. " \ - + "PLAN:" \ - + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a " \ - + "follow-up CXR in 2 weeks. " +doc_content1 = """ + 15.8.2021 + Jane Doe 091175-8967 + 42 year old female, married with 3 children, works as a nurse + Healthy, no medications taken on a regular basis. + PMHx is significant for migraines with aura, uses Mirena for contraception. + Smoking history of 10 pack years (has stopped and relapsed several times). + She is in c/o 2 weeks of productive cough and shortness of breath. + She has a fever of 37.8 and general weakness. + Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. + On PE: + GENERAL: mild pallor, no cyanosis. Regular breathing rate. + LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing. + No crackles, rales, and wheezes. Resonant percussion. + PLAN: + Will be referred for a chest x-ray. + ====================================== + CXR showed mild nonspecific opacities in right lung base. + PLAN: + Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a + follow-up CXR in 2 weeks.""" patient_document1 = PatientDocument(type=DocumentType.NOTE, id="doc1", @@ -127,32 +130,33 @@ patient_document1 = PatientDocument(type=DocumentType.NOTE, language="en", created_date_time=datetime.datetime(2021, 8, 15)) -doc_content2 = "Oncology Clinic " \ - + "20.10.2021" \ - + "Jane Doe 091175-8967" \ - + "42-year-old healthy female who works as a nurse in the ER of this hospital. " \ - + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children." \ - + "Didn’t breastfeed. " \ - + "Contraception- Mirena." \ - + "Smoking- 10 pack years. " \ - + "Mother- Belarusian. Father- Georgian. " \ - + "About 3 months prior to admission, she stated she had SOB and was febrile. " \ - + "She did a CXR as an outpatient which showed a finding in the base of the right lung- " \ - + "possibly an infiltrate." \ - + "She was treated with antibiotics with partial response. " \ - + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. " \ - + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right " \ - + "breast, lymph nodes on the right a few areas in the lungs and liver. " \ - + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic " \ - + "testing has not been done thus far. " \ - + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, " \ - + "and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). " \ - + "She is planned to undergo genetic tests because the aggressive course of the disease, " \ - + "and her young age. " \ - + "Impression:" \ - + "Stage 4 triple negative breast adenocarcinoma. " \ - + "Could benefit from biological therapy. " \ - + "Different treatment options were explained- the patient wants to get a second opinion." +doc_content2 = """ + Oncology Clinic + 20.10.2021 + Jane Doe 091175-8967 + 42-year-old healthy female who works as a nurse in the ER of this hospital. + First menstruation at 11 years old. First delivery- 27 years old. She has 3 children. + Didn’t breastfeed. + Contraception- Mirena. + Smoking- 10 pack years. + Mother- Belarusian. Father- Georgian. + About 3 months prior to admission, she stated she had SOB and was febrile. + She did a CXR as an outpatient which showed a finding in the base of the right lung- + possibly an infiltrate. + She was treated with antibiotics with partial response. + 6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. + Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right + breast, lymph nodes on the right a few areas in the lungs and liver. + On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic + testing has not been done thus far. + Genetic counseling- the patient denies a family history of breast, ovary, uterus, + and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). + She is planned to undergo genetic tests because the aggressive course of the disease, + and her young age. + Impression: + Stage 4 triple negative breast adenocarcinoma. + Could benefit from biological therapy. + Different treatment options were explained- the patient wants to get a second opinion.""" patient_document2 = PatientDocument(type=DocumentType.NOTE, id="doc2", @@ -162,26 +166,27 @@ patient_document2 = PatientDocument(type=DocumentType.NOTE, language="en", created_date_time=datetime.datetime(2021, 10, 20)) -doc_content3 = "PATHOLOGY REPORT" \ - + " Clinical Information" \ - + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC" \ - + " Diagnosis" \ - + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:" \ - + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1" \ - + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; " \ - + " total score; 5/9)" \ - + " Fragments involved by invasive carcinoma: 2" \ - + " Largest measurement of invasive carcinoma on a single fragment: 7 mm" \ - + " Ductal carcinoma in situ (DCIS): Present" \ - + " Architectural pattern: Cribriform" \ - + " Nuclear grade: 2-" \ - + " -intermediate" \ - + " Necrosis: Not identified" \ - + " Fragments involved by DCIS: 1" \ - + " Largest measurement of DCIS on a single fragment: Span 2 mm" \ - + " Microcalcifications: Present in benign breast tissue and invasive carcinoma" \ - + " Blocks with invasive carcinoma: A1" \ - + " Special studies: Pending" +doc_content3 = """ + PATHOLOGY REPORT + Clinical Information + Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC + Diagnosis + A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES: + - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1 + Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; + total score; 5/9) + Fragments involved by invasive carcinoma: 2 + Largest measurement of invasive carcinoma on a single fragment: 7 mm + Ductal carcinoma in situ (DCIS): Present + Architectural pattern: Cribriform + Nuclear grade: 2- + -intermediate + Necrosis: Not identified + Fragments involved by DCIS: 1 + Largest measurement of DCIS on a single fragment: Span 2 mm + Microcalcifications: Present in benign breast tissue and invasive carcinoma + Blocks with invasive carcinoma: A1 + Special studies: Pending""" patient_document3 = PatientDocument(type=DocumentType.NOTE, id="doc3", @@ -251,5 +256,6 @@ additional questions or comments. [cancer_profiling_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/overview?branch=main diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md index bb198fc1f209..fd2d2db8c538 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md @@ -20,10 +20,9 @@ These sample programs show common scenarios for the Health Insights Cancer Profi |[sample_infer_cancer_profiling.py][sample_infer_cancer_profiling] |Infer cancer profiling.| ## Prerequisites -* Python 2.7 or 3.5 or higher is required to use this package. +* Python 3.7 or later is required to use this package. * The Pandas data analysis library. -* You must have an [Azure subscription][azure_subscription] and an -[Azure Health Insights account][azure_healthinsights_account] to run these samples. +* You must have an [Azure subscription][azure_subscription] and an [Azure Health Insights account][azure_healthinsights_account] to run these samples. ## Setup diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index 4d0ed3486b86..4c266f8a7779 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -49,26 +49,27 @@ async def infer_cancer_profiling(self): # Add document list # - doc_content1 = "15.8.2021" \ - + "Jane Doe 091175-8967" \ - + "42 year old female, married with 3 children, works as a nurse. " \ - + "Healthy, no medications taken on a regular basis." \ - + "PMHx is significant for migraines with aura, uses Mirena for contraception." \ - + "Smoking history of 10 pack years (has stopped and relapsed several times)." \ - + "She is in c/o 2 weeks of productive cough and shortness of breath." \ - + "She has a fever of 37.8 and general weakness. " \ - + "Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. " \ - + "On PE:" \ - + "GENERAL: mild pallor, no cyanosis. Regular breathing rate. " \ - + "LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing." \ - + " No crackles, rales, and wheezes. Resonant percussion. " \ - + "PLAN: " \ - + "Will be referred for a chest x-ray. " \ - + "======================================" \ - + "CXR showed mild nonspecific opacities in right lung base. " \ - + "PLAN:" \ - + "Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a " \ - + "follow-up CXR in 2 weeks. " + doc_content1 = """ + 15.8.2021 + Jane Doe 091175-8967 + 42 year old female, married with 3 children, works as a nurse + Healthy, no medications taken on a regular basis. + PMHx is significant for migraines with aura, uses Mirena for contraception. + Smoking history of 10 pack years (has stopped and relapsed several times). + She is in c/o 2 weeks of productive cough and shortness of breath. + She has a fever of 37.8 and general weakness. + Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. + On PE: + GENERAL: mild pallor, no cyanosis. Regular breathing rate. + LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing. + No crackles, rales, and wheezes. Resonant percussion. + PLAN: + Will be referred for a chest x-ray. + ====================================== + CXR showed mild nonspecific opacities in right lung base. + PLAN: + Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a + follow-up CXR in 2 weeks.""" patient_document1 = PatientDocument(type=DocumentType.NOTE, id="doc1", @@ -78,32 +79,33 @@ async def infer_cancer_profiling(self): language="en", created_date_time=datetime.datetime(2021, 8, 15)) - doc_content2 = "Oncology Clinic " \ - + "20.10.2021" \ - + "Jane Doe 091175-8967" \ - + "42-year-old healthy female who works as a nurse in the ER of this hospital. " \ - + "First menstruation at 11 years old. First delivery- 27 years old. She has 3 children." \ - + "Didn’t breastfeed. " \ - + "Contraception- Mirena." \ - + "Smoking- 10 pack years. " \ - + "Mother- Belarusian. Father- Georgian. " \ - + "About 3 months prior to admission, she stated she had SOB and was febrile. " \ - + "She did a CXR as an outpatient which showed a finding in the base of the right lung- " \ - + "possibly an infiltrate." \ - + "She was treated with antibiotics with partial response. " \ - + "6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. " \ - + "Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right " \ - + "breast, lymph nodes on the right a few areas in the lungs and liver. " \ - + "On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic " \ - + "testing has not been done thus far. " \ - + "Genetic counseling- the patient denies a family history of breast, ovary, uterus, " \ - + "and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). " \ - + "She is planned to undergo genetic tests because the aggressive course of the disease, " \ - + "and her young age. " \ - + "Impression:" \ - + "Stage 4 triple negative breast adenocarcinoma. " \ - + "Could benefit from biological therapy. " \ - + "Different treatment options were explained- the patient wants to get a second opinion." + doc_content2 = """ + Oncology Clinic + 20.10.2021 + Jane Doe 091175-8967 + 42-year-old healthy female who works as a nurse in the ER of this hospital. + First menstruation at 11 years old. First delivery- 27 years old. She has 3 children. + Didn't breastfeed. + Contraception- Mirena. + Smoking- 10 pack years. + Mother- Belarusian. Father- Georgian. + About 3 months prior to admission, she stated she had SOB and was febrile. + She did a CXR as an outpatient which showed a finding in the base of the right lung- + possibly an infiltrate. + She was treated with antibiotics with partial response. + 6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. + Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right + breast, lymph nodes on the right a few areas in the lungs and liver. + On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic + testing has not been done thus far. + Genetic counseling- the patient denies a family history of breast, ovary, uterus, + and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). + She is planned to undergo genetic tests because the aggressive course of the disease, + and her young age. + Impression: + Stage 4 triple negative breast adenocarcinoma. + Could benefit from biological therapy. + Different treatment options were explained- the patient wants to get a second opinion.""" patient_document2 = PatientDocument(type=DocumentType.NOTE, id="doc2", @@ -113,26 +115,27 @@ async def infer_cancer_profiling(self): language="en", created_date_time=datetime.datetime(2021, 10, 20)) - doc_content3 = "PATHOLOGY REPORT" \ - + " Clinical Information" \ - + "Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC" \ - + " Diagnosis" \ - + " A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES:" \ - + " - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1" \ - + " Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; " \ - + " total score; 5/9)" \ - + " Fragments involved by invasive carcinoma: 2" \ - + " Largest measurement of invasive carcinoma on a single fragment: 7 mm" \ - + " Ductal carcinoma in situ (DCIS): Present" \ - + " Architectural pattern: Cribriform" \ - + " Nuclear grade: 2-" \ - + " -intermediate" \ - + " Necrosis: Not identified" \ - + " Fragments involved by DCIS: 1" \ - + " Largest measurement of DCIS on a single fragment: Span 2 mm" \ - + " Microcalcifications: Present in benign breast tissue and invasive carcinoma" \ - + " Blocks with invasive carcinoma: A1" \ - + " Special studies: Pending" + doc_content3 = """ + PATHOLOGY REPORT + Clinical Information + Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC + Diagnosis + A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES: + - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1 + Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; + total score; 5/9) + Fragments involved by invasive carcinoma: 2 + Largest measurement of invasive carcinoma on a single fragment: 7 mm + Ductal carcinoma in situ (DCIS): Present + Architectural pattern: Cribriform + Nuclear grade: 2- + -intermediate + Necrosis: Not identified + Fragments involved by DCIS: 1 + Largest measurement of DCIS on a single fragment: Span 2 mm + Microcalcifications: Present in benign breast tissue and invasive carcinoma + Blocks with invasive carcinoma: A1 + Special studies: Pending""" patient_document3 = PatientDocument(type=DocumentType.NOTE, id="doc3", diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md index 076db7848984..603a2e8000e5 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md @@ -25,10 +25,9 @@ These sample programs show common scenarios for the Health Insights Clinical Mat --> ## Prerequisites -* Python 2.7 or 3.5 or higher is required to use this package. +* Python 3.7 or later is required to use this package. * The Pandas data analysis library. -* You must have an [Azure subscription][azure_subscription] and an -[Azure Health Insights account][azure_healthinsights_account] to run these samples. +* You must have an [Azure subscription][azure_subscription] and an [Azure Health Insights account][azure_healthinsights_account] to run these samples. ## Setup From b11791974803f9a5b6e2538085bab37be2cb099b Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 29 Mar 2023 16:34:32 +0800 Subject: [PATCH 15/17] format code --- .../README.md | 50 ++-- .../samples/sample_infer_cancer_profiling.py | 54 ++-- .../README.md | 51 ++-- .../samples/sample_match_trials_fhir.py | 75 +++-- ..._match_trials_structured_coded_elements.py | 116 ++++--- ...h_trials_structured_coded_elements_sync.py | 67 +++-- ...match_trials_unstructured_clinical_note.py | 282 +++++++++--------- 7 files changed, 386 insertions(+), 309 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index ae1d84977a5f..b6420522cc58 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -94,8 +94,7 @@ from azure.healthinsights.cancerprofiling import CancerProfilingClient KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" -cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) +cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) patient1 = PatientRecord(id="patient_id", info=patient_info) @@ -122,13 +121,14 @@ doc_content1 = """ Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" -patient_document1 = PatientDocument(type=DocumentType.NOTE, - id="doc1", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) +patient_document1 = PatientDocument( + type=DocumentType.NOTE, + id="doc1", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content1), + clinical_type=ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15), +) doc_content2 = """ Oncology Clinic @@ -158,13 +158,14 @@ doc_content2 = """ Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" -patient_document2 = PatientDocument(type=DocumentType.NOTE, - id="doc2", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) +patient_document2 = PatientDocument( + type=DocumentType.NOTE, + id="doc2", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content2), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20), +) doc_content3 = """ PATHOLOGY REPORT @@ -188,17 +189,18 @@ doc_content3 = """ Blocks with invasive carcinoma: A1 Special studies: Pending""" -patient_document3 = PatientDocument(type=DocumentType.NOTE, - id="doc3", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) +patient_document3 = PatientDocument( + type=DocumentType.NOTE, + id="doc3", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content3), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1), +) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list - configuration = OncoPhenotypeModelConfiguration(include_evidence=True) +configuration = OncoPhenotypeModelConfiguration(include_evidence=True) cancer_profiling_data = OncoPhenotypeData(patients=[patient1], configuration=configuration) poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index 4c266f8a7779..fd66cfbea352 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -37,8 +37,7 @@ async def infer_cancer_profiling(self): # Create an Onco Phenotype client # - cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Construct patient @@ -71,13 +70,14 @@ async def infer_cancer_profiling(self): Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" - patient_document1 = PatientDocument(type=DocumentType.NOTE, - id="doc1", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) + patient_document1 = PatientDocument( + type=DocumentType.NOTE, + id="doc1", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content1), + clinical_type=ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15), + ) doc_content2 = """ Oncology Clinic @@ -107,13 +107,14 @@ async def infer_cancer_profiling(self): Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" - patient_document2 = PatientDocument(type=DocumentType.NOTE, - id="doc2", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) + patient_document2 = PatientDocument( + type=DocumentType.NOTE, + id="doc2", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content2), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20), + ) doc_content3 = """ PATHOLOGY REPORT @@ -137,13 +138,14 @@ async def infer_cancer_profiling(self): Blocks with invasive carcinoma: A1 Special studies: Pending""" - patient_document3 = PatientDocument(type=DocumentType.NOTE, - id="doc3", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) + patient_document3 = PatientDocument( + type=DocumentType.NOTE, + id="doc3", + content=DocumentContent(source_type=DocumentContentSourceType.INLINE, value=doc_content3), + clinical_type=ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1), + ) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list @@ -173,12 +175,14 @@ def print_inferences(self, cancer_profiling_result): for inference in patient_result.inferences: print( f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ - ConfidenceScore: {inference.confidence_score} ===") + ConfidenceScore: {inference.confidence_score} ===" + ) for evidence in inference.evidence: data_evidence = evidence.patient_data_evidence print( f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ - {data_evidence.text}") + {data_evidence.text}" + ) else: errors = cancer_profiling_result.errors if errors is not None: diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md index 71e5530fb322..c3a9ec664ac6 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md @@ -96,29 +96,29 @@ from azure.healthinsights.clinicalmatching import ClinicalMatchingClient KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" -trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) - -clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2")] +trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) + +clinical_info_list = [ + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0006826", name="Malignant Neoplasms", value="true" + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", code="C0019693", name="HIV Infections", value="false" + ), + ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", code="C1300072", name="Tumor stage", value="2"), +] patient1 = self.get_patient_from_fhir_patient() # Create registry filter @@ -130,7 +130,9 @@ registry_filters.phases = [ClinicalTrialPhase.PHASE1] # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA -registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] +registry_filters.facility_locations = [ + GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") +] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] @@ -139,6 +141,7 @@ configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + ``` ## Troubleshooting diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index 94efbd3baccd..15b5eb50f5d5 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -40,32 +40,43 @@ async def match_trials(self): # Create an Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2")] + clinical_info_list = [ + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2", + ), + ] # @@ -83,7 +94,9 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [ + GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] @@ -121,15 +134,19 @@ def print_results(self, trial_matcher_result): def get_patient_from_fhir_patient(self) -> PatientRecord: patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) - patient_data = PatientDocument(type=DocumentType.FHIR_BUNDLE, - id="Consultation-14-Demo", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()), - clinical_type=ClinicalDocumentType.CONSULTATION) + patient_data = PatientDocument( + type=DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=DocumentContent( + source_type=DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content(), + ), + clinical_type=ClinicalDocumentType.CONSULTATION, + ) return PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) def get_patient_doc_content(self) -> str: - with open("match_trial_fhir_data.txt", 'r', encoding='utf-8-sig') as f: + with open("match_trial_fhir_data.txt", "r", encoding="utf-8-sig") as f: content = f.read() return content diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py index f84f05938f61..99522561606b 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -38,59 +38,83 @@ async def match_trials(self): # Create an Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="METASTATIC", - name="metastatic", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019163", - name="Hepatitis B", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0018802", - name="Congestive heart failure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019196", - name="Hepatitis C", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0220650", - name="Metastatic malignant neoplasm to brain", - value="true")] + clinical_info_list = [ + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="METASTATIC", + name="metastatic", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0019163", + name="Hepatitis B", + value="false", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0018802", + name="Congestive heart failure", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0019196", + name="Hepatitis C", + value="false", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0220650", + name="Metastatic malignant neoplasm to brain", + value="true", + ), + ] # # Construct Patient # - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) + patient_info = PatientInfo( + sex=PatientInfoSex.MALE, + birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list, + ) patient1 = PatientRecord(id="patient_id", info=patient_info) # @@ -103,7 +127,9 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [ + GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific study type, interventional registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py index c1ead0fd77c0..1c2696390480 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py @@ -39,39 +39,53 @@ def match_trials(self): # Create an Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0032181", - name="Platelet count", - value="250000"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0002965", - name="Unstable Angina", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Radiotherapy", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0242957", - name="GeneOrProtein-Expression", - value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="cancer stage", - value="2")] + clinical_info_list = [ + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0032181", + name="Platelet count", + value="250000", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0002965", + name="Unstable Angina", + value="true", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Radiotherapy", + value="false", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C0242957", + name="GeneOrProtein-Expression", + value="Negative;EntityType:GENEORPROTEIN-EXPRESSION", + ), + ClinicalCodedElement( + system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="cancer stage", + value="2", + ), + ] # # Construct Patient # - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) + patient_info = PatientInfo( + sex=PatientInfoSex.MALE, + birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list, + ) patient1 = PatientRecord(id="patient_id", info=patient_info) # @@ -82,7 +96,9 @@ def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [ + GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] @@ -122,4 +138,3 @@ def print_results(self, trial_matcher_result): if __name__ == "__main__": sample = HealthInsightsSamples() sample.match_trials() - diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py index 5fbcb835da11..e91668be6474 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py @@ -45,14 +45,20 @@ async def match_trials(self): # Create an Trial Matcher client # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # # - patient_data_list = [PatientDocument(type=DocumentType.NOTE, id="12-consult_15", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()))] + patient_data_list = [ + PatientDocument( + type=DocumentType.NOTE, + id="12-consult_15", + content=DocumentContent( + source_type=DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content(), + ), + ) + ] # @@ -69,7 +75,9 @@ async def match_trials(self): # Specify the clinical trial registry source as ClinicalTrials.Gov registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [ + GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona") + ] # Limit the trial to a specific recruitment status registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] @@ -106,136 +114,138 @@ def print_results(self, trial_matcher_result): print(f"{error.code} : {error.message}") def get_patient_doc_content(self) -> str: - content = "TITLE: Cardiology Consult\r\n DIVISION OF CARDIOLOGY\r\n " \ - " COMPREHENSIVE CONSULTATION NOTE\r\nCHIEF " \ - "COMPLAINT: Patient is seen in consultation today at the\r\nrequest of Dr. [**Last Name (STitle) " \ - "13959**]. We are asked to give consultative advice\r\nregarding evaluation and management of Acute " \ - "CHF.\r\nHISTORY OF PRESENT ILLNESS:\r\n71 year old man with CAD w/ diastolic dysfunction, CKD, " \ - "Renal\r\nCell CA s/p left nephrectomy, CLL, known lung masses and recent\r\nbrochial artery bleed, " \ - "s/p embolization of LLL bronchial artery\r\n[**1-17**], readmitted with hemoptysis on [" \ - "**2120-2-3**] from [**Hospital 328**] [**Hospital 9250**]\r\ntransferred from BMT floor following " \ - "second episode of hypoxic\r\nrespiratory failure, HTN and tachycardia in 3 days. Per report," \ - "\r\non the evening of transfer to the [**Hospital Unit Name 1**], patient continued to\r\nremain " \ - "tachypnic in upper 30s and was receiving IVF NS at\r\n100cc/hr for concern of hypovolemic " \ - "hypernatremia. He also had\r\nreceived 1unit PRBCs with temp rise for 98.3 to 100.4, " \ - "he was\r\ncultured at that time, and transfusion rxn work up was initiated.\r\nAt around 5:30am, " \ - "he was found to be newly hypertensive with SBP\r\n>200 with a regular tachycardia to 160 with new " \ - "hypoxia requiring\r\nshovel mask. He received 1mg IV ativan, 1mg morphine, lasix 40mg\r\nIV x1, " \ - "and lopressor 5mg IV. ABG 7.20/63/61 on shovel mask. He\r\nwas transferred to the ICU for further " \ - "care. On arrival to the\r\n[**Hospital Unit Name 1**], he received 5mg IV Dilt and was found to be " \ - "febrile to\r\n101.3. Blood and urine cultures were draw. He was placed on BIPAP\r\n12/5 with " \ - "improvement in his respiratory rate and sats. Repeat\r\nABG 7.43/34/130.\r\nOvernight, " \ - "he continued to be tachycardic, with stable O2 sats.\r\nHe was treated for agitation with haldol, " \ - "as well as IV beta\r\nblockers, with some improvement in his heart rate to the 80s at\r\nrest. He " \ - "has and continues to deny symptoms of chest pain. When\r\nassessed, he grunted responses to " \ - "questions, and was non-verbal.\r\nOn cardiac review of symptoms, no chest pain or other " \ - "discomfort.\r\nFurther questions limited by mental status.\r\nPAST MEDICAL HISTORY:\r\nCLL x 20 " \ - "yrs\r\n-s/p fludarabine and Cytoxan ([**7-14**]) with good response\r\n-auto-immune hemolytic " \ - "anemia on chronic steroids\r\n-mediastinal lymphadenopathy\r\n-h/o bilat pleural effusions with + " \ - "cytology ([**6-13**])\r\nRCC s/p Left nephrectomy [**2106**]\r\nCKD: prior baseline CR 1.5, " \ - "most recently 1.1-1.2\r\nBPH vs Prostate cancer\r\n- h/o multiple prostate biopsies with only 1 " \ - "c/w adenocarcinoma\r\n([**Doctor Last Name 2470**] 3+3)\r\nGERD\r\nType II DM: -recently started " \ - "insulin\r\nR-sided Exotropia\r\nGallstone pancreatitis [**12-10**]; s/p lap " \ - "chole\r\nHyperlipidemia\r\nCAD s/p cath [**4-13**] with diffuse 2 vessel dz\r\n- 70% RCA/PDA, " \ - "60%prox/mid LAD)\r\nHypogammaglobumenia, recurrent URI/PNA, on IVIG X 2years, good\r\nresponse (" \ - "last dose [**2118-11-11**])\r\nAllergic rhinitis\r\nGilberts disease\r\nHypotesteronemia\r\nR " \ - "humeral fracture ([**12-16**])\r\nEnlarged spleen secondary to CLL vs portal " \ - "hypertension.\r\nCardiac Risk Factors include diabetes, dyslipidemia,\r\nhypertension, and family " \ - "history of CAD.\r\nHOME MEDICATIONS:\r\nAlbuterol 90 mcg 2 puffs PRN\r\nAllopurinol 100mg PO " \ - "Daily\r\nFolic Acid 2mg PO Daily\r\nInsulin Lispro Protam & Lispro As Directed\r\nMetoprolol " \ - "Succinate 25mg PO BID\r\nNitroglycerin [NitroQuick] 0.3mg SL PRN\r\nPrednisone 2mg PO " \ - "daily\r\nRosuvastatin 5mg PO daily\r\nDocusate Sodium [Colace] 100mg PO BID\r\nSenna 8.6 PO BID " \ - "PRN\r\nCURRENT MEDICATIONS:\r\nAluminum-Magnesium Hydrox.-Simethicone 15-30 mL PO/NG " \ - "QID:PRN\r\ndyspepsia\r\nAllopurinol 100 mg PO/NG DAILY\r\nAlbuterol 0.083% Neb Soln 1 NEB IH " \ - "Q6H:PRN\r\nBisacodyl 10 mg PO/PR DAILY:PRN constipation\r\nCaphosol 30 mL ORAL QID:PRN dry " \ - "mouth\r\nDextrose 50% 12.5 gm IV PRN hypoglycemia\r\nDocusate Sodium 100 mg PO BID\r\nFamotidine " \ - "20 mg IV Q24H\r\nGlucagon 1 mg IM Q15MIN:PRN\r\nGuaifenesin-Dextromethorphan 10 mL PO/NG Q6H:PRN " \ - "cough\r\nInsulin SC SS\r\nIpratropium Bromide Neb 1 NEB IH Q6H:PRN\r\nMagnesium Sulfate " \ - "Replacement (Oncology) IV Sliding Scale\r\nMetoprolol Tartrate 5 mg IV " \ - "Q6H\r\nPiperacillin-Tazobactam 2.25 g IV Q6H\r\nPotassium Chloride Replacement (Oncology) IV " \ - "Sliding\r\nHydrocortisone Na Succ. 20 mg IV Q24H\r\nSenna 1 TAB PO/NG [**Hospital1 7**]:PRN " \ - "constipation\r\nVancomycin 1000 mg IV\r\nMetoprolol Tartrate 10 mg IV Q6H\r\nDiltiazem 5 mg IV " \ - "ONCE\r\nMetoprolol Tartrate 5 mg IV ONCE\r\nFurosemide 40 mg IV " \ - "ONCE\r\nALLERGIES:\r\nNKDA\r\nSOCIAL HISTORY:\r\nMarried, lives with wife [**Name (NI) **] in [" \ - "**Location (un) 12995**]. Has long history\r\nof CLL since [**2096**]. Is a rabbi working in " \ - "academics with 30 year\r\nhistory prior to that of congregation work in [**State 1698**]. " \ - "They\r\nhave two adult children in [**Location (un) 3063**] and LA and three\r\ngrandchildren. " \ - "Life-time nonsmoker, rare EtOH, no illicit drug\r\nuse.\r\nFAMILY HISTORY:\r\nFather w/ [**Name2 (" \ - "NI) 118**] cancer and coronary artery disease. Multiple\r\nrelatives with DM.\r\nREVIEW OF " \ - "SYSTEMS: ALL OTHER SYSTEMS NEGATIVE EXCEPT AS NOTED\r\nABOVE\r\nPHYSICAL EXAMINATION\r\nVitals: " \ - "T: 97.8 degrees Farenheit (max 101.3), BP: 128/73 mmHg\r\nsupine, HR 97 bpm, RR 35 bpm, " \ - "O2: 94 % on 0.4 aerosol mask.\r\nCONSTITUTIONAL: No acute distress.\r\nEYES: No conjunctival " \ - "pallor. No icterus.\r\nENT/Mouth: MMM. OP clear.\r\nTHYROID: No thyromegaly or thyroid " \ - "nodules.\r\nCV: Nondisplaced PMI. Tachycardic. Regular rhythm. nl S1, S2. No\r\nextra heart " \ - "sounds. No appreciable murmurs. No JVD. Normal\r\ncarotid upstroke without bruits.\r\nLUNGS: " \ - "Breath sounds bilaterally. No crackles, wheezes or rhonchi\r\nappreciated.\r\nGI: NABS. Soft, NT, " \ - "ND. No HSM. No abdominal bruits.\r\nMUSCULO: Supple neck. Normal muscle tone. Full strength " \ - "grossly.\r\nHEME/LYMPH: No palpable LAD. No peripheral edema. Full distal\r\npulses " \ - "bilaterally.\r\nSKIN: Warm extremities. No rashes/lesions, ecchymoses.\r\nNEURO: Limited responses " \ - "to questions. [**Name8 (MD) 54**] RN, the patient tends\r\nto wax and wane throughout the day; at " \ - "times answering questions\r\nand conversing, at other times being more confused. Other " \ - "exam\r\ngrossly normal without any significant focal deficits\r\nPSYCH: Mood and affect were " \ - "appropriate.\r\nTELEMETRY: Sinus tachycardia at 101. Runs of sinus tachycardia\r\nto 120s, " \ - "with brief episodes of atrial tach vs AF.\r\nECG ([**2120-2-15**]): Sinus tach @ 124. Normal " \ - "Axis/intervals.\r\nDiffuse nonspecific TW flattening with inferolateral T wave\r\ninversions, " \ - "not appreciably worse, and probably better than\r\nprior. No ECG tracing available more proximal " \ - "to this admission\r\nto ICU.\r\nTRANSTHORACIC ECHOCARDIOGRAM ([**2120-1-15**]):\r\nThe left atrium " \ - "is elongated. No atrial septal defect is seen by\r\n2D or color Doppler. Left ventricular wall " \ - "thicknesses and cavity\r\nsize are normal. There is probably mild regional left " \ - "ventricular\r\nsystolic dysfunction with distal lateral/apical lateral\r\nhypokinesis . There is " \ - "no ventricular septal defect. Right\r\nventricular chamber size and free wall motion are normal. " \ - "The\r\naortic root is mildly dilated at the sinus level. The aortic\r\nvalve leaflets (3) are " \ - "mildly thickened but aortic stenosis is\r\nnot present. No aortic regurgitation is seen. The " \ - "mitral valve\r\nleaflets are mildly thickened. There is no mitral valve prolapse.\r\nTrivial " \ - "mitral regurgitation is seen. The estimated pulmonary\r\nartery systolic pressure is normal. There " \ - "is no pericardial\r\neffusion. Compared with the prior study (images reviewed) of\r\n[" \ - "**2119-1-11**], mild regional LV systolic dysfunction is new.\r\nETT ([**2114-11-13**]):\r\nThe " \ - "patient\r\nexercised for 9.5 minutes of [**Initials (NamePattern4) **] [**Last Name (NamePattern4) " \ - "84**] protocol and was stopped at\r\nrequest for fatigue. This represents an average " \ - "functional\r\ncapacity.\r\nThere were no chest, neck, back, or arm discomforts reported " \ - "by\r\npatient throughout the procedure. There were no significant ST\r\nsegment\r\nchanges at peak " \ - "exercise or during recovery. The rhythm was sinus\r\nwith\r\nrare APBs and VPBs. The hemodynamic " \ - "response to exercise was\r\nappropriate.\r\nIMPRESSION: No anginal symptoms or ischemic EKG " \ - "changes at the\r\nachieved\r\nworkload. Nuclear report sent separately. Compared to ETT " \ - "report\r\n[**2113-11-29**], there are now no EKG changes noted and the " \ - "exercise\r\ntolerance\r\nhas increased by one minute.\r\nMIBI: 1) Again noted is mild, reversible " \ - "basilar inferior wall\r\nperfusion\r\ndefect in the face of soft tissue attenuation from the " \ - "diaphragm.\r\n2) Normal\r\nleft ventricular cavity size and function.\r\nCath: [**4-13**]:\r\n1. " \ - "Coronary angiography in this right-dominant system revealed:\r\n--the LMCA had no angiographically " \ - "apparent disease.\r\n--the LAD had diffuse proximal-mid 60% stenosis\r\n--the LCX had minimal " \ - "disease\r\n--the RCA was a small vessel with a distal 70% lesion going into\r\nthe RPDA\r\n2. " \ - "Limited resting hemodynamics revealed elevated left-sided\r\nfilling pressures, with LVEDP 18 " \ - "mmHg. There was high-normal\r\nsystemic arterial systolic pressures, with SBP 134 mmHg. " \ - "There\r\nwas no significant gradient upon pullback of the angled pigtail\r\ncatheter from LV to " \ - "ascending aorta.\r\nOTHER TESTING:\r\nCXR: Worsening fluid status versus prior. Followup needed to " \ - "see\r\nairspace processes track with CHF or are independent and in the\r\nlatter\r\nsituation " \ - "could represent pneumonia.\r\nLABORATORY DATA: Reviewed in OMR\r\nASSESSMENT AND PLAN:\r\n71 year " \ - "old man with complicated medical history including CAD w/\r\ndiastolic dysfunction, CKD, " \ - "Renal Cell CA s/p left nephrectomy,\r\nCLL, known lung masses and recent brochial artery bleed, " \ - "who has\r\nhad a complicated hospital course including s/p embolization of\r\nLLL bronchial artery " \ - "[**1-17**], readmitted with hemoptysis on [**2120-2-3**]\r\nfrom [**Hospital 328**] Rehab, " \ - "and is now transferred from BMT floor for a\r\nsecond episode of hypoxic respiratory failure, " \ - "HTN and\r\ntachycardia in 3 days. Although details with regard to the\r\ninitiating event last " \ - "night are limited by difficulty with\r\nobtaining a history, review of his relevant data indicates " \ - "that\r\nventilatory failure as indicated by his elevated PCO2 appears to\r\nhave played a " \ - "significant role. He clearly has a history of\r\nobstructive coronary artery disease, and likely " \ - "had some element\r\nof diastolic dysfunction in the setting of his " \ - "acute\r\ntachycardia/hypoxia/hypertensive episode yesterday, although\r\nthere is no obvious " \ - "indication that his CAD was a primary cause\r\nof these events based on the history (an ECG from " \ - "the peri-event\r\nwould be helpful, but non-specific). According to his RN, he has\r\nnot had " \ - "excess secretions today, although he has a new fever and\r\nWBC, which indicates that he could " \ - "have had some mucous plugging\r\nin the setting of a new PNA, which is currently being " \ - "treated\r\nwith antibiotics. Otherwise, would not diurese him any further\r\nas he looks quite " \ - "dry by exam and labs. Would try gentle\r\nhydration, and monitor his volume status closely. I'm " \ - "not sure\r\nthat a TTE will shed a whole lot more light on the current\r\nsituation, but it will " \ - "at least assess any myocardial damage he\r\nmight have sustained.\r\nRecs:\r\n--Continue beta " \ - "blocker as you are\r\n--Hold diuretics, start gentle IV hydration, close monitor " \ - "of\r\nhemodynamics\r\n--Obtain an ECG, monitor for any new changes\r\n--Consider pulmonary causes " \ - "(decreased alveolar ventilation) for hypoxia\r\nThe Assessment and Plan will be reviewed with Dr. " \ - "[**Last Name (STitle) 5550**] in\r\nmulti- disciplinary rounds. Please see his/her note in " \ - "the\r\n[**Hospital 7382**] medical record for further comments and\r\nrecommendations. Thank you " \ - "for allowing us to participate in the\r\ncare of this patient. Please feel free to contact us with " \ - "any\r\nquestions or concerns.\r\n"; + content = ( + "TITLE: Cardiology Consult\r\n DIVISION OF CARDIOLOGY\r\n " + " COMPREHENSIVE CONSULTATION NOTE\r\nCHIEF " + "COMPLAINT: Patient is seen in consultation today at the\r\nrequest of Dr. [**Last Name (STitle) " + "13959**]. We are asked to give consultative advice\r\nregarding evaluation and management of Acute " + "CHF.\r\nHISTORY OF PRESENT ILLNESS:\r\n71 year old man with CAD w/ diastolic dysfunction, CKD, " + "Renal\r\nCell CA s/p left nephrectomy, CLL, known lung masses and recent\r\nbrochial artery bleed, " + "s/p embolization of LLL bronchial artery\r\n[**1-17**], readmitted with hemoptysis on [" + "**2120-2-3**] from [**Hospital 328**] [**Hospital 9250**]\r\ntransferred from BMT floor following " + "second episode of hypoxic\r\nrespiratory failure, HTN and tachycardia in 3 days. Per report," + "\r\non the evening of transfer to the [**Hospital Unit Name 1**], patient continued to\r\nremain " + "tachypnic in upper 30s and was receiving IVF NS at\r\n100cc/hr for concern of hypovolemic " + "hypernatremia. He also had\r\nreceived 1unit PRBCs with temp rise for 98.3 to 100.4, " + "he was\r\ncultured at that time, and transfusion rxn work up was initiated.\r\nAt around 5:30am, " + "he was found to be newly hypertensive with SBP\r\n>200 with a regular tachycardia to 160 with new " + "hypoxia requiring\r\nshovel mask. He received 1mg IV ativan, 1mg morphine, lasix 40mg\r\nIV x1, " + "and lopressor 5mg IV. ABG 7.20/63/61 on shovel mask. He\r\nwas transferred to the ICU for further " + "care. On arrival to the\r\n[**Hospital Unit Name 1**], he received 5mg IV Dilt and was found to be " + "febrile to\r\n101.3. Blood and urine cultures were draw. He was placed on BIPAP\r\n12/5 with " + "improvement in his respiratory rate and sats. Repeat\r\nABG 7.43/34/130.\r\nOvernight, " + "he continued to be tachycardic, with stable O2 sats.\r\nHe was treated for agitation with haldol, " + "as well as IV beta\r\nblockers, with some improvement in his heart rate to the 80s at\r\nrest. He " + "has and continues to deny symptoms of chest pain. When\r\nassessed, he grunted responses to " + "questions, and was non-verbal.\r\nOn cardiac review of symptoms, no chest pain or other " + "discomfort.\r\nFurther questions limited by mental status.\r\nPAST MEDICAL HISTORY:\r\nCLL x 20 " + "yrs\r\n-s/p fludarabine and Cytoxan ([**7-14**]) with good response\r\n-auto-immune hemolytic " + "anemia on chronic steroids\r\n-mediastinal lymphadenopathy\r\n-h/o bilat pleural effusions with + " + "cytology ([**6-13**])\r\nRCC s/p Left nephrectomy [**2106**]\r\nCKD: prior baseline CR 1.5, " + "most recently 1.1-1.2\r\nBPH vs Prostate cancer\r\n- h/o multiple prostate biopsies with only 1 " + "c/w adenocarcinoma\r\n([**Doctor Last Name 2470**] 3+3)\r\nGERD\r\nType II DM: -recently started " + "insulin\r\nR-sided Exotropia\r\nGallstone pancreatitis [**12-10**]; s/p lap " + "chole\r\nHyperlipidemia\r\nCAD s/p cath [**4-13**] with diffuse 2 vessel dz\r\n- 70% RCA/PDA, " + "60%prox/mid LAD)\r\nHypogammaglobumenia, recurrent URI/PNA, on IVIG X 2years, good\r\nresponse (" + "last dose [**2118-11-11**])\r\nAllergic rhinitis\r\nGilberts disease\r\nHypotesteronemia\r\nR " + "humeral fracture ([**12-16**])\r\nEnlarged spleen secondary to CLL vs portal " + "hypertension.\r\nCardiac Risk Factors include diabetes, dyslipidemia,\r\nhypertension, and family " + "history of CAD.\r\nHOME MEDICATIONS:\r\nAlbuterol 90 mcg 2 puffs PRN\r\nAllopurinol 100mg PO " + "Daily\r\nFolic Acid 2mg PO Daily\r\nInsulin Lispro Protam & Lispro As Directed\r\nMetoprolol " + "Succinate 25mg PO BID\r\nNitroglycerin [NitroQuick] 0.3mg SL PRN\r\nPrednisone 2mg PO " + "daily\r\nRosuvastatin 5mg PO daily\r\nDocusate Sodium [Colace] 100mg PO BID\r\nSenna 8.6 PO BID " + "PRN\r\nCURRENT MEDICATIONS:\r\nAluminum-Magnesium Hydrox.-Simethicone 15-30 mL PO/NG " + "QID:PRN\r\ndyspepsia\r\nAllopurinol 100 mg PO/NG DAILY\r\nAlbuterol 0.083% Neb Soln 1 NEB IH " + "Q6H:PRN\r\nBisacodyl 10 mg PO/PR DAILY:PRN constipation\r\nCaphosol 30 mL ORAL QID:PRN dry " + "mouth\r\nDextrose 50% 12.5 gm IV PRN hypoglycemia\r\nDocusate Sodium 100 mg PO BID\r\nFamotidine " + "20 mg IV Q24H\r\nGlucagon 1 mg IM Q15MIN:PRN\r\nGuaifenesin-Dextromethorphan 10 mL PO/NG Q6H:PRN " + "cough\r\nInsulin SC SS\r\nIpratropium Bromide Neb 1 NEB IH Q6H:PRN\r\nMagnesium Sulfate " + "Replacement (Oncology) IV Sliding Scale\r\nMetoprolol Tartrate 5 mg IV " + "Q6H\r\nPiperacillin-Tazobactam 2.25 g IV Q6H\r\nPotassium Chloride Replacement (Oncology) IV " + "Sliding\r\nHydrocortisone Na Succ. 20 mg IV Q24H\r\nSenna 1 TAB PO/NG [**Hospital1 7**]:PRN " + "constipation\r\nVancomycin 1000 mg IV\r\nMetoprolol Tartrate 10 mg IV Q6H\r\nDiltiazem 5 mg IV " + "ONCE\r\nMetoprolol Tartrate 5 mg IV ONCE\r\nFurosemide 40 mg IV " + "ONCE\r\nALLERGIES:\r\nNKDA\r\nSOCIAL HISTORY:\r\nMarried, lives with wife [**Name (NI) **] in [" + "**Location (un) 12995**]. Has long history\r\nof CLL since [**2096**]. Is a rabbi working in " + "academics with 30 year\r\nhistory prior to that of congregation work in [**State 1698**]. " + "They\r\nhave two adult children in [**Location (un) 3063**] and LA and three\r\ngrandchildren. " + "Life-time nonsmoker, rare EtOH, no illicit drug\r\nuse.\r\nFAMILY HISTORY:\r\nFather w/ [**Name2 (" + "NI) 118**] cancer and coronary artery disease. Multiple\r\nrelatives with DM.\r\nREVIEW OF " + "SYSTEMS: ALL OTHER SYSTEMS NEGATIVE EXCEPT AS NOTED\r\nABOVE\r\nPHYSICAL EXAMINATION\r\nVitals: " + "T: 97.8 degrees Farenheit (max 101.3), BP: 128/73 mmHg\r\nsupine, HR 97 bpm, RR 35 bpm, " + "O2: 94 % on 0.4 aerosol mask.\r\nCONSTITUTIONAL: No acute distress.\r\nEYES: No conjunctival " + "pallor. No icterus.\r\nENT/Mouth: MMM. OP clear.\r\nTHYROID: No thyromegaly or thyroid " + "nodules.\r\nCV: Nondisplaced PMI. Tachycardic. Regular rhythm. nl S1, S2. No\r\nextra heart " + "sounds. No appreciable murmurs. No JVD. Normal\r\ncarotid upstroke without bruits.\r\nLUNGS: " + "Breath sounds bilaterally. No crackles, wheezes or rhonchi\r\nappreciated.\r\nGI: NABS. Soft, NT, " + "ND. No HSM. No abdominal bruits.\r\nMUSCULO: Supple neck. Normal muscle tone. Full strength " + "grossly.\r\nHEME/LYMPH: No palpable LAD. No peripheral edema. Full distal\r\npulses " + "bilaterally.\r\nSKIN: Warm extremities. No rashes/lesions, ecchymoses.\r\nNEURO: Limited responses " + "to questions. [**Name8 (MD) 54**] RN, the patient tends\r\nto wax and wane throughout the day; at " + "times answering questions\r\nand conversing, at other times being more confused. Other " + "exam\r\ngrossly normal without any significant focal deficits\r\nPSYCH: Mood and affect were " + "appropriate.\r\nTELEMETRY: Sinus tachycardia at 101. Runs of sinus tachycardia\r\nto 120s, " + "with brief episodes of atrial tach vs AF.\r\nECG ([**2120-2-15**]): Sinus tach @ 124. Normal " + "Axis/intervals.\r\nDiffuse nonspecific TW flattening with inferolateral T wave\r\ninversions, " + "not appreciably worse, and probably better than\r\nprior. No ECG tracing available more proximal " + "to this admission\r\nto ICU.\r\nTRANSTHORACIC ECHOCARDIOGRAM ([**2120-1-15**]):\r\nThe left atrium " + "is elongated. No atrial septal defect is seen by\r\n2D or color Doppler. Left ventricular wall " + "thicknesses and cavity\r\nsize are normal. There is probably mild regional left " + "ventricular\r\nsystolic dysfunction with distal lateral/apical lateral\r\nhypokinesis . There is " + "no ventricular septal defect. Right\r\nventricular chamber size and free wall motion are normal. " + "The\r\naortic root is mildly dilated at the sinus level. The aortic\r\nvalve leaflets (3) are " + "mildly thickened but aortic stenosis is\r\nnot present. No aortic regurgitation is seen. The " + "mitral valve\r\nleaflets are mildly thickened. There is no mitral valve prolapse.\r\nTrivial " + "mitral regurgitation is seen. The estimated pulmonary\r\nartery systolic pressure is normal. There " + "is no pericardial\r\neffusion. Compared with the prior study (images reviewed) of\r\n[" + "**2119-1-11**], mild regional LV systolic dysfunction is new.\r\nETT ([**2114-11-13**]):\r\nThe " + "patient\r\nexercised for 9.5 minutes of [**Initials (NamePattern4) **] [**Last Name (NamePattern4) " + "84**] protocol and was stopped at\r\nrequest for fatigue. This represents an average " + "functional\r\ncapacity.\r\nThere were no chest, neck, back, or arm discomforts reported " + "by\r\npatient throughout the procedure. There were no significant ST\r\nsegment\r\nchanges at peak " + "exercise or during recovery. The rhythm was sinus\r\nwith\r\nrare APBs and VPBs. The hemodynamic " + "response to exercise was\r\nappropriate.\r\nIMPRESSION: No anginal symptoms or ischemic EKG " + "changes at the\r\nachieved\r\nworkload. Nuclear report sent separately. Compared to ETT " + "report\r\n[**2113-11-29**], there are now no EKG changes noted and the " + "exercise\r\ntolerance\r\nhas increased by one minute.\r\nMIBI: 1) Again noted is mild, reversible " + "basilar inferior wall\r\nperfusion\r\ndefect in the face of soft tissue attenuation from the " + "diaphragm.\r\n2) Normal\r\nleft ventricular cavity size and function.\r\nCath: [**4-13**]:\r\n1. " + "Coronary angiography in this right-dominant system revealed:\r\n--the LMCA had no angiographically " + "apparent disease.\r\n--the LAD had diffuse proximal-mid 60% stenosis\r\n--the LCX had minimal " + "disease\r\n--the RCA was a small vessel with a distal 70% lesion going into\r\nthe RPDA\r\n2. " + "Limited resting hemodynamics revealed elevated left-sided\r\nfilling pressures, with LVEDP 18 " + "mmHg. There was high-normal\r\nsystemic arterial systolic pressures, with SBP 134 mmHg. " + "There\r\nwas no significant gradient upon pullback of the angled pigtail\r\ncatheter from LV to " + "ascending aorta.\r\nOTHER TESTING:\r\nCXR: Worsening fluid status versus prior. Followup needed to " + "see\r\nairspace processes track with CHF or are independent and in the\r\nlatter\r\nsituation " + "could represent pneumonia.\r\nLABORATORY DATA: Reviewed in OMR\r\nASSESSMENT AND PLAN:\r\n71 year " + "old man with complicated medical history including CAD w/\r\ndiastolic dysfunction, CKD, " + "Renal Cell CA s/p left nephrectomy,\r\nCLL, known lung masses and recent brochial artery bleed, " + "who has\r\nhad a complicated hospital course including s/p embolization of\r\nLLL bronchial artery " + "[**1-17**], readmitted with hemoptysis on [**2120-2-3**]\r\nfrom [**Hospital 328**] Rehab, " + "and is now transferred from BMT floor for a\r\nsecond episode of hypoxic respiratory failure, " + "HTN and\r\ntachycardia in 3 days. Although details with regard to the\r\ninitiating event last " + "night are limited by difficulty with\r\nobtaining a history, review of his relevant data indicates " + "that\r\nventilatory failure as indicated by his elevated PCO2 appears to\r\nhave played a " + "significant role. He clearly has a history of\r\nobstructive coronary artery disease, and likely " + "had some element\r\nof diastolic dysfunction in the setting of his " + "acute\r\ntachycardia/hypoxia/hypertensive episode yesterday, although\r\nthere is no obvious " + "indication that his CAD was a primary cause\r\nof these events based on the history (an ECG from " + "the peri-event\r\nwould be helpful, but non-specific). According to his RN, he has\r\nnot had " + "excess secretions today, although he has a new fever and\r\nWBC, which indicates that he could " + "have had some mucous plugging\r\nin the setting of a new PNA, which is currently being " + "treated\r\nwith antibiotics. Otherwise, would not diurese him any further\r\nas he looks quite " + "dry by exam and labs. Would try gentle\r\nhydration, and monitor his volume status closely. I'm " + "not sure\r\nthat a TTE will shed a whole lot more light on the current\r\nsituation, but it will " + "at least assess any myocardial damage he\r\nmight have sustained.\r\nRecs:\r\n--Continue beta " + "blocker as you are\r\n--Hold diuretics, start gentle IV hydration, close monitor " + "of\r\nhemodynamics\r\n--Obtain an ECG, monitor for any new changes\r\n--Consider pulmonary causes " + "(decreased alveolar ventilation) for hypoxia\r\nThe Assessment and Plan will be reviewed with Dr. " + "[**Last Name (STitle) 5550**] in\r\nmulti- disciplinary rounds. Please see his/her note in " + "the\r\n[**Hospital 7382**] medical record for further comments and\r\nrecommendations. Thank you " + "for allowing us to participate in the\r\ncare of this patient. Please feel free to contact us with " + "any\r\nquestions or concerns.\r\n" + ) return content From ec97b6c80e30989a6becf3416cfe0524e88e4787 Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 30 Mar 2023 01:33:16 +0300 Subject: [PATCH 16/17] update samples and readme files --- .../README.md | 124 ++++++--- .../samples/README.md | 8 +- .../sample_infer_cancer_profiling_async.py | 199 ++++++++++++++ .../samples/sample_infer_cancer_profiling.py | 80 +++--- .../README.md | 145 ++++++---- .../samples/README.md | 18 +- .../sample_match_trials_fhir_async.py | 126 +++++++++ ..._trials_structured_coded_elements_async.py | 152 +++++++++++ .../sample_data/match_trial_clinical_note.txt | 0 .../match_trial_fhir_data.json} | 0 .../samples/sample_match_trials_fhir.py | 102 +++---- ..._match_trials_structured_coded_elements.py | 122 ++++----- ...h_trials_structured_coded_elements_sync.py | 125 --------- ...match_trials_unstructured_clinical_note.py | 248 ------------------ .../setup.py | 2 +- 15 files changed, 788 insertions(+), 663 deletions(-) create mode 100644 sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py create mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_data/match_trial_clinical_note.txt rename sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/{match_trial_fhir_data.txt => sample_data/match_trial_fhir_data.json} (100%) delete mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py delete mode 100644 sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index ae1d84977a5f..e461bcc6d37c 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -5,6 +5,7 @@ The [Cancer Profiling model][cancer_profiling_docs] receives clinical records of oncology patients and outputs cancer staging, such as clinical stage TNM categories and pathologic stage TNM categories as well as tumor site, histology. +[Source code][hi_source_code] | [Package (PyPI)][hi_pypi] | [API reference documentation][cancer_profiling_api_documentation] | [Product documentation][product_docs] | [Samples][hi_samples] ## Getting started @@ -18,7 +19,7 @@ The [Cancer Profiling model][cancer_profiling_docs] receives clinical records of ### Install the package ```bash -python -m pip install azure-healthinsights-cancerprofiling +pip install azure-healthinsights-cancerprofiling ``` This table shows the relationship between SDK versions and supported API versions of the service: @@ -54,11 +55,14 @@ az cognitiveservices account keys list --resource-group ") -client = CancerProfilingClient(endpoint="https://.cognitiveservices.azure.com/", credential=credential) +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] + +cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) ``` ### Long-Running Operations @@ -78,28 +82,38 @@ The Cancer Profiling model allows you to infer cancer attributes such as tumor s ## Examples -The following section (#cancer-profiling) provides code snippets that demonstrate usage of the CancerProfilingClient - +The following section provides several code snippets covering some of the most common Health Insights - Cancer Profiling service tasks, including: +- [Cancer Profiling](#cancer-profiling "Cancer Profiling") ### Cancer Profiling Infer key cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM categories from a patient's unstructured clinical documents. ```python +import asyncio +import os +import datetime from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.cancerprofiling.models import * -from azure.healthinsights.cancerprofiling import CancerProfilingClient - +from azure.healthinsights.cancerprofiling.aio import CancerProfilingClient +from azure.healthinsights.cancerprofiling import models -KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" -ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] +# Create an Onco Phenotype client +# cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) +# -patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) -patient1 = PatientRecord(id="patient_id", info=patient_info) +# Construct patient +# +patient_info = models.PatientInfo(sex=models.PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) +patient1 = models.PatientRecord(id="patient_id", info=patient_info) +# +# Add document list +# doc_content1 = """ 15.8.2021 Jane Doe 091175-8967 @@ -122,13 +136,14 @@ doc_content1 = """ Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" -patient_document1 = PatientDocument(type=DocumentType.NOTE, - id="doc1", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) +patient_document1 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc1", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content1), + clinical_type=models.ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15)) doc_content2 = """ Oncology Clinic @@ -136,7 +151,7 @@ doc_content2 = """ Jane Doe 091175-8967 42-year-old healthy female who works as a nurse in the ER of this hospital. First menstruation at 11 years old. First delivery- 27 years old. She has 3 children. - Didn’t breastfeed. + Didn't breastfeed. Contraception- Mirena. Smoking- 10 pack years. Mother- Belarusian. Father- Georgian. @@ -158,13 +173,14 @@ doc_content2 = """ Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" -patient_document2 = PatientDocument(type=DocumentType.NOTE, - id="doc2", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) +patient_document2 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc2", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content2), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20)) doc_content3 = """ PATHOLOGY REPORT @@ -188,20 +204,45 @@ doc_content3 = """ Blocks with invasive carcinoma: A1 Special studies: Pending""" -patient_document3 = PatientDocument(type=DocumentType.NOTE, - id="doc3", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) +patient_document3 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc3", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content3), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1)) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list - configuration = OncoPhenotypeModelConfiguration(include_evidence=True) -cancer_profiling_data = OncoPhenotypeData(patients=[patient1], configuration=configuration) +# <\DocumentList> + +# Set configuration to include evidence for the cancer staging inferences +configuration = models.OncoPhenotypeModelConfiguration(include_evidence=True) + +# Construct the request with the patient and configuration +cancer_profiling_data = models.OncoPhenotypeData(patients=[patient1], configuration=configuration) poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) +cancer_profiling_result = await poller.result() +if cancer_profiling_result.status == models.JobStatus.SUCCEEDED: + results = cancer_profiling_result.results + for patient_result in results.patients: + print(f"\n==== Inferences of Patient {patient_result.id} ====") + for inference in patient_result.inferences: + print( + f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + ConfidenceScore: {inference.confidence_score} ===") + for evidence in inference.evidence: + data_evidence = evidence.patient_data_evidence + print( + f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + {data_evidence.text}") +else: + errors = cancer_profiling_result.errors + if errors is not None: + for error in errors: + print(f"{error.code} : {error.message}") ``` ## Troubleshooting @@ -254,8 +295,9 @@ additional questions or comments. [azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights [azure_cli]: https://learn.microsoft.com/cli/azure/ [cancer_profiling_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/overview?branch=main +[cancer_profiling_api_documentation]: https://review.learn.microsoft.com/rest/api/cognitiveservices/healthinsights/onco-phenotype?branch=healthin202303 +[hi_pypi]: https://pypi.org/project/azure-healthinsights-cancerprofiling/ +[product_docs]:https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/?branch=main - + diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md index fd2d2db8c538..eab26bb1944d 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/README.md @@ -17,11 +17,10 @@ These sample programs show common scenarios for the Health Insights Cancer Profi |**File Name**|**Description**| |----------------|-------------| -|[sample_infer_cancer_profiling.py][sample_infer_cancer_profiling] |Infer cancer profiling.| +|[sample_infer_cancer_profiling.py][sample_infer_cancer_profiling] and [sample_infer_cancer_profiling_async.py][sample_infer_cancer_profiling_async]|Infer cancer profiling.| ## Prerequisites * Python 3.7 or later is required to use this package. -* The Pandas data analysis library. * You must have an [Azure subscription][azure_subscription] and an [Azure Health Insights account][azure_healthinsights_account] to run these samples. ## Setup @@ -49,6 +48,7 @@ what you can do with the Health Insights client library. [pip]: https://pypi.org/project/pip/ [azure_subscription]: https://azure.microsoft.com/free/cognitive-services diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py new file mode 100644 index 000000000000..e3f6bdff98e6 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/async_samples/sample_infer_cancer_profiling_async.py @@ -0,0 +1,199 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.cancerprofiling.aio import CancerProfilingClient +from azure.healthinsights.cancerprofiling import models + +""" +FILE: sample_infer_cancer_profiling_async.py + +DESCRIPTION: + Infer key cancer attributes such as tumor site, histology, clinical stage TNM categories and pathologic stage TNM + categories from a patient's unstructured clinical documents. + + OncoPhenotype model enables cancer registrars and clinical researchers to infer key cancer attributes from + unstructured clinical documents along with evidence relevant to those attributes. This model can help reduce the + manual time spent combing through large amounts of patient documentation. + + +USAGE: + python sample_infer_cancer_profiling_async.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def infer_cancer_profiling_async(self) -> None: + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] + + # Create an Onco Phenotype client + # + cancer_profiling_client = CancerProfilingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Construct patient + # + patient_info = models.PatientInfo(sex=models.PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) + patient1 = models.PatientRecord(id="patient_id", info=patient_info) + # + + # Add document list + # + doc_content1 = """ + 15.8.2021 + Jane Doe 091175-8967 + 42 year old female, married with 3 children, works as a nurse + Healthy, no medications taken on a regular basis. + PMHx is significant for migraines with aura, uses Mirena for contraception. + Smoking history of 10 pack years (has stopped and relapsed several times). + She is in c/o 2 weeks of productive cough and shortness of breath. + She has a fever of 37.8 and general weakness. + Denies night sweats and rash. She denies symptoms of rhinosinusitis, asthma, and heartburn. + On PE: + GENERAL: mild pallor, no cyanosis. Regular breathing rate. + LUNGS: decreased breath sounds on the base of the right lung. Vesicular breathing. + No crackles, rales, and wheezes. Resonant percussion. + PLAN: + Will be referred for a chest x-ray. + ====================================== + CXR showed mild nonspecific opacities in right lung base. + PLAN: + Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a + follow-up CXR in 2 weeks.""" + + patient_document1 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc1", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content1), + clinical_type=models.ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15)) + + doc_content2 = """ + Oncology Clinic + 20.10.2021 + Jane Doe 091175-8967 + 42-year-old healthy female who works as a nurse in the ER of this hospital. + First menstruation at 11 years old. First delivery- 27 years old. She has 3 children. + Didn't breastfeed. + Contraception- Mirena. + Smoking- 10 pack years. + Mother- Belarusian. Father- Georgian. + About 3 months prior to admission, she stated she had SOB and was febrile. + She did a CXR as an outpatient which showed a finding in the base of the right lung- + possibly an infiltrate. + She was treated with antibiotics with partial response. + 6 weeks later a repeat CXR was performed- a few solid dense findings in the right lung. + Therefore, she was referred for a PET-CT which demonstrated increased uptake in the right + breast, lymph nodes on the right a few areas in the lungs and liver. + On biopsy from the lesion in the right breast- triple negative adenocarcinoma. Genetic + testing has not been done thus far. + Genetic counseling- the patient denies a family history of breast, ovary, uterus, + and prostate cancer. Her mother has chronic lymphocytic leukemia (CLL). + She is planned to undergo genetic tests because the aggressive course of the disease, + and her young age. + Impression: + Stage 4 triple negative breast adenocarcinoma. + Could benefit from biological therapy. + Different treatment options were explained- the patient wants to get a second opinion.""" + + patient_document2 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc2", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content2), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20)) + + doc_content3 = """ + PATHOLOGY REPORT + Clinical Information + Ultrasound-guided biopsy; A. 18 mm mass; most likely diagnosis based on imaging: IDC + Diagnosis + A. BREAST, LEFT AT 2:00 4 CM FN; ULTRASOUND-GUIDED NEEDLE CORE BIOPSIES: + - Invasive carcinoma of no special type (invasive ductal carcinoma), grade 1 + Nottingham histologic grade: 1/3 (tubules 2; nuclear grade 2; mitotic rate 1; + total score; 5/9) + Fragments involved by invasive carcinoma: 2 + Largest measurement of invasive carcinoma on a single fragment: 7 mm + Ductal carcinoma in situ (DCIS): Present + Architectural pattern: Cribriform + Nuclear grade: 2- + -intermediate + Necrosis: Not identified + Fragments involved by DCIS: 1 + Largest measurement of DCIS on a single fragment: Span 2 mm + Microcalcifications: Present in benign breast tissue and invasive carcinoma + Blocks with invasive carcinoma: A1 + Special studies: Pending""" + + patient_document3 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc3", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content3), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1)) + + patient_doc_list = [patient_document1, patient_document2, patient_document3] + patient1.data = patient_doc_list + # <\DocumentList> + + # Set configuration to include evidence for the cancer staging inferences + configuration = models.OncoPhenotypeModelConfiguration(include_evidence=True) + + # Construct the request with the patient and configuration + cancer_profiling_data = models.OncoPhenotypeData(patients=[patient1], configuration=configuration) + + # Health Insights Infer Oncology Phenotyping + try: + poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) + cancer_profiling_result = await poller.result() + self.print_inferences(cancer_profiling_result) + except Exception as ex: + print(str(ex)) + return + + # print the inferences + @staticmethod + def print_inferences(cancer_profiling_result): + if cancer_profiling_result.status == models.JobStatus.SUCCEEDED: + results = cancer_profiling_result.results + for patient_result in results.patients: + print(f"\n==== Inferences of Patient {patient_result.id} ====") + for inference in patient_result.inferences: + print( + f"\n=== Clinical Type: {str(inference.type)} Value: {inference.value}\ + ConfidenceScore: {inference.confidence_score} ===") + for evidence in inference.evidence: + data_evidence = evidence.patient_data_evidence + print( + f"Evidence {data_evidence.id} {data_evidence.offset} {data_evidence.length}\ + {data_evidence.text}") + else: + errors = cancer_profiling_result.errors + if errors is not None: + for error in errors: + print(f"{error.code} : {error.message}") + + +async def main(): + sample = HealthInsightsSamples() + await sample.infer_cancer_profiling_async() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py index 4c266f8a7779..bdb20c7e7363 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/samples/sample_infer_cancer_profiling.py @@ -1,13 +1,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -import asyncio import os import datetime from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.cancerprofiling.models import * # type: ignore -from azure.healthinsights.cancerprofiling.aio import CancerProfilingClient +from azure.healthinsights.cancerprofiling import CancerProfilingClient, models """ FILE: sample_infer_cancer_profiling.py @@ -31,9 +29,9 @@ class HealthInsightsSamples: - async def infer_cancer_profiling(self): - KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" - ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + def infer_cancer_profiling(self) -> None: + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] # Create an Onco Phenotype client # @@ -43,8 +41,8 @@ async def infer_cancer_profiling(self): # Construct patient # - patient_info = PatientInfo(sex=PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) - patient1 = PatientRecord(id="patient_id", info=patient_info) + patient_info = models.PatientInfo(sex=models.PatientInfoSex.FEMALE, birth_date=datetime.date(1979, 10, 8)) + patient1 = models.PatientRecord(id="patient_id", info=patient_info) # # Add document list @@ -71,13 +69,14 @@ async def infer_cancer_profiling(self): Findings are suggestive of a working diagnosis of pneumonia. The patient is referred to a follow-up CXR in 2 weeks.""" - patient_document1 = PatientDocument(type=DocumentType.NOTE, - id="doc1", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content1), - clinical_type=ClinicalDocumentType.IMAGING, - language="en", - created_date_time=datetime.datetime(2021, 8, 15)) + patient_document1 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc1", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content1), + clinical_type=models.ClinicalDocumentType.IMAGING, + language="en", + created_date_time=datetime.datetime(2021, 8, 15)) doc_content2 = """ Oncology Clinic @@ -107,13 +106,14 @@ async def infer_cancer_profiling(self): Could benefit from biological therapy. Different treatment options were explained- the patient wants to get a second opinion.""" - patient_document2 = PatientDocument(type=DocumentType.NOTE, - id="doc2", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content2), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2021, 10, 20)) + patient_document2 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc2", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content2), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2021, 10, 20)) doc_content3 = """ PATHOLOGY REPORT @@ -137,36 +137,38 @@ async def infer_cancer_profiling(self): Blocks with invasive carcinoma: A1 Special studies: Pending""" - patient_document3 = PatientDocument(type=DocumentType.NOTE, - id="doc3", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=doc_content3), - clinical_type=ClinicalDocumentType.PATHOLOGY, - language="en", - created_date_time=datetime.datetime(2022, 1, 1)) + patient_document3 = models.PatientDocument(type=models.DocumentType.NOTE, + id="doc3", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=doc_content3), + clinical_type=models.ClinicalDocumentType.PATHOLOGY, + language="en", + created_date_time=datetime.datetime(2022, 1, 1)) patient_doc_list = [patient_document1, patient_document2, patient_document3] patient1.data = patient_doc_list # <\DocumentList> # Set configuration to include evidence for the cancer staging inferences - configuration = OncoPhenotypeModelConfiguration(include_evidence=True) + configuration = models.OncoPhenotypeModelConfiguration(include_evidence=True) # Construct the request with the patient and configuration - cancer_profiling_data = OncoPhenotypeData(patients=[patient1], configuration=configuration) + cancer_profiling_data = models.OncoPhenotypeData(patients=[patient1], configuration=configuration) # Health Insights Infer Oncology Phenotyping try: - poller = await cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) - cancer_profiling_result = await poller.result() + poller = cancer_profiling_client.begin_infer_cancer_profile(cancer_profiling_data) + cancer_profiling_result = poller.result() self.print_inferences(cancer_profiling_result) except Exception as ex: print(str(ex)) return # print the inferences - def print_inferences(self, cancer_profiling_result): - if cancer_profiling_result.status == JobStatus.SUCCEEDED: + @staticmethod + def print_inferences(cancer_profiling_result): + if cancer_profiling_result.status == models.JobStatus.SUCCEEDED: results = cancer_profiling_result.results for patient_result in results.patients: print(f"\n==== Inferences of Patient {patient_result.id} ====") @@ -186,10 +188,6 @@ def print_inferences(self, cancer_profiling_result): print(f"{error.code} : {error.message}") -async def main(): - sample = HealthInsightsSamples() - await sample.infer_cancer_profiling() - - if __name__ == "__main__": - asyncio.run(main()) + sample = HealthInsightsSamples() + sample.infer_cancer_profiling() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md index 71e5530fb322..4dc50defefdd 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/README.md @@ -3,6 +3,7 @@ [Health Insights](https://review.learn.microsoft.com/azure/azure-health-insights/?branch=release-azure-health-insights) is an Azure Applied AI Service built with the Azure Cognitive Services Framework, that leverages multiple Cognitive Services, Healthcare API services and other Azure resources. The [Clinical Matching model][clinical_matching_docs] receives patients data and clinical trials protocols, and provides relevant clinical trials based on eligibility criteria. +[Source code][hi_source_code] | [Package (PyPI)][hi_pypi] | [API reference documentation][clinical_matching_api_documentation] | [Product documentation][product_docs] | [Samples][hi_samples] ## Getting started @@ -16,14 +17,14 @@ The [Clinical Matching model][clinical_matching_docs] receives patients data and ### Install the package ```bash -python -m pip install azure-healthinsights-clinicalmatching +pip install azure-healthinsights-clinicalmatching ``` This table shows the relationship between SDK versions and supported API versions of the service: -|SDK version|Supported API version of service | -|-------------|---------------| -|1.0.0b1 | 2023-03-01-preview| +| SDK version | Supported API version of service | +|-------------|----------------------------------| +| 1.0.0b1 | 2023-03-01-preview | ### Authenticate the client @@ -52,11 +53,14 @@ az cognitiveservices account keys list --resource-group ") -client = ClinicalMatchingClient(endpoint="https://.cognitiveservices.azure.com/", credential=credential) +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] + +trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) ``` ### Long-Running Operations @@ -78,67 +82,95 @@ Trial Matcher provides the user of the services two main modes of operation: pat ## Examples - +The following section provides several code snippets covering some of the most common Health Insights - Clinical Matching service tasks, including: + +- [Match trials](#match-trials "Match trials") ### Match trials Finding potential eligible trials for a patient. ```python +import os +import datetime from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.clinicalmatching import ClinicalMatchingClient +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient, models -KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" -ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" +KEY = os.environ["HEALTHINSIGHTS_KEY"] +ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] +# Create a Trial Matcher client +# trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) +# + +# Create clinical info list +# +clinical_info_list = [models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0032181", + name="Platelet count", + value="250000"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0002965", + name="Unstable Angina", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Radiotherapy", + value="false"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0242957", + name="GeneOrProtein-Expression", + value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="cancer stage", + value="2")] + +# + +# Construct Patient +# +patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list) +patient1 = models.PatientRecord(id="patient_id", info=patient_info) +# -clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2")] - -patient1 = self.get_patient_from_fhir_patient() # Create registry filter -registry_filters = ClinicalTrialRegistryFilter() +registry_filters = models.ClinicalTrialRegistryFilter() # Limit the trial to a specific patient condition ("Non-small cell lung cancer") -registry_filters.conditions = ["Non-small cell lung cancer"] -# Limit the clinical trial to a certain phase, phase 1 -registry_filters.phases = [ClinicalTrialPhase.PHASE1] +registry_filters.conditions = ["non small cell lung cancer (nsclc)"] # Specify the clinical trial registry source as ClinicalTrials.Gov -registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] +registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA -registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] -# Limit the trial to a specific study type, interventional -registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] - -clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) -configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) -trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) - -poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) +registry_filters.facility_locations = [ + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] +# Limit the trial to a specific recruitment status +registry_filters.recruitment_statuses = [models.ClinicalTrialRecruitmentStatus.RECRUITING] + +# Construct ClinicalTrial instance and attach the registry filter to it. +clinical_trials = models.ClinicalTrials(registry_filters=[registry_filters]) + +# Create TrialMatcherRequest +configuration = models.TrialMatcherModelConfiguration(clinical_trials=clinical_trials) +trial_matcher_data = models.TrialMatcherData(patients=[patient1], configuration=configuration) + +poller = trial_matcher_client.begin_match_trials(trial_matcher_data) +trial_matcher_result = poller.result() +if trial_matcher_result.status == models.JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") +else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") ``` ## Troubleshooting @@ -192,10 +224,9 @@ additional questions or comments. [azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights [azure_cli]: https://learn.microsoft.com/cli/azure/ [clinical_matching_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/trial-matcher/overview?branch=main +[hi_pypi]: https://pypi.org/project/azure-healthinsights-clinicalmatching/ +[product_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/trial-matcher/?branch=main +[clinical_matching_api_documentation]: https://review.learn.microsoft.com/rest/api/cognitiveservices/healthinsights/trial-matcher?branch=healthin202303 - + diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md index 603a2e8000e5..10f7315d33ff 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/README.md @@ -18,15 +18,12 @@ These sample programs show common scenarios for the Health Insights Clinical Mat |**File Name**|**Description**| |----------------|-------------| ## Prerequisites * Python 3.7 or later is required to use this package. -* The Pandas data analysis library. * You must have an [Azure subscription][azure_subscription] and an [Azure Health Insights account][azure_healthinsights_account] to run these samples. ## Setup @@ -54,9 +51,10 @@ what you can do with the Health Insights client library. [pip]: https://pypi.org/project/pip/ [azure_subscription]: https://azure.microsoft.com/free/cognitive-services diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py new file mode 100644 index 000000000000..b58c06ef5729 --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_fhir_async.py @@ -0,0 +1,126 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient +from azure.healthinsights.clinicalmatching import models + +""" +FILE: sample_match_trials_fhir_async.py + +DESCRIPTION: + Trial Eligibility Assessment for a Custom Trial. + + Trial Matcher can be used to understand the gaps of eligibility criteria for a specific patient for a given clinical + trial. In this case, the trial is not taken from clinicaltrials.gov, however the trial is a custom trial that might + be not published clinicaltrials.gov yet. The custom trial eligibility criteria section is provided as an input to + the Trial Matcher. + + In this use case, the patient clinical information is provided to the Trial Matcher as a FHIR bundle. + Note that the Trial Matcher configuration include reference to the FHIR Server where the patient FHIR bundle is + located. + + +USAGE: + python sample_match_trials_fhir_async.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def match_trials_async(self) -> None: + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] + + # Create aTrial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Construct Patient + # + patient1 = self.get_patient_from_fhir_patient() + # + + # Create registry filter + registry_filters = models.ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["Non-small cell lung cancer"] + # Limit the clinical trial to a certain phase, phase 1 + registry_filters.phases = [models.ClinicalTrialPhase.PHASE1] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [models.GeographicLocation(country_or_region="United States", + city="Gilbert", + state="Arizona")] + # Limit the trial to a specific study type, interventional + registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = models.ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = models.TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = models.TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Insights Trial match trials + try: + poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = await poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + @staticmethod + def print_results(trial_matcher_result): + if trial_matcher_result.status == models.JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + def get_patient_from_fhir_patient(self) -> models.PatientRecord: + patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) + patient_data = models.PatientDocument(type=models.DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content()), + clinical_type=models.ClinicalDocumentType.CONSULTATION) + return models.PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) + + @staticmethod + def get_patient_doc_content() -> str: + samples_dir = os.path.dirname(os.path.realpath(__file__)) + data_location = os.path.join(samples_dir, "../sample_data/match_trial_fhir_data.json") + with open(data_location, 'r', encoding='utf-8-sig') as f: + content = f.read() + return content + + +async def main(): + sample = HealthInsightsSamples() + await sample.match_trials_async() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py new file mode 100644 index 000000000000..5347b105c4cc --- /dev/null +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/async_samples/sample_match_trials_structured_coded_elements_async.py @@ -0,0 +1,152 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import asyncio +import os +import datetime + +from azure.core.credentials import AzureKeyCredential +from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient +from azure.healthinsights.clinicalmatching import models + +""" +FILE: sample_match_trials_structured_coded_elements_async.py + +DESCRIPTION: + Finding potential eligible trials for a patient, based on patient’s structured medical information. + + Trial Matcher model matches a single patient to a set of relevant clinical trials, + that this patient appears to be qualified for. This use case will demonstrate: + a. How to use the trial matcher when patient clinical health information is provided to the + Trial Matcher in a key-value structure with coded elements. + b. How to use the clinical trial configuration to narrow down the trial condition, + recruitment status, location and other criteria that the service users may choose to prioritize. + +USAGE: + python sample_match_trials_structured_coded_elements_async.py + + Set the environment variables with your own values before running the sample: + 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. + 2) HEALTH_DECISION_SUPPORT_ENDPOINT - the endpoint to your source Health Insights resource. +""" + + +class HealthInsightsSamples: + async def match_trials_async(self) -> None: + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] + + # Create a Trial Matcher client + # + trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, + credential=AzureKeyCredential(KEY)) + # + + # Create clinical info list + # + clinical_info_list = [models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0006826", + name="Malignant Neoplasms", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Therapeutic radiology procedure", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="METASTATIC", + name="metastatic", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1512162", + name="Eastern Cooperative Oncology Group", + value="1"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019693", + name="HIV Infections", + value="false"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="Tumor stage", + value="2"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019163", + name="Hepatitis B", + value="false"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0018802", + name="Congestive heart failure", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0019196", + name="Hepatitis C", + value="false"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0220650", + name="Metastatic malignant neoplasm to brain", + value="true")] + + # + + # Construct Patient + # + patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list) + patient1 = models.PatientRecord(id="patient_id", info=patient_info) + # + + # Create registry filter + registry_filters = models.ClinicalTrialRegistryFilter() + # Limit the trial to a specific patient condition ("Non-small cell lung cancer") + registry_filters.conditions = ["Non-small cell lung cancer"] + # Limit the clinical trial to a certain phase, phase 1 + registry_filters.phases = [models.ClinicalTrialPhase.PHASE1] + # Specify the clinical trial registry source as ClinicalTrials.Gov + registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] + # Limit the clinical trial to a certain location, in this case California, USA + registry_filters.facility_locations = [models.GeographicLocation(country_or_region="United States", + city="Gilbert", + state="Arizona")] + # Limit the trial to a specific study type, interventional + registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] + + # Construct ClinicalTrial instance and attach the registry filter to it. + clinical_trials = models.ClinicalTrials(registry_filters=[registry_filters]) + + # Create TrialMatcherRequest + configuration = models.TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = models.TrialMatcherData(patients=[patient1], configuration=configuration) + + # Health Insights Trial match trials + try: + poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = await poller.result() + self.print_results(trial_matcher_result) + except Exception as ex: + print(str(ex)) + return + + # print match trials (eligible/ineligible) + @staticmethod + def print_results(trial_matcher_result): + if trial_matcher_result.status == models.JobStatus.SUCCEEDED: + tm_results = trial_matcher_result.results + for patient_result in tm_results.patients: + print(f"Inferences of Patient {patient_result.id}") + for tm_inferences in patient_result.inferences: + print(f"Trial Id {tm_inferences.id}") + print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") + print(f"Description {tm_inferences.description}") + else: + tm_errors = trial_matcher_result.errors + if tm_errors is not None: + for error in tm_errors: + print(f"{error.code} : {error.message}") + + +async def main(): + sample = HealthInsightsSamples() + await sample.match_trials_async() + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_data/match_trial_clinical_note.txt b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_data/match_trial_clinical_note.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_data/match_trial_fhir_data.json similarity index 100% rename from sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/match_trial_fhir_data.txt rename to sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_data/match_trial_fhir_data.json diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py index 94efbd3baccd..c1c5911e7d97 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_fhir.py @@ -1,13 +1,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -import asyncio import os import datetime from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports -from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient, models """ FILE: sample_match_trials_fhir.py @@ -21,7 +19,8 @@ the Trial Matcher. In this use case, the patient clinical information is provided to the Trial Matcher as a FHIR bundle. - Note that the Trial Matcher configuration include reference to the FHIR Server where the patient FHIR bundle is located. + Note that the Trial Matcher configuration include reference to the FHIR Server where the patient FHIR bundle is + located. USAGE: @@ -34,78 +33,55 @@ class HealthInsightsSamples: - async def match_trials(self): - KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" - ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + def match_trials(self) -> None: + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] - # Create an Trial Matcher client + # Create a Trial Matcher client # trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, credential=AzureKeyCredential(KEY)) # - # Create clinical info list - # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2")] - - # - # Construct Patient # patient1 = self.get_patient_from_fhir_patient() # # Create registry filter - registry_filters = ClinicalTrialRegistryFilter() + registry_filters = models.ClinicalTrialRegistryFilter() # Limit the trial to a specific patient condition ("Non-small cell lung cancer") registry_filters.conditions = ["Non-small cell lung cancer"] # Limit the clinical trial to a certain phase, phase 1 - registry_filters.phases = [ClinicalTrialPhase.PHASE1] + registry_filters.phases = [models.ClinicalTrialPhase.PHASE1] # Specify the clinical trial registry source as ClinicalTrials.Gov - registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + registry_filters.facility_locations = [ + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] # Limit the trial to a specific study type, interventional - registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] + registry_filters.study_types = [models.ClinicalTrialStudyType.INTERVENTIONAL] # Construct ClinicalTrial instance and attach the registry filter to it. - clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + clinical_trials = models.ClinicalTrials(registry_filters=[registry_filters]) # Create TrialMatcherRequest - configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) - trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + configuration = models.TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = models.TrialMatcherData(patients=[patient1], configuration=configuration) - # Health Health Insights Trial match trials + # Health Insights Trial match trials try: - poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) - trial_matcher_result = await poller.result() + poller = trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = poller.result() self.print_results(trial_matcher_result) except Exception as ex: print(str(ex)) return # print match trials (eligible/ineligible) - def print_results(self, trial_matcher_result): - if trial_matcher_result.status == JobStatus.SUCCEEDED: + @staticmethod + def print_results(trial_matcher_result): + if trial_matcher_result.status == models.JobStatus.SUCCEEDED: tm_results = trial_matcher_result.results for patient_result in tm_results.patients: print(f"Inferences of Patient {patient_result.id}") @@ -119,25 +95,25 @@ def print_results(self, trial_matcher_result): for error in tm_errors: print(f"{error.code} : {error.message}") - def get_patient_from_fhir_patient(self) -> PatientRecord: - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) - patient_data = PatientDocument(type=DocumentType.FHIR_BUNDLE, - id="Consultation-14-Demo", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()), - clinical_type=ClinicalDocumentType.CONSULTATION) - return PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) - - def get_patient_doc_content(self) -> str: - with open("match_trial_fhir_data.txt", 'r', encoding='utf-8-sig') as f: + def get_patient_from_fhir_patient(self) -> models.PatientRecord: + patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) + patient_data = models.PatientDocument(type=models.DocumentType.FHIR_BUNDLE, + id="Consultation-14-Demo", + content=models.DocumentContent( + source_type=models.DocumentContentSourceType.INLINE, + value=self.get_patient_doc_content()), + clinical_type=models.ClinicalDocumentType.CONSULTATION) + return models.PatientRecord(id="patient_id", info=patient_info, data=[patient_data]) + + @staticmethod + def get_patient_doc_content() -> str: + samples_dir = os.path.dirname(os.path.realpath(__file__)) + data_location = os.path.join(samples_dir, "sample_data/match_trial_fhir_data.json") + with open(data_location, 'r', encoding='utf-8-sig') as f: content = f.read() return content -async def main(): - sample = HealthInsightsSamples() - await sample.match_trials() - - if __name__ == "__main__": - asyncio.run(main()) + sample = HealthInsightsSamples() + sample.match_trials() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py index f84f05938f61..7f7310135d91 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements.py @@ -1,19 +1,18 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -import asyncio import os import datetime from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports -from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient +from azure.healthinsights.clinicalmatching import ClinicalMatchingClient, models """ FILE: sample_match_trials_structured_coded_elements.py DESCRIPTION: Finding potential eligible trials for a patient, based on patient’s structured medical information. + It uses **SYNC** function unlike other samples that uses async function. Trial Matcher model matches a single patient to a set of relevant clinical trials, that this patient appears to be qualified for. This use case will demonstrate: @@ -22,110 +21,91 @@ b. How to use the clinical trial configuration to narrow down the trial condition, recruitment status, location and other criteria that the service users may choose to prioritize. + USAGE: python sample_match_trials_structured_coded_elements.py Set the environment variables with your own values before running the sample: 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. - 2) HEALTH_DECISION_SUPPORT_ENDPOINT - the endpoint to your source Health Insights resource. + 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. """ class HealthInsightsSamples: - async def match_trials(self): - KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" - ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" + def match_trials(self): + KEY = os.environ["HEALTHINSIGHTS_KEY"] + ENDPOINT = os.environ["HEALTHINSIGHTS_ENDPOINT"] - # Create an Trial Matcher client + # Create a Trial Matcher client # trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) + credential=AzureKeyCredential(KEY)) # # Create clinical info list # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0006826", - name="Malignant Neoplasms", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Therapeutic radiology procedure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="METASTATIC", - name="metastatic", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1512162", - name="Eastern Cooperative Oncology Group", - value="1"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019693", - name="HIV Infections", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="Tumor stage", - value="2"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019163", - name="Hepatitis B", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0018802", - name="Congestive heart failure", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0019196", - name="Hepatitis C", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0220650", - name="Metastatic malignant neoplasm to brain", - value="true")] + clinical_info_list = [models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0032181", + name="Platelet count", + value="250000"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0002965", + name="Unstable Angina", + value="true"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1522449", + name="Radiotherapy", + value="false"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C0242957", + name="GeneOrProtein-Expression", + value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), + models.ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", + code="C1300072", + name="cancer stage", + value="2")] # # Construct Patient # - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) - patient1 = PatientRecord(id="patient_id", info=patient_info) + patient_info = models.PatientInfo(sex=models.PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), + clinical_info=clinical_info_list) + patient1 = models.PatientRecord(id="patient_id", info=patient_info) # # Create registry filter - registry_filters = ClinicalTrialRegistryFilter() + registry_filters = models.ClinicalTrialRegistryFilter() # Limit the trial to a specific patient condition ("Non-small cell lung cancer") - registry_filters.conditions = ["Non-small cell lung cancer"] - # Limit the clinical trial to a certain phase, phase 1 - registry_filters.phases = [ClinicalTrialPhase.PHASE1] + registry_filters.conditions = ["non small cell lung cancer (nsclc)"] # Specify the clinical trial registry source as ClinicalTrials.Gov - registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] + registry_filters.sources = [models.ClinicalTrialSource.CLINICALTRIALS_GOV] # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] - # Limit the trial to a specific study type, interventional - registry_filters.study_types = [ClinicalTrialStudyType.INTERVENTIONAL] + registry_filters.facility_locations = [ + models.GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] + # Limit the trial to a specific recruitment status + registry_filters.recruitment_statuses = [models.ClinicalTrialRecruitmentStatus.RECRUITING] # Construct ClinicalTrial instance and attach the registry filter to it. - clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) + clinical_trials = models.ClinicalTrials(registry_filters=[registry_filters]) # Create TrialMatcherRequest - configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) - trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) + configuration = models.TrialMatcherModelConfiguration(clinical_trials=clinical_trials) + trial_matcher_data = models.TrialMatcherData(patients=[patient1], configuration=configuration) # Health Insights Trial match trials try: - poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) - trial_matcher_result = await poller.result() + poller = trial_matcher_client.begin_match_trials(trial_matcher_data) + trial_matcher_result = poller.result() self.print_results(trial_matcher_result) except Exception as ex: print(str(ex)) return # print match trials (eligible/ineligible) - def print_results(self, trial_matcher_result): - if trial_matcher_result.status == JobStatus.SUCCEEDED: + @staticmethod + def print_results(trial_matcher_result): + if trial_matcher_result.status == models.JobStatus.SUCCEEDED: tm_results = trial_matcher_result.results for patient_result in tm_results.patients: print(f"Inferences of Patient {patient_result.id}") @@ -140,10 +120,6 @@ def print_results(self, trial_matcher_result): print(f"{error.code} : {error.message}") -async def main(): - sample = HealthInsightsSamples() - await sample.match_trials() - - if __name__ == "__main__": - asyncio.run(main()) + sample = HealthInsightsSamples() + sample.match_trials() diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py deleted file mode 100644 index c1ead0fd77c0..000000000000 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_structured_coded_elements_sync.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -import os -import datetime - -from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports -from azure.healthinsights.clinicalmatching import ClinicalMatchingClient - -""" -FILE: sample_match_trials_structured_coded_elements_sync.py - -DESCRIPTION: - Finding potential eligible trials for a patient, based on patient’s structured medical information. - It uses **SYNC** function unlike other samples that uses async function. - - Trial Matcher model matches a single patient to a set of relevant clinical trials, - that this patient appears to be qualified for. This use case will demonstrate: - a. How to use the trial matcher when patient clinical health information is provided to the - Trial Matcher in a key-value structure with coded elements. - b. How to use the clinical trial configuration to narrow down the trial condition, - recruitment status, location and other criteria that the service users may choose to prioritize. - - -USAGE: - python sample_match_trials_structured_coded_elements_sync.py - - Set the environment variables with your own values before running the sample: - 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. - 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. -""" - - -class HealthInsightsSamples: - def match_trials(self): - KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" - ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" - - # Create an Trial Matcher client - # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) - # - - # Create clinical info list - # - clinical_info_list = [ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0032181", - name="Platelet count", - value="250000"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0002965", - name="Unstable Angina", - value="true"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1522449", - name="Radiotherapy", - value="false"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C0242957", - name="GeneOrProtein-Expression", - value="Negative;EntityType:GENEORPROTEIN-EXPRESSION"), - ClinicalCodedElement(system="http://www.nlm.nih.gov/research/umls", - code="C1300072", - name="cancer stage", - value="2")] - - # - - # Construct Patient - # - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26), - clinical_info=clinical_info_list) - patient1 = PatientRecord(id="patient_id", info=patient_info) - # - - # Create registry filter - registry_filters = ClinicalTrialRegistryFilter() - # Limit the trial to a specific patient condition ("Non-small cell lung cancer") - registry_filters.conditions = ["non small cell lung cancer (nsclc)"] - # Specify the clinical trial registry source as ClinicalTrials.Gov - registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] - # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] - # Limit the trial to a specific recruitment status - registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] - - # Construct ClinicalTrial instance and attach the registry filter to it. - clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) - - # Create TrialMatcherRequest - configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) - trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) - - # Health Insights Trial match trials - try: - poller = trial_matcher_client.begin_match_trials(trial_matcher_data) - trial_matcher_result = poller.result() - self.print_results(trial_matcher_result) - except Exception as ex: - print(str(ex)) - return - - # print match trials (eligible/ineligible) - def print_results(self, trial_matcher_result): - if trial_matcher_result.status == JobStatus.SUCCEEDED: - tm_results = trial_matcher_result.results - for patient_result in tm_results.patients: - print(f"Inferences of Patient {patient_result.id}") - for tm_inferences in patient_result.inferences: - print(f"Trial Id {tm_inferences.id}") - print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") - print(f"Description {tm_inferences.description}") - else: - tm_errors = trial_matcher_result.errors - if tm_errors is not None: - for error in tm_errors: - print(f"{error.code} : {error.message}") - - -if __name__ == "__main__": - sample = HealthInsightsSamples() - sample.match_trials() - diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py deleted file mode 100644 index 5fbcb835da11..000000000000 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/samples/sample_match_trials_unstructured_clinical_note.py +++ /dev/null @@ -1,248 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -import asyncio -import os -import datetime - -from azure.core.credentials import AzureKeyCredential -from azure.healthinsights.clinicalmatching.models import * # type: ignore # pylint: disable=ungrouped-imports -from azure.healthinsights.clinicalmatching.aio import ClinicalMatchingClient - -""" -FILE: sample_match_trials_unstructured_clinical_note.py - -DESCRIPTION: - Finding potential eligible trials for a patient, provided as unstructured clinical note, and - understanding Trial Matcher inferences. - - Trial Matcher model matches a single patient, whom the clinical health information is - provided in an unstructured clinical note. The conclusion of the Trial Matcher decision - support model is a list of inferences made regarding the patient. For each trial that was - queried for the patient, the model will return and indication of whether the patient appears - eligible or ineligible for the trial. If the model concluded the patient is ineligible for a - trial, it will also provide a evidence to support its conclusion. - This use case will demonstrate: - a. How to use the trial matcher when patient clinical health information is provided to the - Trial Matcher as an unstructured clinical note. - b. How to handle Trial Matcher inferences regarding the patient and retrieving evidence - information. - - -USAGE: - python sample_match_trials_unstructured_clinical_note.py - - Set the environment variables with your own values before running the sample: - 1) HEALTHINSIGHTS_KEY - your source from Health Insights API key. - 2) HEALTHINSIGHTS_ENDPOINT - the endpoint to your source Health Insights resource. -""" - - -class HealthInsightsSamples: - async def match_trials(self): - KEY = os.getenv("HEALTHINSIGHTS_KEY") or "0" - ENDPOINT = os.getenv("HEALTHINSIGHTS_ENDPOINT") or "0" - - # Create an Trial Matcher client - # - trial_matcher_client = ClinicalMatchingClient(endpoint=ENDPOINT, - credential=AzureKeyCredential(KEY)) - # - - # - patient_data_list = [PatientDocument(type=DocumentType.NOTE, id="12-consult_15", - content=DocumentContent(source_type=DocumentContentSourceType.INLINE, - value=self.get_patient_doc_content()))] - - # - - # Construct Patient - # - patient_info = PatientInfo(sex=PatientInfoSex.MALE, birth_date=datetime.date(1965, 12, 26)) - patient1 = PatientRecord(id="patient_id", info=patient_info, data=patient_data_list) - # - - # Create registry filter - registry_filters = ClinicalTrialRegistryFilter() - # Limit the trial to a specific patient condition ("Non-small cell lung cancer") - registry_filters.conditions = ["non small cell lung cancer (nsclc)"] - # Specify the clinical trial registry source as ClinicalTrials.Gov - registry_filters.sources = [ClinicalTrialSource.CLINICALTRIALS_GOV] - # Limit the clinical trial to a certain location, in this case California, USA - registry_filters.facility_locations = [GeographicLocation(country_or_region="United States", city="Gilbert", state="Arizona")] - # Limit the trial to a specific recruitment status - registry_filters.recruitment_statuses = [ClinicalTrialRecruitmentStatus.RECRUITING] - - # Construct ClinicalTrial instance and attach the registry filter to it. - clinical_trials = ClinicalTrials(registry_filters=[registry_filters]) - - # Create TrialMatcherRequest - configuration = TrialMatcherModelConfiguration(clinical_trials=clinical_trials) - trial_matcher_data = TrialMatcherData(patients=[patient1], configuration=configuration) - - # Health Insights Trial match trials - try: - poller = await trial_matcher_client.begin_match_trials(trial_matcher_data) - trial_matcher_result = await poller.result() - self.print_results(trial_matcher_result) - except Exception as ex: - print(str(ex)) - return - - # print match trials (eligible/ineligible) - def print_results(self, trial_matcher_result): - if trial_matcher_result.status == JobStatus.SUCCEEDED: - tm_results = trial_matcher_result.results - for patient_result in tm_results.patients: - print(f"Inferences of Patient {patient_result.id}") - for tm_inferences in patient_result.inferences: - print(f"Trial Id {tm_inferences.id}") - print(f"Type: {str(tm_inferences.type)} Value: {tm_inferences.value}") - print(f"Description {tm_inferences.description}") - else: - tm_errors = trial_matcher_result.errors - if tm_errors is not None: - for error in tm_errors: - print(f"{error.code} : {error.message}") - - def get_patient_doc_content(self) -> str: - content = "TITLE: Cardiology Consult\r\n DIVISION OF CARDIOLOGY\r\n " \ - " COMPREHENSIVE CONSULTATION NOTE\r\nCHIEF " \ - "COMPLAINT: Patient is seen in consultation today at the\r\nrequest of Dr. [**Last Name (STitle) " \ - "13959**]. We are asked to give consultative advice\r\nregarding evaluation and management of Acute " \ - "CHF.\r\nHISTORY OF PRESENT ILLNESS:\r\n71 year old man with CAD w/ diastolic dysfunction, CKD, " \ - "Renal\r\nCell CA s/p left nephrectomy, CLL, known lung masses and recent\r\nbrochial artery bleed, " \ - "s/p embolization of LLL bronchial artery\r\n[**1-17**], readmitted with hemoptysis on [" \ - "**2120-2-3**] from [**Hospital 328**] [**Hospital 9250**]\r\ntransferred from BMT floor following " \ - "second episode of hypoxic\r\nrespiratory failure, HTN and tachycardia in 3 days. Per report," \ - "\r\non the evening of transfer to the [**Hospital Unit Name 1**], patient continued to\r\nremain " \ - "tachypnic in upper 30s and was receiving IVF NS at\r\n100cc/hr for concern of hypovolemic " \ - "hypernatremia. He also had\r\nreceived 1unit PRBCs with temp rise for 98.3 to 100.4, " \ - "he was\r\ncultured at that time, and transfusion rxn work up was initiated.\r\nAt around 5:30am, " \ - "he was found to be newly hypertensive with SBP\r\n>200 with a regular tachycardia to 160 with new " \ - "hypoxia requiring\r\nshovel mask. He received 1mg IV ativan, 1mg morphine, lasix 40mg\r\nIV x1, " \ - "and lopressor 5mg IV. ABG 7.20/63/61 on shovel mask. He\r\nwas transferred to the ICU for further " \ - "care. On arrival to the\r\n[**Hospital Unit Name 1**], he received 5mg IV Dilt and was found to be " \ - "febrile to\r\n101.3. Blood and urine cultures were draw. He was placed on BIPAP\r\n12/5 with " \ - "improvement in his respiratory rate and sats. Repeat\r\nABG 7.43/34/130.\r\nOvernight, " \ - "he continued to be tachycardic, with stable O2 sats.\r\nHe was treated for agitation with haldol, " \ - "as well as IV beta\r\nblockers, with some improvement in his heart rate to the 80s at\r\nrest. He " \ - "has and continues to deny symptoms of chest pain. When\r\nassessed, he grunted responses to " \ - "questions, and was non-verbal.\r\nOn cardiac review of symptoms, no chest pain or other " \ - "discomfort.\r\nFurther questions limited by mental status.\r\nPAST MEDICAL HISTORY:\r\nCLL x 20 " \ - "yrs\r\n-s/p fludarabine and Cytoxan ([**7-14**]) with good response\r\n-auto-immune hemolytic " \ - "anemia on chronic steroids\r\n-mediastinal lymphadenopathy\r\n-h/o bilat pleural effusions with + " \ - "cytology ([**6-13**])\r\nRCC s/p Left nephrectomy [**2106**]\r\nCKD: prior baseline CR 1.5, " \ - "most recently 1.1-1.2\r\nBPH vs Prostate cancer\r\n- h/o multiple prostate biopsies with only 1 " \ - "c/w adenocarcinoma\r\n([**Doctor Last Name 2470**] 3+3)\r\nGERD\r\nType II DM: -recently started " \ - "insulin\r\nR-sided Exotropia\r\nGallstone pancreatitis [**12-10**]; s/p lap " \ - "chole\r\nHyperlipidemia\r\nCAD s/p cath [**4-13**] with diffuse 2 vessel dz\r\n- 70% RCA/PDA, " \ - "60%prox/mid LAD)\r\nHypogammaglobumenia, recurrent URI/PNA, on IVIG X 2years, good\r\nresponse (" \ - "last dose [**2118-11-11**])\r\nAllergic rhinitis\r\nGilberts disease\r\nHypotesteronemia\r\nR " \ - "humeral fracture ([**12-16**])\r\nEnlarged spleen secondary to CLL vs portal " \ - "hypertension.\r\nCardiac Risk Factors include diabetes, dyslipidemia,\r\nhypertension, and family " \ - "history of CAD.\r\nHOME MEDICATIONS:\r\nAlbuterol 90 mcg 2 puffs PRN\r\nAllopurinol 100mg PO " \ - "Daily\r\nFolic Acid 2mg PO Daily\r\nInsulin Lispro Protam & Lispro As Directed\r\nMetoprolol " \ - "Succinate 25mg PO BID\r\nNitroglycerin [NitroQuick] 0.3mg SL PRN\r\nPrednisone 2mg PO " \ - "daily\r\nRosuvastatin 5mg PO daily\r\nDocusate Sodium [Colace] 100mg PO BID\r\nSenna 8.6 PO BID " \ - "PRN\r\nCURRENT MEDICATIONS:\r\nAluminum-Magnesium Hydrox.-Simethicone 15-30 mL PO/NG " \ - "QID:PRN\r\ndyspepsia\r\nAllopurinol 100 mg PO/NG DAILY\r\nAlbuterol 0.083% Neb Soln 1 NEB IH " \ - "Q6H:PRN\r\nBisacodyl 10 mg PO/PR DAILY:PRN constipation\r\nCaphosol 30 mL ORAL QID:PRN dry " \ - "mouth\r\nDextrose 50% 12.5 gm IV PRN hypoglycemia\r\nDocusate Sodium 100 mg PO BID\r\nFamotidine " \ - "20 mg IV Q24H\r\nGlucagon 1 mg IM Q15MIN:PRN\r\nGuaifenesin-Dextromethorphan 10 mL PO/NG Q6H:PRN " \ - "cough\r\nInsulin SC SS\r\nIpratropium Bromide Neb 1 NEB IH Q6H:PRN\r\nMagnesium Sulfate " \ - "Replacement (Oncology) IV Sliding Scale\r\nMetoprolol Tartrate 5 mg IV " \ - "Q6H\r\nPiperacillin-Tazobactam 2.25 g IV Q6H\r\nPotassium Chloride Replacement (Oncology) IV " \ - "Sliding\r\nHydrocortisone Na Succ. 20 mg IV Q24H\r\nSenna 1 TAB PO/NG [**Hospital1 7**]:PRN " \ - "constipation\r\nVancomycin 1000 mg IV\r\nMetoprolol Tartrate 10 mg IV Q6H\r\nDiltiazem 5 mg IV " \ - "ONCE\r\nMetoprolol Tartrate 5 mg IV ONCE\r\nFurosemide 40 mg IV " \ - "ONCE\r\nALLERGIES:\r\nNKDA\r\nSOCIAL HISTORY:\r\nMarried, lives with wife [**Name (NI) **] in [" \ - "**Location (un) 12995**]. Has long history\r\nof CLL since [**2096**]. Is a rabbi working in " \ - "academics with 30 year\r\nhistory prior to that of congregation work in [**State 1698**]. " \ - "They\r\nhave two adult children in [**Location (un) 3063**] and LA and three\r\ngrandchildren. " \ - "Life-time nonsmoker, rare EtOH, no illicit drug\r\nuse.\r\nFAMILY HISTORY:\r\nFather w/ [**Name2 (" \ - "NI) 118**] cancer and coronary artery disease. Multiple\r\nrelatives with DM.\r\nREVIEW OF " \ - "SYSTEMS: ALL OTHER SYSTEMS NEGATIVE EXCEPT AS NOTED\r\nABOVE\r\nPHYSICAL EXAMINATION\r\nVitals: " \ - "T: 97.8 degrees Farenheit (max 101.3), BP: 128/73 mmHg\r\nsupine, HR 97 bpm, RR 35 bpm, " \ - "O2: 94 % on 0.4 aerosol mask.\r\nCONSTITUTIONAL: No acute distress.\r\nEYES: No conjunctival " \ - "pallor. No icterus.\r\nENT/Mouth: MMM. OP clear.\r\nTHYROID: No thyromegaly or thyroid " \ - "nodules.\r\nCV: Nondisplaced PMI. Tachycardic. Regular rhythm. nl S1, S2. No\r\nextra heart " \ - "sounds. No appreciable murmurs. No JVD. Normal\r\ncarotid upstroke without bruits.\r\nLUNGS: " \ - "Breath sounds bilaterally. No crackles, wheezes or rhonchi\r\nappreciated.\r\nGI: NABS. Soft, NT, " \ - "ND. No HSM. No abdominal bruits.\r\nMUSCULO: Supple neck. Normal muscle tone. Full strength " \ - "grossly.\r\nHEME/LYMPH: No palpable LAD. No peripheral edema. Full distal\r\npulses " \ - "bilaterally.\r\nSKIN: Warm extremities. No rashes/lesions, ecchymoses.\r\nNEURO: Limited responses " \ - "to questions. [**Name8 (MD) 54**] RN, the patient tends\r\nto wax and wane throughout the day; at " \ - "times answering questions\r\nand conversing, at other times being more confused. Other " \ - "exam\r\ngrossly normal without any significant focal deficits\r\nPSYCH: Mood and affect were " \ - "appropriate.\r\nTELEMETRY: Sinus tachycardia at 101. Runs of sinus tachycardia\r\nto 120s, " \ - "with brief episodes of atrial tach vs AF.\r\nECG ([**2120-2-15**]): Sinus tach @ 124. Normal " \ - "Axis/intervals.\r\nDiffuse nonspecific TW flattening with inferolateral T wave\r\ninversions, " \ - "not appreciably worse, and probably better than\r\nprior. No ECG tracing available more proximal " \ - "to this admission\r\nto ICU.\r\nTRANSTHORACIC ECHOCARDIOGRAM ([**2120-1-15**]):\r\nThe left atrium " \ - "is elongated. No atrial septal defect is seen by\r\n2D or color Doppler. Left ventricular wall " \ - "thicknesses and cavity\r\nsize are normal. There is probably mild regional left " \ - "ventricular\r\nsystolic dysfunction with distal lateral/apical lateral\r\nhypokinesis . There is " \ - "no ventricular septal defect. Right\r\nventricular chamber size and free wall motion are normal. " \ - "The\r\naortic root is mildly dilated at the sinus level. The aortic\r\nvalve leaflets (3) are " \ - "mildly thickened but aortic stenosis is\r\nnot present. No aortic regurgitation is seen. The " \ - "mitral valve\r\nleaflets are mildly thickened. There is no mitral valve prolapse.\r\nTrivial " \ - "mitral regurgitation is seen. The estimated pulmonary\r\nartery systolic pressure is normal. There " \ - "is no pericardial\r\neffusion. Compared with the prior study (images reviewed) of\r\n[" \ - "**2119-1-11**], mild regional LV systolic dysfunction is new.\r\nETT ([**2114-11-13**]):\r\nThe " \ - "patient\r\nexercised for 9.5 minutes of [**Initials (NamePattern4) **] [**Last Name (NamePattern4) " \ - "84**] protocol and was stopped at\r\nrequest for fatigue. This represents an average " \ - "functional\r\ncapacity.\r\nThere were no chest, neck, back, or arm discomforts reported " \ - "by\r\npatient throughout the procedure. There were no significant ST\r\nsegment\r\nchanges at peak " \ - "exercise or during recovery. The rhythm was sinus\r\nwith\r\nrare APBs and VPBs. The hemodynamic " \ - "response to exercise was\r\nappropriate.\r\nIMPRESSION: No anginal symptoms or ischemic EKG " \ - "changes at the\r\nachieved\r\nworkload. Nuclear report sent separately. Compared to ETT " \ - "report\r\n[**2113-11-29**], there are now no EKG changes noted and the " \ - "exercise\r\ntolerance\r\nhas increased by one minute.\r\nMIBI: 1) Again noted is mild, reversible " \ - "basilar inferior wall\r\nperfusion\r\ndefect in the face of soft tissue attenuation from the " \ - "diaphragm.\r\n2) Normal\r\nleft ventricular cavity size and function.\r\nCath: [**4-13**]:\r\n1. " \ - "Coronary angiography in this right-dominant system revealed:\r\n--the LMCA had no angiographically " \ - "apparent disease.\r\n--the LAD had diffuse proximal-mid 60% stenosis\r\n--the LCX had minimal " \ - "disease\r\n--the RCA was a small vessel with a distal 70% lesion going into\r\nthe RPDA\r\n2. " \ - "Limited resting hemodynamics revealed elevated left-sided\r\nfilling pressures, with LVEDP 18 " \ - "mmHg. There was high-normal\r\nsystemic arterial systolic pressures, with SBP 134 mmHg. " \ - "There\r\nwas no significant gradient upon pullback of the angled pigtail\r\ncatheter from LV to " \ - "ascending aorta.\r\nOTHER TESTING:\r\nCXR: Worsening fluid status versus prior. Followup needed to " \ - "see\r\nairspace processes track with CHF or are independent and in the\r\nlatter\r\nsituation " \ - "could represent pneumonia.\r\nLABORATORY DATA: Reviewed in OMR\r\nASSESSMENT AND PLAN:\r\n71 year " \ - "old man with complicated medical history including CAD w/\r\ndiastolic dysfunction, CKD, " \ - "Renal Cell CA s/p left nephrectomy,\r\nCLL, known lung masses and recent brochial artery bleed, " \ - "who has\r\nhad a complicated hospital course including s/p embolization of\r\nLLL bronchial artery " \ - "[**1-17**], readmitted with hemoptysis on [**2120-2-3**]\r\nfrom [**Hospital 328**] Rehab, " \ - "and is now transferred from BMT floor for a\r\nsecond episode of hypoxic respiratory failure, " \ - "HTN and\r\ntachycardia in 3 days. Although details with regard to the\r\ninitiating event last " \ - "night are limited by difficulty with\r\nobtaining a history, review of his relevant data indicates " \ - "that\r\nventilatory failure as indicated by his elevated PCO2 appears to\r\nhave played a " \ - "significant role. He clearly has a history of\r\nobstructive coronary artery disease, and likely " \ - "had some element\r\nof diastolic dysfunction in the setting of his " \ - "acute\r\ntachycardia/hypoxia/hypertensive episode yesterday, although\r\nthere is no obvious " \ - "indication that his CAD was a primary cause\r\nof these events based on the history (an ECG from " \ - "the peri-event\r\nwould be helpful, but non-specific). According to his RN, he has\r\nnot had " \ - "excess secretions today, although he has a new fever and\r\nWBC, which indicates that he could " \ - "have had some mucous plugging\r\nin the setting of a new PNA, which is currently being " \ - "treated\r\nwith antibiotics. Otherwise, would not diurese him any further\r\nas he looks quite " \ - "dry by exam and labs. Would try gentle\r\nhydration, and monitor his volume status closely. I'm " \ - "not sure\r\nthat a TTE will shed a whole lot more light on the current\r\nsituation, but it will " \ - "at least assess any myocardial damage he\r\nmight have sustained.\r\nRecs:\r\n--Continue beta " \ - "blocker as you are\r\n--Hold diuretics, start gentle IV hydration, close monitor " \ - "of\r\nhemodynamics\r\n--Obtain an ECG, monitor for any new changes\r\n--Consider pulmonary causes " \ - "(decreased alveolar ventilation) for hypoxia\r\nThe Assessment and Plan will be reviewed with Dr. " \ - "[**Last Name (STitle) 5550**] in\r\nmulti- disciplinary rounds. Please see his/her note in " \ - "the\r\n[**Hospital 7382**] medical record for further comments and\r\nrecommendations. Thank you " \ - "for allowing us to participate in the\r\ncare of this patient. Please feel free to contact us with " \ - "any\r\nquestions or concerns.\r\n"; - return content - - -async def main(): - sample = HealthInsightsSamples() - await sample.match_trials() - - -if __name__ == "__main__": - asyncio.run(main()) diff --git a/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py index 243ee36d3f01..9bf495118a11 100644 --- a/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py +++ b/sdk/healthinsights/azure-healthinsights-clinicalmatching/setup.py @@ -13,7 +13,7 @@ PACKAGE_NAME = "azure-healthinsights-clinicalmatching" -PACKAGE_PPRINT_NAME = "None" +PACKAGE_PPRINT_NAME = "Cognitive Services Health Insights Clinical Matching" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace("-", "/") From 9625f91078c316b1e4ee9d1776a40273a86e098f Mon Sep 17 00:00:00 2001 From: Asaf Levi Date: Thu, 30 Mar 2023 02:10:52 +0300 Subject: [PATCH 17/17] fix readme broken links --- .../azure-healthinsights-cancerprofiling/README.md | 4 ++-- .../azure-healthinsights-clinicalmatching/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md index e461bcc6d37c..5e5450047f19 100644 --- a/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md +++ b/sdk/healthinsights/azure-healthinsights-cancerprofiling/README.md @@ -292,11 +292,11 @@ additional questions or comments. [azure_core]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html#module-azure.core.exceptions [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ [azure_sub]: https://azure.microsoft.com/free/ -[azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights + [azure_cli]: https://learn.microsoft.com/cli/azure/ [cancer_profiling_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/overview?branch=main [cancer_profiling_api_documentation]: https://review.learn.microsoft.com/rest/api/cognitiveservices/healthinsights/onco-phenotype?branch=healthin202303 -[hi_pypi]: https://pypi.org/project/azure-healthinsights-cancerprofiling/ + [product_docs]:https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/oncophenotype/?branch=main [azure_cli]: https://learn.microsoft.com/cli/azure/ [clinical_matching_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/trial-matcher/overview?branch=main -[hi_pypi]: https://pypi.org/project/azure-healthinsights-clinicalmatching/ + [product_docs]: https://review.learn.microsoft.com/azure/cognitive-services/health-decision-support/trial-matcher/?branch=main [clinical_matching_api_documentation]: https://review.learn.microsoft.com/rest/api/cognitiveservices/healthinsights/trial-matcher?branch=healthin202303