Where should we store images on a Coverage resourc...
# support
o
When creating coverage resources, we would like to store the front and back of the insurance card as base64. I assume the images should go on the Coverage rather than the Patient or RelatedPerson etc. If this is correct, where in the coverage would we do so? What field? Thanks!
j
@oscadev You could use DocumentReference + Binary + Coverage together to achieve this
r
The Coverage resource itself does not support storing images directly. Instead, use the [DocumentReference](https://build.fhir.org/documentreference.html) resource to store images, such as insurance card photos. Link the DocumentReference to the Coverage using the
DocumentReference.context.related
element. Additionally, the [Binary](https://www.medplum.com/docs/api/fhir/resources/binary) resource can store the base64 image data, referenced via the
.url
field in DocumentReference. For detailed implementation, refer to [this guide](https://www.medplum.com/docs/billing/patient-insurance#storing-insurance-card-photos). https://www.medplum.com/docs/billing/patient-insurance#storing-insurance-card-photos
o
@reshma @joshua_kelly thanks a lot, that solved it. The only issue is that it seems to only link in one direction, meaning someone can lookup a card image document resource and see the coverage it is linked to, but there doesnt seem to be a way to look at a coverage resource and see the linked document references. If there is no way around that, I guess we can build a UI that does show the linked cards, a patient, and coverage all together.
r
UI that groups the resources (your plan) is the way to go.
159 Views