func (resource *Appointment) MarshalJSON() ([]byte, error) {
	resource.ResourceType = "Appointment"
	return json.Marshal(*resource)
}
Custom marshaller to add the resourceType property, as required by the specification
package models
import (
	"encoding/json"
	"errors"
	"fmt"
)
type Appointment struct {
	DomainResource  `bson:",inline"`
	Identifier      []Identifier                      `bson:"identifier,omitempty" json:"identifier,omitempty"`
	Status          string                            `bson:"status,omitempty" json:"status,omitempty"`
	ServiceCategory *CodeableConcept                  `bson:"serviceCategory,omitempty" json:"serviceCategory,omitempty"`
	ServiceType     []CodeableConcept                 `bson:"serviceType,omitempty" json:"serviceType,omitempty"`
	Specialty       []CodeableConcept                 `bson:"specialty,omitempty" json:"specialty,omitempty"`
	AppointmentType *CodeableConcept                  `bson:"appointmentType,omitempty" json:"appointmentType,omitempty"`
	Reason          *CodeableConcept                  `bson:"reason,omitempty" json:"reason,omitempty"`
	Priority        *uint32                           `bson:"priority,omitempty" json:"priority,omitempty"`
	Description     string                            `bson:"description,omitempty" json:"description,omitempty"`
	Start           *FHIRDateTime                     `bson:"start,omitempty" json:"start,omitempty"`
	End             *FHIRDateTime                     `bson:"end,omitempty" json:"end,omitempty"`
	MinutesDuration *uint32                           `bson:"minutesDuration,omitempty" json:"minutesDuration,omitempty"`
	Slot            []Reference                       `bson:"slot,omitempty" json:"slot,omitempty"`
	Created         *FHIRDateTime                     `bson:"created,omitempty" json:"created,omitempty"`
	Comment         string                            `bson:"comment,omitempty" json:"comment,omitempty"`
	Participant     []AppointmentParticipantComponent `bson:"participant,omitempty" json:"participant,omitempty"`
}