Schema reference / Tables / view MDX source
attachment
Base StructureDefinition for Attachment Type: For referring to data content defined in other formats.
Base StructureDefinition for Attachment Type: For referring to data content defined in other formats.
Source
| Model | Leg | Role |
|---|---|---|
Attachment | FHIR | defines this table |
openEHR-EHR-CLUSTER.media_file.v1 | openEHR | merged in — Media file |
This table is the union of 2 source models. Columns carrying a From value came from a model that merged into it, so the same row satisfies both specifications.
Columns
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Attachment.id | — | — |
created_at | timestamptz | no | Row creation timestamp. | — | — |
updated_at | timestamptz | no | Row update timestamp; maintained by the application. | — | — |
created_by | text | no | Actor who created the row. | — | — |
updated_by | text | no | Actor who last updated the row. | — | — |
media_type | text | no | Mime type of the content, with charset etc. | — | Attachment.contentType |
language | text | yes | Human language of the content (BCP-47) | — | Attachment.language |
content | bytea | yes | Data inline, base64ed | — | Attachment.data |
uri | text | yes | Uri where the data can be found | — | Attachment.url |
size | integer | yes | Number of bytes of content (if url provided) | — | Attachment.size |
hash | bytea | yes | Hash of the data (sha-1, base64ed) | — | Attachment.hash |
title | text | yes | Label to display in place of the data | — | Attachment.title |
creation | timestamptz | yes | Date attachment was first created | — | Attachment.creation |
description | text | yes | Description | openEHR-EHR-CLUSTER.media_file.v1 | /items[at0005] |
comment | text | yes | Comment | openEHR-EHR-CLUSTER.media_file.v1 | /items[at0007] |
identifier_valueidentifier_system | text, texttext, text | yes | Identifier | openEHR-EHR-CLUSTER.media_file.v1 | /items[at0010] |
Constraints
check (identifier_system is null or identifier_value is not null)
check (num_nonnulls(content, uri) = 1)Referenced by
19 tables reference attachment, via digital_representation. The first 15 alphabetically:
advance_care_directiveviadigital_representationadverse_reaction_event_reaction_detailsviaattachment_idanatomical_location_multimedia_representationviaattachment_idanatomical_location_circle_multimedia_representationviaattachment_idanatomical_location_relative_multimedia_representationviaattachment_idclinical_evidence_multimedia_representationviaattachment_iddocument_reference_contentviaattachmentecg_result_multimedia_representationviaattachment_idembryo_assessment_image_representationviaattachment_idfamily_history_multimediaviaattachment_idimaging_exam_result_report_representationviaattachment_idlaboratory_test_result_multimedia_representationviaattachment_idpersonviaphotoprocedure_multimediaviaattachment_idpulse_oximetry_multimedia_imageviaattachment_id