func (resource *SupplyDelivery) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "SupplyDelivery"
	return json.Marshal(*resource)
}
Custom marshaller to add the resourceType property, as required by the specification
package models
import (
	"encoding/json"
	"errors"
	"fmt"
)
type SupplyDelivery struct {
	DomainResource              `bson:",inline"`
	Identifier                  *Identifier      `bson:"identifier,omitempty" json:"identifier,omitempty"`
	Status                      string           `bson:"status,omitempty" json:"status,omitempty"`
	Patient                     *Reference       `bson:"patient,omitempty" json:"patient,omitempty"`
	Type                        *CodeableConcept `bson:"type,omitempty" json:"type,omitempty"`
	Quantity                    *Quantity        `bson:"quantity,omitempty" json:"quantity,omitempty"`
	SuppliedItemCodeableConcept *CodeableConcept `bson:"suppliedItemCodeableConcept,omitempty" json:"suppliedItemCodeableConcept,omitempty"`
	SuppliedItemReference       *Reference       `bson:"suppliedItemReference,omitempty" json:"suppliedItemReference,omitempty"`
	Supplier                    *Reference       `bson:"supplier,omitempty" json:"supplier,omitempty"`
	WhenPrepared                *Period          `bson:"whenPrepared,omitempty" json:"whenPrepared,omitempty"`
	Time                        *FHIRDateTime    `bson:"time,omitempty" json:"time,omitempty"`
	Destination                 *Reference       `bson:"destination,omitempty" json:"destination,omitempty"`
	Receiver                    []Reference      `bson:"receiver,omitempty" json:"receiver,omitempty"`
}