Skip to content

Commit ed5c68e

Browse files
import fhir resources from package __init__
1 parent ae9b775 commit ed5c68e

8 files changed

Lines changed: 24 additions & 9 deletions

File tree

gateway-api/src/fhir/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
"""FHIR data types and resources."""
22

3-
from .resources import OperationOutcome, Parameters, Patient
3+
from .elements import Issue, IssueCode, IssueSeverity
4+
from .resources import (
5+
Bundle,
6+
Device,
7+
Endpoint,
8+
OperationOutcome,
9+
Parameters,
10+
Patient,
11+
Resource,
12+
)
413

514
__all__ = [
15+
"Bundle",
16+
"Device",
17+
"Endpoint",
18+
"Issue",
19+
"IssueCode",
20+
"IssueSeverity",
621
"OperationOutcome",
722
"Parameters",
823
"Patient",
24+
"Resource",
925
]

gateway-api/src/gateway_api/common/error.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
from dataclasses import dataclass
33
from http.client import BAD_GATEWAY, BAD_REQUEST, INTERNAL_SERVER_ERROR, NOT_FOUND
44

5-
from fhir.elements import Issue, IssueCode, IssueSeverity
6-
from fhir.resources import OperationOutcome
5+
from fhir import Issue, IssueCode, IssueSeverity, OperationOutcome
76

87

98
@dataclass

gateway-api/src/gateway_api/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import TYPE_CHECKING
66

77
if TYPE_CHECKING:
8-
from fhir.resources import Patient
8+
from fhir import Patient
99

1010
from requests import Response
1111

gateway-api/src/gateway_api/get_structured_record/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections.abc import Mapping
22
from typing import ClassVar
33

4-
from fhir.resources import Parameters
4+
from fhir import Parameters
55

66
# TODO: may be able to remove the use of the FHIR type entirely.
77
from flask.wrappers import Request

gateway-api/src/gateway_api/pds/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from collections.abc import Callable
2424

2525
import requests
26-
from fhir.resources import Patient
26+
from fhir import Patient
2727
from pydantic import ValidationError
2828

2929
from gateway_api.common.error import PdsRequestFailedError

gateway-api/src/gateway_api/pds/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from uuid import UUID, uuid4
77

88
import pytest
9-
from fhir.resources import Patient
9+
from fhir import Patient
1010
from pytest_mock import MockerFixture
1111

1212
from gateway_api.common.error import PdsRequestFailedError

gateway-api/src/gateway_api/sds/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from enum import StrEnum
1313
from typing import Any
1414

15-
from fhir.resources import Bundle, Device, Endpoint, Resource
15+
from fhir import Bundle, Device, Endpoint, Resource
1616
from stubs import SdsFhirApiStub
1717

1818
from gateway_api.get_structured_record import ACCESS_RECORD_STRUCTURED_INTERACTION_ID

gateway-api/src/gateway_api/test_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Any
44

55
import pytest
6-
from fhir.resources import Patient
6+
from fhir import Patient
77
from flask import Request
88
from pytest_mock import MockerFixture
99

0 commit comments

Comments
 (0)