Skip to content

Commit

Permalink
updated models with ResourceRef function (which can be used in interf…
Browse files Browse the repository at this point in the history
…ace/
  • Loading branch information
AnalogJ committed Sep 1, 2022
1 parent b63ab06 commit f396a92
Show file tree
Hide file tree
Showing 296 changed files with 1,776 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fhir401/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ type AccountGuarantor struct {
OnHold *bool `bson:"onHold,omitempty" json:"onHold,omitempty"`
Period *Period `bson:"period,omitempty" json:"period,omitempty"`
}

// This function returns resource reference information
func (r Account) ResourceRef() (string, *string) {
return "Account", r.Id
}

type OtherAccount Account

// MarshalJSON marshals the given Account as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/activityDefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ type ActivityDefinitionDynamicValue struct {
Path string `bson:"path" json:"path"`
Expression Expression `bson:"expression" json:"expression"`
}

// This function returns resource reference information
func (r ActivityDefinition) ResourceRef() (string, *string) {
return "ActivityDefinition", r.Id
}

type OtherActivityDefinition ActivityDefinition

// MarshalJSON marshals the given ActivityDefinition as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/adverseEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ type AdverseEventSuspectEntityCausality struct {
Author *Reference `bson:"author,omitempty" json:"author,omitempty"`
Method *CodeableConcept `bson:"method,omitempty" json:"method,omitempty"`
}

// This function returns resource reference information
func (r AdverseEvent) ResourceRef() (string, *string) {
return "AdverseEvent", r.Id
}

type OtherAdverseEvent AdverseEvent

// MarshalJSON marshals the given AdverseEvent as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/allergyIntolerance.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ type AllergyIntoleranceReaction struct {
ExposureRoute *CodeableConcept `bson:"exposureRoute,omitempty" json:"exposureRoute,omitempty"`
Note []Annotation `bson:"note,omitempty" json:"note,omitempty"`
}

// This function returns resource reference information
func (r AllergyIntolerance) ResourceRef() (string, *string) {
return "AllergyIntolerance", r.Id
}

type OtherAllergyIntolerance AllergyIntolerance

// MarshalJSON marshals the given AllergyIntolerance as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/appointment.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ type AppointmentParticipant struct {
Status ParticipationStatus `bson:"status" json:"status"`
Period *Period `bson:"period,omitempty" json:"period,omitempty"`
}

// This function returns resource reference information
func (r Appointment) ResourceRef() (string, *string) {
return "Appointment", r.Id
}

type OtherAppointment Appointment

// MarshalJSON marshals the given Appointment as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/appointmentResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ type AppointmentResponse struct {
ParticipantStatus ParticipationStatus `bson:"participantStatus" json:"participantStatus"`
Comment *string `bson:"comment,omitempty" json:"comment,omitempty"`
}

// This function returns resource reference information
func (r AppointmentResponse) ResourceRef() (string, *string) {
return "AppointmentResponse", r.Id
}

type OtherAppointmentResponse AppointmentResponse

// MarshalJSON marshals the given AppointmentResponse as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/auditEvent.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ type AuditEventEntityDetail struct {
ModifierExtension []Extension `bson:"modifierExtension,omitempty" json:"modifierExtension,omitempty"`
Type string `bson:"type" json:"type"`
}

// This function returns resource reference information
func (r AuditEvent) ResourceRef() (string, *string) {
return "AuditEvent", r.Id
}

type OtherAuditEvent AuditEvent

// MarshalJSON marshals the given AuditEvent as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ type Basic struct {
Created *string `bson:"created,omitempty" json:"created,omitempty"`
Author *Reference `bson:"author,omitempty" json:"author,omitempty"`
}

// This function returns resource reference information
func (r Basic) ResourceRef() (string, *string) {
return "Basic", r.Id
}

type OtherBasic Basic

// MarshalJSON marshals the given Basic as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ type Binary struct {
SecurityContext *Reference `bson:"securityContext,omitempty" json:"securityContext,omitempty"`
Data *string `bson:"data,omitempty" json:"data,omitempty"`
}

// This function returns resource reference information
func (r Binary) ResourceRef() (string, *string) {
return "Binary", r.Id
}

type OtherBinary Binary

// MarshalJSON marshals the given Binary as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/biologicallyDerivedProduct.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ type BiologicallyDerivedProductStorage struct {
Scale *BiologicallyDerivedProductStorageScale `bson:"scale,omitempty" json:"scale,omitempty"`
Duration *Period `bson:"duration,omitempty" json:"duration,omitempty"`
}

// This function returns resource reference information
func (r BiologicallyDerivedProduct) ResourceRef() (string, *string) {
return "BiologicallyDerivedProduct", r.Id
}

type OtherBiologicallyDerivedProduct BiologicallyDerivedProduct

// MarshalJSON marshals the given BiologicallyDerivedProduct as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/bodyStructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ type BodyStructure struct {
Image []Attachment `bson:"image,omitempty" json:"image,omitempty"`
Patient Reference `bson:"patient" json:"patient"`
}

// This function returns resource reference information
func (r BodyStructure) ResourceRef() (string, *string) {
return "BodyStructure", r.Id
}

type OtherBodyStructure BodyStructure

// MarshalJSON marshals the given BodyStructure as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ type BundleEntryResponse struct {
LastModified *string `bson:"lastModified,omitempty" json:"lastModified,omitempty"`
Outcome json.RawMessage `bson:"outcome,omitempty" json:"outcome,omitempty"`
}

// This function returns resource reference information
func (r Bundle) ResourceRef() (string, *string) {
return "Bundle", r.Id
}

type OtherBundle Bundle

// MarshalJSON marshals the given Bundle as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/capabilityStatement.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ type CapabilityStatementDocument struct {
Documentation *string `bson:"documentation,omitempty" json:"documentation,omitempty"`
Profile string `bson:"profile" json:"profile"`
}

// This function returns resource reference information
func (r CapabilityStatement) ResourceRef() (string, *string) {
return "CapabilityStatement", r.Id
}

type OtherCapabilityStatement CapabilityStatement

// MarshalJSON marshals the given CapabilityStatement as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/carePlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ type CarePlanActivityDetail struct {
Quantity *Quantity `bson:"quantity,omitempty" json:"quantity,omitempty"`
Description *string `bson:"description,omitempty" json:"description,omitempty"`
}

// This function returns resource reference information
func (r CarePlan) ResourceRef() (string, *string) {
return "CarePlan", r.Id
}

type OtherCarePlan CarePlan

// MarshalJSON marshals the given CarePlan as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/careTeam.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ type CareTeamParticipant struct {
OnBehalfOf *Reference `bson:"onBehalfOf,omitempty" json:"onBehalfOf,omitempty"`
Period *Period `bson:"period,omitempty" json:"period,omitempty"`
}

// This function returns resource reference information
func (r CareTeam) ResourceRef() (string, *string) {
return "CareTeam", r.Id
}

type OtherCareTeam CareTeam

// MarshalJSON marshals the given CareTeam as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/catalogEntry.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ type CatalogEntryRelatedEntry struct {
Relationtype CatalogEntryRelationType `bson:"relationtype" json:"relationtype"`
Item Reference `bson:"item" json:"item"`
}

// This function returns resource reference information
func (r CatalogEntry) ResourceRef() (string, *string) {
return "CatalogEntry", r.Id
}

type OtherCatalogEntry CatalogEntry

// MarshalJSON marshals the given CatalogEntry as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/chargeItem.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ type ChargeItemPerformer struct {
Function *CodeableConcept `bson:"function,omitempty" json:"function,omitempty"`
Actor Reference `bson:"actor" json:"actor"`
}

// This function returns resource reference information
func (r ChargeItem) ResourceRef() (string, *string) {
return "ChargeItem", r.Id
}

type OtherChargeItem ChargeItem

// MarshalJSON marshals the given ChargeItem as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/chargeItemDefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ type ChargeItemDefinitionPropertyGroupPriceComponent struct {
Factor *string `bson:"factor,omitempty" json:"factor,omitempty"`
Amount *Money `bson:"amount,omitempty" json:"amount,omitempty"`
}

// This function returns resource reference information
func (r ChargeItemDefinition) ResourceRef() (string, *string) {
return "ChargeItemDefinition", r.Id
}

type OtherChargeItemDefinition ChargeItemDefinition

// MarshalJSON marshals the given ChargeItemDefinition as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ type ClaimItemDetailSubDetail struct {
Net *Money `bson:"net,omitempty" json:"net,omitempty"`
Udi []Reference `bson:"udi,omitempty" json:"udi,omitempty"`
}

// This function returns resource reference information
func (r Claim) ResourceRef() (string, *string) {
return "Claim", r.Id
}

type OtherClaim Claim

// MarshalJSON marshals the given Claim as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/claimResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ type ClaimResponseError struct {
SubDetailSequence *int `bson:"subDetailSequence,omitempty" json:"subDetailSequence,omitempty"`
Code CodeableConcept `bson:"code" json:"code"`
}

// This function returns resource reference information
func (r ClaimResponse) ResourceRef() (string, *string) {
return "ClaimResponse", r.Id
}

type OtherClaimResponse ClaimResponse

// MarshalJSON marshals the given ClaimResponse as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/clinicalImpression.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ type ClinicalImpressionFinding struct {
ItemReference *Reference `bson:"itemReference,omitempty" json:"itemReference,omitempty"`
Basis *string `bson:"basis,omitempty" json:"basis,omitempty"`
}

// This function returns resource reference information
func (r ClinicalImpression) ResourceRef() (string, *string) {
return "ClinicalImpression", r.Id
}

type OtherClinicalImpression ClinicalImpression

// MarshalJSON marshals the given ClinicalImpression as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/codeSystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ type CodeSystemConceptProperty struct {
ModifierExtension []Extension `bson:"modifierExtension,omitempty" json:"modifierExtension,omitempty"`
Code string `bson:"code" json:"code"`
}

// This function returns resource reference information
func (r CodeSystem) ResourceRef() (string, *string) {
return "CodeSystem", r.Id
}

type OtherCodeSystem CodeSystem

// MarshalJSON marshals the given CodeSystem as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/communication.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ type CommunicationPayload struct {
Extension []Extension `bson:"extension,omitempty" json:"extension,omitempty"`
ModifierExtension []Extension `bson:"modifierExtension,omitempty" json:"modifierExtension,omitempty"`
}

// This function returns resource reference information
func (r Communication) ResourceRef() (string, *string) {
return "Communication", r.Id
}

type OtherCommunication Communication

// MarshalJSON marshals the given Communication as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/communicationRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ type CommunicationRequestPayload struct {
Extension []Extension `bson:"extension,omitempty" json:"extension,omitempty"`
ModifierExtension []Extension `bson:"modifierExtension,omitempty" json:"modifierExtension,omitempty"`
}

// This function returns resource reference information
func (r CommunicationRequest) ResourceRef() (string, *string) {
return "CommunicationRequest", r.Id
}

type OtherCommunicationRequest CommunicationRequest

// MarshalJSON marshals the given CommunicationRequest as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/compartmentDefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ type CompartmentDefinitionResource struct {
Param []string `bson:"param,omitempty" json:"param,omitempty"`
Documentation *string `bson:"documentation,omitempty" json:"documentation,omitempty"`
}

// This function returns resource reference information
func (r CompartmentDefinition) ResourceRef() (string, *string) {
return "CompartmentDefinition", r.Id
}

type OtherCompartmentDefinition CompartmentDefinition

// MarshalJSON marshals the given CompartmentDefinition as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/composition.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ type CompositionSection struct {
EmptyReason *CodeableConcept `bson:"emptyReason,omitempty" json:"emptyReason,omitempty"`
Section []CompositionSection `bson:"section,omitempty" json:"section,omitempty"`
}

// This function returns resource reference information
func (r Composition) ResourceRef() (string, *string) {
return "Composition", r.Id
}

type OtherComposition Composition

// MarshalJSON marshals the given Composition as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/conceptMap.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ type ConceptMapGroupUnmapped struct {
Display *string `bson:"display,omitempty" json:"display,omitempty"`
Url *string `bson:"url,omitempty" json:"url,omitempty"`
}

// This function returns resource reference information
func (r ConceptMap) ResourceRef() (string, *string) {
return "ConceptMap", r.Id
}

type OtherConceptMap ConceptMap

// MarshalJSON marshals the given ConceptMap as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ type ConditionEvidence struct {
Code []CodeableConcept `bson:"code,omitempty" json:"code,omitempty"`
Detail []Reference `bson:"detail,omitempty" json:"detail,omitempty"`
}

// This function returns resource reference information
func (r Condition) ResourceRef() (string, *string) {
return "Condition", r.Id
}

type OtherCondition Condition

// MarshalJSON marshals the given Condition as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/consent.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ type ConsentProvisionData struct {
Meaning ConsentDataMeaning `bson:"meaning" json:"meaning"`
Reference Reference `bson:"reference" json:"reference"`
}

// This function returns resource reference information
func (r Consent) ResourceRef() (string, *string) {
return "Consent", r.Id
}

type OtherConsent Consent

// MarshalJSON marshals the given Consent as JSON into a byte slice
Expand Down
6 changes: 6 additions & 0 deletions fhir401/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ type ContractRule struct {
Extension []Extension `bson:"extension,omitempty" json:"extension,omitempty"`
ModifierExtension []Extension `bson:"modifierExtension,omitempty" json:"modifierExtension,omitempty"`
}

// This function returns resource reference information
func (r Contract) ResourceRef() (string, *string) {
return "Contract", r.Id
}

type OtherContract Contract

// MarshalJSON marshals the given Contract as JSON into a byte slice
Expand Down
Loading

0 comments on commit f396a92

Please sign in to comment.