graphql

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(query string, variables map[string]interface{}, respData interface{}) error

Types

type Admin

type Admin struct {
	Id       string `json:"id"`
	Password string `json:"password"`
	Name     string `json:"name"`
	LastName string `json:"last_name"`
	Email    string `json:"email"`
}

func CreateAdmin

func CreateAdmin(newAdmin AdminInput) (Admin, error)

func GetAdminByEmail

func GetAdminByEmail(email string) (Admin, error)

type AdminInput

type AdminInput struct {
	Password string `json:"password"`
	Name     string `json:"name"`
	LastName string `json:"last_name"`
	Email    string `json:"email"`
	Token    string `json:"token"`
}

type AdminOutput

type AdminOutput struct {
	Id       *string `json:"id"`
	Password *string `json:"password"`
	Name     *string `json:"name"`
	LastName *string `json:"lastName"`
	Email    *string `json:"email"`
}

type Doctor

type Doctor struct {
	Id       string `json:"id"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

func CreateDoctor

func CreateDoctor(newDoctor DoctorInput) (Doctor, error)

func GetDoctorByEmail

func GetDoctorByEmail(email string) (Doctor, error)

func GetDoctorById

func GetDoctorById(id string) (Doctor, error)

type DoctorInput

type DoctorInput struct {
	Password string `json:"password"`
	Email    string `json:"email"`
}

type DoctorOutput

type DoctorOutput struct {
	Id       *string `json:"id"`
	Password *string `json:"password"`
	Email    *string `json:"email"`
}

type Health added in v1.1.0

type Health struct {
	Id                    string    `json:"id"`
	PatientsAllergies     *[]string `json:"patients_allergies,omitempty"`
	PatientsIllness       *[]string `json:"patients_illness,omitempty"`
	PatientsTreatments    *[]string `json:"patients_treatments,omitempty"`
	PatientsPrimaryDoctor string    `json:"patients_primary_doctor,omitempty"`
}

func CreateHealth added in v1.1.0

func CreateHealth(newHealth HealthInput) (Health, error)

func GetHealthById added in v1.1.0

func GetHealthById(id string) (Health, error)

func UpdateMedicalHealth added in v1.1.0

func UpdateMedicalHealth(id_health string, newHealth HealthInput) (Health, error)

type HealthInput added in v1.1.0

type HealthInput struct {
	PatientsAllergies     *[]string `json:"patients_allergies,omitempty"`
	PatientsIllness       *[]string `json:"patients_illness,omitempty"`
	PatientsTreatments    *[]string `json:"patients_treatments,omitempty"`
	PatientsPrimaryDoctor string    `json:"patients_primary_doctor,omitempty"`
}

type HealthOutput added in v1.1.0

type HealthOutput struct {
	Id                    string    `json:"id"`
	PatientsAllergies     *[]string `json:"patients_allergies,omitempty"`
	PatientsIllness       *[]string `json:"patients_illness,omitempty"`
	PatientsTreatments    *[]string `json:"patients_treatments,omitempty"`
	PatientsPrimaryDoctor *string   `json:"patients_primary_doctor,omitempty"`
}

type Info added in v1.1.0

type Info struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Surname   string `json:"surname"`
	BirthDate string `json:"birthdate"`
	Sex       string `json:"sex"`
	Weight    int    `json:"weight"`
	Height    int    `json:"height"`
}

func CreateInfo added in v1.1.0

func CreateInfo(newInfo InfoInput) (Info, error)

func GetInfoById added in v1.1.0

func GetInfoById(id string) (Info, error)

func UpdateMedicalInfo added in v1.1.0

func UpdateMedicalInfo(id_info string, newInfo InfoInput) (Info, error)

type InfoInput added in v1.1.0

type InfoInput struct {
	Name      string `json:"name"`
	Surname   string `json:"surname"`
	BirthDate string `json:"birthdate"`
	Sex       string `json:"sex"`
	Weight    int    `json:"weight"`
	Height    int    `json:"height"`
}

type InfoOutput added in v1.1.0

type InfoOutput struct {
	Id        string  `json:"id"`
	Name      *string `json:"name"`
	Surname   *string `json:"surname"`
	BirthDate *string `json:"birthdate"`
	Sex       *string `json:"sex"`
	Weight    *int    `json:"weight"`
	Height    *int    `json:"height"`
}

type MedicalInfo added in v1.1.0

type MedicalInfo struct {
	Info   InfoInput   `json:"onboarding_info"`
	Health HealthInput `json:"onboarding_health"`
}

type Patient

type Patient struct {
	Id       string `json:"id"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

func CreatePatient

func CreatePatient(newPatient PatientInput) (Patient, error)

func GetPatientByEmail

func GetPatientByEmail(email string) (Patient, error)

func GetPatientById

func GetPatientById(id string) (Patient, error)

type PatientInput

type PatientInput struct {
	Password string `json:"password"`
	Email    string `json:"email"`
}

type PatientOutput

type PatientOutput struct {
	Id       *string `json:"id"`
	Password *string `json:"password"`
	Email    *string `json:"email"`
}

type Rdv added in v1.1.0

type Rdv struct {
	Id        string `json:"id"`
	DoctorID  string `json:"doctor_id"`
	IdPatient string `json:"id_patient"`
	StartDate int    `json:"start_date"`
	EndDate   int    `json:"end_date"`
}

func GetAllRdv added in v1.1.0

func GetAllRdv(id string) ([]Rdv, error)

func GetRdvById added in v1.1.0

func GetRdvById(id string) (Rdv, error)

func GetRdvDoctorById added in v1.1.0

func GetRdvDoctorById(id string) ([]Rdv, error)

func UpdateRdv added in v1.1.0

func UpdateRdv(id_patient string, rdv_id string) (Rdv, error)

type RdvInput added in v1.1.0

type RdvInput struct {
	Id        string `json:"id"`
	DoctorID  string `json:"doctor_id"`
	IdPatient string `json:"id_patient"`
	StartDate int    `json:"start_date"`
	EndDate   int    `json:"end_date"`
}

type RdvOutput added in v1.1.0

type RdvOutput struct {
	Id        string  `json:"id"`
	DoctorID  *string `json:"doctor_id"`
	IdPatient *string `json:"id_patient"`
	StartDate *int    `json:"start_date"`
	EndDate   *int    `json:"end_date"`
}

type Session added in v1.0.0

type Session struct {
	Id           string   `json:"id"`
	Symptoms     []string `json:"symptoms"`
	Age          int      `json:"age"`
	Height       int      `json:"height"`
	Weight       int      `json:"weight"`
	Sex          string   `json:"sex"`
	LastQuestion string   `json:"last_question"`
}

func CreateSession added in v1.0.0

func CreateSession(newSession SessionInput) (Session, error)

func GetSessionById added in v1.0.0

func GetSessionById(id string) (Session, error)

func UpdateSession added in v1.0.0

func UpdateSession(newSession Session) (Session, error)

type SessionInput added in v1.0.0

type SessionInput struct {
	Symptoms     []string `json:"symptoms"`
	Age          int      `json:"age"`
	Height       int      `json:"height"`
	Weight       int      `json:"weight"`
	Sex          string   `json:"sex"`
	LastQuestion string   `json:"last_question,omitempty"`
}

type SessionOutput added in v1.0.0

type SessionOutput struct {
	Id           string    `json:"id"`
	Symptoms     *[]string `json:"symptoms"`
	Age          *int      `json:"age"`
	Height       *int      `json:"height"`
	Weight       *int      `json:"weight"`
	Sex          *string   `json:"sex"`
	LastQuestion *string   `json:"last_question"`
}

type UpdateDoctorAppointment added in v1.1.0

type UpdateDoctorAppointment struct {
	Id            string   `json:"id"`
	RendezVousIDs []string `json:"rendez_vous_ids"`
}

type UpdateDoctorAppointmentInput added in v1.1.0

type UpdateDoctorAppointmentInput struct {
	Id            string   `json:"id"`
	RendezVousIDs []string `json:"rendez_vous_ids"`
}

type UpdateDoctorAppointmentOutput added in v1.1.0

type UpdateDoctorAppointmentOutput struct {
	Id            *string   `json:"id"`
	RendezVousIDs *[]string `json:"rendez_vous_ids"`
}

type UpdatePatientAppointment added in v1.1.0

type UpdatePatientAppointment struct {
	Id            string   `json:"id"`
	RendezVousIDs []string `json:"rendez_vous_ids"`
}

func GetPatientAppointmentById added in v1.1.0

func GetPatientAppointmentById(id string) (UpdatePatientAppointment, error)

func UpdatePatient added in v1.1.0

func UpdatePatient(updatePatient UpdatePatientAppointmentInput) (UpdatePatientAppointment, error)

============================================================================================== // Patient

type UpdatePatientAppointmentInput added in v1.1.0

type UpdatePatientAppointmentInput struct {
	Id            string   `json:"id"`
	RendezVousIDs []string `json:"rendez_vous_ids"`
}

type UpdatePatientAppointmentOutput added in v1.1.0

type UpdatePatientAppointmentOutput struct {
	Id            *string   `json:"id"`
	RendezVousIDs *[]string `json:"rendez_vous_ids"`
}

type UpdatePatientOnboarding added in v1.1.0

type UpdatePatientOnboarding struct {
	Id                 string `json:"id"`
	OnboardingInfoID   string `json:"onboarding_info_id"`
	OnboardingHealthID string `json:"onboarding_health_id"`
}

func AddOnboardingHealthID added in v1.1.0

func AddOnboardingHealthID(updatePatient UpdatePatientOnboardingInput) (UpdatePatientOnboarding, error)

func AddOnboardingInfoID added in v1.1.0

func AddOnboardingInfoID(updatePatient UpdatePatientOnboardingInput) (UpdatePatientOnboarding, error)

func GetUpdatePatientOnboardingById added in v1.1.0

func GetUpdatePatientOnboardingById(id string) (UpdatePatientOnboarding, error)

type UpdatePatientOnboardingInput added in v1.1.0

type UpdatePatientOnboardingInput struct {
	Id                 string `json:"id"`
	OnboardingInfoID   string `json:"onboarding_info_id"`
	OnboardingHealthID string `json:"onboarding_health_id"`
}

type UpdatePatientOnboardingOutput added in v1.1.0

type UpdatePatientOnboardingOutput struct {
	Id                 *string `json:"id"`
	OnboardingInfoID   *string `json:"onboarding_info_id"`
	OnboardingHealthID *string `json:"onboarding_health_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL