utils

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallNlp

func CallNlp(sentence string, symptoms []string) nlpResponseBody

func CheckAnteDiseaseInSymptoms added in v1.4.6

func CheckAnteDiseaseInSymptoms(session graphql.GetSessionByIdGetSessionByIdSession) (string, string)

func CheckTreatments added in v1.5.1

func CheckTreatments(symptoms []graphql.SessionSymptomInput, medicines []string) []graphql.SessionSymptomInput

func GetSessionDiseases added in v1.4.6

func GetSessionDiseases(sessionContext []model.SessionSymptom) []graphql.SessionDiseasesInput

func SymptomsToString

func SymptomsToString(symptoms []Symptom) []string

func WakeNlpUp

func WakeNlpUp()

Types

type ByCoverage added in v1.4.6

type ByCoverage []diseaseCoverage

func (ByCoverage) Len added in v1.4.6

func (a ByCoverage) Len() int

func (ByCoverage) Less added in v1.4.6

func (a ByCoverage) Less(i, j int) bool

func (ByCoverage) Swap added in v1.4.6

func (a ByCoverage) Swap(i, j int)

type ExamResponseBody added in v1.5.1

type ExamResponseBody struct {
	Context  []model.SessionSymptom `json:"context"`
	Done     bool                   `json:"done"`
	Question string                 `json:"question"`
	Symptoms []string               `json:"symptoms"`
	Alert    []string               `json:"alert"`
}

func CallExam

func CallExam(context []model.SessionSymptom) ExamResponseBody

type Symptom

type Symptom struct {
	Name    string `json:"symptom"`
	Present *bool  `json:"present"`
}

func StringToSymptoms

func StringToSymptoms(strings []string) []Symptom

Jump to

Keyboard shortcuts

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