Hey Josh, yeah you'll see the mix of scope syntaxes if you have APIs of mixed FHIR versions chosen. We standardized the syntax for R4 (and maybe STU3?) but not DSTU2.
Main showstopping issue at this point is that the Epic MyChart approval screen has no way to prompt a user about whether they want to share imaging data. It'd be good to build out this support or some flexibility for Epic sites to add it as an extension within their own deployments.
Hmm, one strange behavior I'm seeing when I try to use a Backend Services token to resolve information about the Patient and user (RelatedPerson) associated with a launch:
Fetching "RelatedPerson" fails
curl https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/RelatedPerson/e7HX4h-dgVCK1nrPaxurPiNMmumY.H07djk.qfouVJKE3 \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ1cm46b2lkOmZoaXIiLCJjbGllbnRfaWQiOiJlMjc0ODQ0NS03MmUzLTQxNjAtODAxMS0wZmE1MjZjNjE2YTUiLCJlcGljLmVjaSI6InVybjplcGljOk9wZW4uRXBpYy1jdXJyZW50IiwiZXBpYy5tZXRhZGF0YSI6IjhKR25rcDdxT3NyNkpZcWRiV004UExlSFg3Z2VJa3NWR25mM3RRaWo5bnF4ZXhXNjhfbFU4cGNnUGtFS0ZNbmtmVHZoc3ozNnUwWmdDWG5HUGY3bHdLVy1oZEx5c2ctbXh5YUlBeEhJVGxTaUk5TUpMZEw0TkRENDRPdnlvSW5aIiwiZXBpYy50b2tlbnR5cGUiOiJhY2Nlc3MiLCJleHAiOjE2NDIwMjMwMjIsImlhdCI6MTY0MjAxOTQyMiwiaXNzIjoidXJuOm9pZDpmaGlyIiwianRpIjoiMzVhZThlMjctYzc3Yi00MTNkLThjYTEtZGU1MWRlZWY5YjYxIiwibmJmIjoxNjQyMDE5NDIyLCJzdWIiOiJleGZvNkU0RVhqV3NuaEExT0dWRWxndzMifQ.fb8br2lWU8b2O8-EXAWzPEYHyjLgYqy9gNl8ooQ4D5h0SDG8v2n0skihNm7RbrZmN96dQ6ll0Aaj4W4wyH3eQpFj5UzIxkcboVJYHouBDY7FzTPukd3GMbHnyBqq9-moA4YRDsxnOssUNoMFBh8APzpf3Xf43eGYYiueyAnas7QMGMrjeWAzLMjkj6k7S1-ZfqTK2Y_qrJLbO0u6Uw7DRlEK784ORPH4dl4AqxlGVPgAjIm2m9hk0HDP9nRcUDFmvtzprNWVm6eYEhpgwpn0dKpxFeZlPxCNWH5NdbTZyfWPESVYJvn9x7QQlBa6pF9d5dx2gYErDOeTrnI95FmU3w"
<OperationOutcome xmlns="http://hl7.org/fhir"><issue><severity value="fatal" /><code value="processing" /><details><coding><system value="urn:oid:1.2.840.114350.1.13.0.1.7.2.657369" /><code value="4118" /><display value="The authenticated user is not authorized to view the requested data." /></coding><text value="The authenticated user is not authorized to view the requested data." /></details></issue></OperationOutcome>