-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add fhir document reference resource model (#419)
- Loading branch information
Showing
3 changed files
with
298 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
package domain | ||
|
||
// FHIRDocumentReference represents a reference to a document of any kind for any purpose. | ||
// It provides metadata about the document so that the document can be discovered and managed. | ||
// The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient centric documents like policy text. | ||
type FHIRDocumentReference struct { | ||
ID string `json:"id,omitempty"` | ||
Meta *FHIRMeta `json:"meta,omitempty"` | ||
ImplicitRules *string `json:"implicitRules,omitempty"` | ||
Language *string `json:"language,omitempty"` | ||
Text *FHIRNarrative `json:"text,omitempty"` | ||
Extension []FHIRExtension `json:"extension,omitempty"` | ||
ModifierExtension []FHIRExtension `json:"modifierExtension,omitempty"` | ||
MasterIdentifier *FHIRIdentifier `json:"masterIdentifier,omitempty"` | ||
Identifier []FHIRIdentifier `json:"identifier,omitempty"` | ||
Status DocumentReferenceStatusEnum `json:"status,omitempty"` | ||
DocStatus *CompositionStatusEnum `json:"docStatus,omitempty"` | ||
Type *FHIRCodeableConcept `json:"type,omitempty"` | ||
Category []FHIRCodeableConcept `json:"category,omitempty"` | ||
Subject *FHIRReference `json:"subject,omitempty"` | ||
Date *string `json:"date,omitempty"` | ||
Author []FHIRReference `json:"author,omitempty"` | ||
Authenticator *FHIRReference `json:"authenticator,omitempty"` | ||
Custodian *FHIRReference `json:"custodian,omitempty"` | ||
RelatesTo []FHIRDocumentReferenceRelatesTo `json:"relatesTo,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
SecurityLabel []FHIRCodeableConcept `json:"securityLabel,omitempty"` | ||
Content []FHIRDocumentReferenceContent `json:"content,omitempty"` | ||
Context *FHIRDocumentReferenceContext `json:"context,omitempty"` | ||
} | ||
|
||
// FHIRDocumentReferenceRelatesTo specifies how this document reference is related to other resources, | ||
// such as being a replacement for, transformation of, or addition to another document reference. | ||
type FHIRDocumentReferenceRelatesTo struct { | ||
ID string `json:"id,omitempty"` | ||
Extension []Extension `json:"extension,omitempty"` | ||
ModifierExtension []Extension `json:"modifierExtension,omitempty"` | ||
Code DocumentRelationshipTypeEnum `json:"code"` | ||
Target Reference `json:"target"` | ||
} | ||
|
||
// FHIRDocumentReferenceContent describes the content of the document, including the document itself as an attachment, and potentially its format. | ||
type FHIRDocumentReferenceContent struct { | ||
ID string `json:"id,omitempty"` | ||
Extension []Extension `json:"extension,omitempty"` | ||
ModifierExtension []Extension `json:"modifierExtension,omitempty"` | ||
Attachment FHIRAttachment `json:"attachment"` | ||
Format *FHIRCoding `json:"format,omitempty"` | ||
} | ||
|
||
// FHIRDocumentReferenceContext provides the clinical context in which the document was created, such as encounter, period, practice setting. | ||
type FHIRDocumentReferenceContext struct { | ||
ID string `json:"id,omitempty"` | ||
Extension []Extension `json:"extension,omitempty"` | ||
ModifierExtension []Extension `json:"modifierExtension,omitempty"` | ||
Encounter []Reference `json:"encounter,omitempty"` | ||
Event []FHIRCodeableConcept `json:"event,omitempty"` | ||
Period *FHIRPeriod `json:"period,omitempty"` | ||
FacilityType *FHIRCodeableConcept `json:"facilityType,omitempty"` | ||
PracticeSetting *FHIRCodeableConcept `json:"practiceSetting,omitempty"` | ||
SourcePatientInfo *Reference `json:"sourcePatientInfo,omitempty"` | ||
Related []Reference `json:"related,omitempty"` | ||
} | ||
|
||
// FHIRDocumentReferenceInput is the input type for FHIRDocumentReference | ||
type FHIRDocumentReferenceInput struct { | ||
ID string `json:"id,omitempty"` | ||
Meta *FHIRMetaInput `json:"meta,omitempty"` | ||
ImplicitRules *string `json:"implicitRules,omitempty"` | ||
Language *string `json:"language,omitempty"` | ||
Text *FHIRNarrativeInput `json:"text,omitempty"` | ||
Extension []FHIRExtension `json:"extension,omitempty"` | ||
ModifierExtension []FHIRExtension `json:"modifierExtension,omitempty"` | ||
MasterIdentifier *FHIRIdentifierInput `json:"masterIdentifier,omitempty"` | ||
Identifier []FHIRIdentifierInput `json:"identifier,omitempty"` | ||
Status DocumentReferenceStatusEnum `json:"status,omitempty"` | ||
DocStatus *CompositionStatusEnum `json:"docStatus,omitempty"` | ||
Type *FHIRCodeableConceptInput `json:"type,omitempty"` | ||
Category []FHIRCodeableConceptInput `json:"category,omitempty"` | ||
Subject *FHIRReferenceInput `json:"subject,omitempty"` | ||
Date *string `json:"date,omitempty"` | ||
Author []FHIRReferenceInput `json:"author,omitempty"` | ||
Authenticator *FHIRReferenceInput `json:"authenticator,omitempty"` | ||
Custodian *FHIRReferenceInput `json:"custodian,omitempty"` | ||
RelatesTo []FHIRDocumentReferenceRelatesTo `json:"relatesTo,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
SecurityLabel []FHIRCodeableConceptInput `json:"securityLabel,omitempty"` | ||
Content []FHIRDocumentReferenceContent `json:"content,omitempty"` | ||
Context *FHIRDocumentReferenceContext `json:"context,omitempty"` | ||
} |