document_reference

Maximal set merged from: http://hl7.org/fhir/us/core/StructureDefinition/us-core-adi-documentreference, http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference

Maximal set merged from: http://hl7.org/fhir/us/core/StructureDefinition/us-core-adi-documentreference, http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference

Source

ModelLegRole
us-core-adi-documentreference+us-core-documentreferenceFHIRdefines this table

Columns

ColumnTypeNullDescriptionSource
iduuid primary keynoDocumentReference.id
created_attimestamptznoRow creation timestamp.
updated_attimestamptznoRow update timestamp; maintained by the application.
created_bytextnoActor who created the row.
updated_bytextnoActor who last updated the row.
master_identifier_value
master_identifier_system
text, text
text, text
yesMaster Version Specific IdentifierDocumentReference.masterIdentifier
identifier_value
identifier_system
text, text
text, text
yesOther identifiers for the documentDocumentReference.identifier
statustextyescurrent | superseded | entered-in-errorDocumentReference.status
doc_statustextyespreliminary | final | amended | entered-in-errorDocumentReference.docStatus
type
type_code
type_system
type_valueset_id
coded text
text, text, text, text
yesKind of document (LOINC if possible)DocumentReference.type
subject_device_id
subject_patient_id
subject_practitioner_id
uuid, uuid, uuid
uuid, uuid, uuid
yesWho/what is the subject of the documentDocumentReference.subject
datetimestamptzyesWhen this document reference was createdDocumentReference.date
authenticator_organization_id
authenticator_practitioner_id
authenticator_practitioner_role_id
uuid, uuid, uuid
uuid, uuid, uuid
yesWho/what authenticated the documentDocumentReference.authenticator
custodian_iduuidyesOrganization which maintains the documentDocumentReference.custodian
descriptiontextyesHuman-readable descriptionDocumentReference.description
context_period_start
context_period_end
timestamptz, timestamptz
timestamptz, timestamptz
yesTime of service that is being documentedDocumentReference.context.period

Constraints

check (master_identifier_system is null or master_identifier_value is not null)
check (identifier_system is null or identifier_value is not null)
check ((type is null and type_code is null and type_system is null and type_valueset_id is null) or (type is not null and type_code is not null and type_system is not null and type_valueset_id is not null))
check (num_nonnulls(subject_device_id, subject_patient_id, subject_practitioner_id) <= 1)
check (num_nonnulls(authenticator_organization_id, authenticator_practitioner_id, authenticator_practitioner_role_id) <= 1)
check (context_period_start is null or context_period_end is null or context_period_start <= context_period_end)

References

ColumnsTargetOn delete
type_valueset_id, type_code, type_system, typevalueset_coderestrict
subject_device_iddeviceno action
subject_patient_idpatientno action
subject_practitioner_idpractitionerno action
authenticator_organization_idorganizationno action
authenticator_practitioner_idpractitionerno action
authenticator_practitioner_role_idpractitioner_roleno action
custodian_idorganizationno action

Referenced by

Indexes

Child tables

7 tables hang off document_reference, one row per repetition.

document_reference_other_identifier

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
identifier_valuetextno
identifier_systemtextyes
identifier_usetextyes
valid_fromtimestamptzyes
valid_untiltimestamptzyes

Unique

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade

document_reference_category

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
category
category_code
category_system
text, text, text
text, text, text
yesCategorization of documentDocumentReference.category

Constraints

check ((category_code is null and category_system is null) or (category_code is not null and category_system is not null))

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade

Indexes

document_reference_author

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
device_id
organization_id
patient_id
practitioner_id
practitioner_role_id
related_person_id
uuid, uuid, uuid, uuid, uuid, uuid
uuid, uuid, uuid, uuid, uuid, uuid
yesWho and/or what authored the documentDocumentReference.author

Constraints

check (num_nonnulls(device_id, organization_id, patient_id, practitioner_id, practitioner_role_id, related_person_id) = 1)

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade
device_iddeviceno action
organization_idorganizationno action
patient_idpatientno action
practitioner_idpractitionerno action
practitioner_role_idpractitioner_roleno action
related_person_idrelated_personno action

Indexes

document_reference_relates_to

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
codetextyesreplaces | transforms | signs | appendsDocumentReference.relatesTo.code
target_iduuidyesTarget of the relationshipDocumentReference.relatesTo.target

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade
target_iddocument_referenceno action

Indexes

document_reference_security_label

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
security_label
security_label_code
security_label_system
text, text, text
text, text, text
yesDocument security-tagsDocumentReference.securityLabel

Constraints

check ((security_label_code is null and security_label_system is null) or (security_label_code is not null and security_label_system is not null))

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade

Indexes

document_reference_content

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
attachmentuuidattachmentyesWhere to access the documentDocumentReference.content.attachment
format
format_code
format_system
text, text, text
text, text, text
yesFormat/content rules for the documentDocumentReference.content.format

Constraints

check ((format_code is null and format_system is null) or (format_code is not null and format_system is not null))

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade
attachmentattachmentrestrict

Indexes

document_reference_encounter

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
document_reference_iduuiddocument_referenceno
encounter_iduuidnoContext of the document contentDocumentReference.context.encounter

Unique

References

ColumnsTargetOn delete
document_reference_iddocument_referencecascade
encounter_idencounterno action

Indexes

Value sets

Value setCodes
http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1115.410