// Custom marshaller to add the resourceType property, as required by the specification
344788
func (resource *MedicationAdministration) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "MedicationAdministration"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to MedicationAdministration), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
463825
func (resource *Coverage) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Coverage"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Coverage), 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)
}
345240
func (resource *StructureDefinition) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "StructureDefinition"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to StructureDefinition), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
187243
func (resource *ValueSet) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ValueSet"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ValueSet), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
149234
func (resource *HealthcareService) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "HealthcareService"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to HealthcareService), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
277155
func (resource *Observation) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Observation"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Observation), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
787771
func (resource *OperationOutcome) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "OperationOutcome"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to OperationOutcome), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
436695
func (resource *Appointment) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Appointment"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Appointment), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
307794
func (resource *Provenance) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Provenance"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Provenance), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1370006
func (resource *EligibilityResponse) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "EligibilityResponse"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to EligibilityResponse), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
1256980
func (resource *ClinicalImpression) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ClinicalImpression"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ClinicalImpression), would cause this same
	// MarshallJSON function to be called again
	return json.Marshal(*resource)
}
444719
func (resource *ProcessRequest) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "ProcessRequest"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to ProcessRequest), 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)
}
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)
}
17085
func (resource *Organization) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Organization"
	// Dereferencing the pointer to avoid infinite recursion.
	// Passing in plain old x (a pointer to Organization), 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)
}