// Custom marshaller to add the resourceType property, as required by the specification
512846
func (resource *DiagnosticOrder) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "DiagnosticOrder"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to DiagnosticOrder), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
239312
func (resource *ExplanationOfBenefit) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ExplanationOfBenefit"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ExplanationOfBenefit), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1168067
func (resource *SupplyRequest) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "SupplyRequest"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to SupplyRequest), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
494271
func (resource *DiagnosticReport) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "DiagnosticReport"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to DiagnosticReport), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
680638
func (resource *MedicationStatement) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "MedicationStatement"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to MedicationStatement), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
834883
func (resource *ImplementationGuide) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ImplementationGuide"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ImplementationGuide), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1222470
func (resource *Questionnaire) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Questionnaire"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Questionnaire), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
58118
func (resource *MedicationDispense) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "MedicationDispense"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to MedicationDispense), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
676164
func (resource *Binary) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Binary"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Binary), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
853241
func (resource *Medication) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Medication"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Medication), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1361648
func (resource *PaymentReconciliation) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "PaymentReconciliation"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to PaymentReconciliation), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
157549
func (resource *EligibilityRequest) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "EligibilityRequest"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to EligibilityRequest), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1050672
func (resource *OperationDefinition) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "OperationDefinition"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to OperationDefinition), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
224868
func (r Resource) MarshalJSON() ([]byte, error) {
	var ccResource struct {
		Filename string `json:"fn,omitempty"`
		Mode     string `json:"mode,omitempty"`
		SHA1     string `json:"sha1"`
		Size     int64  `json:"size"`
	}

	ccResource.Filename = r.Filename
	ccResource.Size = r.Size
	ccResource.SHA1 = r.SHA1
	ccResource.Mode = strconv.FormatUint(uint64(r.Mode), 8)
	return json.Marshal(ccResource)
}
403987
func (resource *ImmunizationRecommendation) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ImmunizationRecommendation"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ImmunizationRecommendation), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
797249
func (resource *Bundle) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Bundle"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Bundle), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
991970
func (resource *Basic) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Basic"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Basic), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}