Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized bulkdata Conformance elements #107

Open
sydneypemberton1986 opened this issue Oct 1, 2021 · 0 comments
Open

Unrecognized bulkdata Conformance elements #107

sydneypemberton1986 opened this issue Oct 1, 2021 · 0 comments

Comments

@sydneypemberton1986
Copy link

sydneypemberton1986 commented Oct 1, 2021

We are trying to use this library and are having trouble parsing Epic's conformance statement.

def test_use_smart_fhirclient() -> None:
    """We would like to replace our working FHIR auth code with `smart-on-fhir`'s
    `fhirclient` package.

    Unfortunately, [Epic's Conformance][1] elements of type [group export][2] are not
    recognized by this library.

    These can be hacked around by editing the library to set `strict=False` for the
    constructors of `CapabilityStatement` and `CapabilityStatementRestResource`.
    Even after setting those we are getting  getting a 401, so perhaps our code is
    simply off.

    [1]: https://apporchard.epic.com/interconnect-aocurprd-oauth/api/FHIR/R4/metadata
    [2]: http://hl7.org/fhir/uv/bulkdata/OperationDefinition/group-export
    """

    from fhirclient.client import FHIRClient
    from fhirclient.models.encounter import Encounter

    settings = {
        "app_id": get_client_id(),  # a UUID provided by Epic AppOrchard
        "app_secret": get_private_key(),  # an RSA private key
        "api_base": "https://apporchard.epic.com/interconnect-aocurprd-oauth/api/FHIR/R4"
    }
    client = FHIRClient(settings=settings)
    client.prepare()

    encounter_id = "encounter1"  # our code uses an actual valid encounter id
    Encounter.read(encounter_id, client.server)

Running this gives following error during prepare:

Non-optional property "interaction" on <models.capabilitystatement.CapabilityStatementRestResource object at 0x10a9d14c0> is missing'
Superfluous entry "operation" in data for <models.capabilitystatement.CapabilityStatementRestResource object at 0x10a9d14c0>
Non-optional property "acceptUnknown" on <models.capabilitystatement.CapabilityStatement object at 0x10a862970> is missing'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant