domain

package
Version: v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HomeRoute                   = "/home"
	PatientRegistrationRoute    = "/addPatient"
	PatientIdentificationRoute  = "/patients"
	GetHelpRouteRoute           = "/helpCenter"
	RequestsRoute               = "/admin"
	RoleViewRoute               = "/viewCreatedRolesPage"
	RoleCreationRoute           = "/createRoleStepOne"
	RoleAssignmentRoute         = "/bewellUserIdentification"
	AgentRegistrationRoute      = "/agentRegistration"
	AgentIdentificationRoute    = "/agentIdentification"
	EmployeeRegistrationRoute   = "/employeeRegistration"
	EmployeeIdentificationRoute = "/employeeIdentification"
	ConsumerRegistrationRoute   = "/bewellUserRegistration"
)

On Tap Routes

View Source
const (
	// StaticBase is the default path at which static assets are hosted
	StaticBase = "https://assets.healthcloud.co.ke"

	RoleNavActionIcon     = StaticBase + "/actions/roles_navaction.png"
	AgentNavActionIcon    = StaticBase + "/actions/agent_navaction.png"
	EmployeeNavActionIcon = StaticBase + "/actions/employee_navaction.png"
	ConsumerNavActionIcon = StaticBase + "/actions/consumer_navaction.png"
	HelpNavActionIcon     = StaticBase + "/actions/help_navaction.png"
	HomeNavActionIcon     = StaticBase + "/actions/home_navaction.png"
	KYCNavActionIcon      = StaticBase + "/actions/kyc_navaction.png"
	PartnerNavActionIcon  = StaticBase + "/actions/partner_navaction.png"
	PatientNavActionIcon  = StaticBase + "/actions/patient_navaction.png"
	RequestNavActionIcon  = StaticBase + "/actions/request_navaction.png"
)

Icon links for navactions

View Source
const (
	HomeNavActionSequence = iota + 1

	RoleNavActionSequence
	RoleCreationNavActionSequence
	RoleViewingNavActionSequence
	RoleAssignNavActionSequence

	RequestsNavActionSequence

	PartnerNavactionSequence

	ConsumerNavactionSequence

	EmployeeNavActionSequence
	EmployeeSearchNavActionSequence
	EmployeeRegistrationActionSequence

	AgentNavActionSequence
	AgentSearchNavActionSequence
	AgentRegistrationActionSequence

	PatientNavActionSequence
	PatientSearchNavActionSequence
	PatientRegistrationNavActionSequence

	HelpNavActionSequence
)

Determines the sequence number of a navigation action Order of the constants matters!!

Variables

View Source
var (
	HomeNavActionTitle       = "Home"
	HomeNavActionDescription = "Home Navigation action"

	HelpNavActionTitle       = "Help"
	HelpNavActionDescription = "Help Navigation action"

	RoleNavActionTitle      = "Role Management"
	RoleViewActionTitle     = "View Roles"
	RoleCreationActionTitle = "Create Role"
	RoleAssignActionTitle   = "Assign Role"

	PatientNavActionTitle            = "Patients"
	PatientNavActionDescription      = "Patient Navigation action"
	PatientRegistrationActionTitle   = "Register Patient"
	PatientIdentificationActionTitle = "Search Patient"

	RequestsNavActionTitle       = "Requests"
	RequestsNavActionDescription = "Requests Navigation action"

	AgentNavActionTitle            = "Agents"
	AgentNavActionDescription      = "Agent Navigation action"
	AgentRegistrationActionTitle   = "Register Agent"
	AgentIdentificationActionTitle = "View Agents"

	EmployeeNavActionTitle            = "Employees"
	EmployeeNavActionDescription      = "Employee Navigation action"
	EmployeeRegistrationActionTitle   = "Register Employee"
	EmployeeIdentificationActionTitle = "View Employees"

	ConsumerNavActionTitle       = "Consumers"
	ConsumerNavActionDescription = "Consumer Navigation action"

	PartnerNavActionTitle       = "Partners"
	PartnerNavActionDescription = "Partner Navigation action"
)

Navigation actions

View Source
var (
	// HomeNavAction is the primary home button
	HomeNavAction = NavigationAction{
		Group:              HomeGroup,
		Title:              HomeNavActionTitle,
		OnTapRoute:         HomeRoute,
		Icon:               HomeNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     HomeNavActionSequence,
	}

	// HelpNavAction navigation action to help and FAQs page
	HelpNavAction = NavigationAction{
		Group:              HelpGroup,
		Title:              HelpNavActionTitle,
		OnTapRoute:         GetHelpRouteRoute,
		Icon:               HelpNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     HelpNavActionSequence,
	}
)

the structure and definition of all navigation actions

View Source
var (
	//RoleNavActions this is the parent navigation action for role resource
	// it has nested navigation actions below
	RoleNavActions = NavigationAction{
		Group:              RoleGroup,
		Title:              RoleNavActionTitle,
		Icon:               RoleNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     RoleNavActionSequence,
	}

	//RoleCreationNavAction a child of the RoleNavActions
	RoleCreationNavAction = NavigationAction{
		Group:              RoleGroup,
		Title:              RoleCreationActionTitle,
		OnTapRoute:         RoleCreationRoute,
		RequiredPermission: &profileutils.CanCreateRole,
		HasParent:          true,
		SequenceNumber:     RoleCreationNavActionSequence,
	}

	//RoleViewNavAction a child of the RoleNavActions
	RoleViewNavAction = NavigationAction{
		Group:              RoleGroup,
		Title:              RoleViewActionTitle,
		OnTapRoute:         RoleViewRoute,
		RequiredPermission: &profileutils.CanViewRole,
		HasParent:          true,
		SequenceNumber:     RoleViewingNavActionSequence,
	}
	//RoleAssignNavAction a child of the RoleNavActions
	RoleAssignNavAction = NavigationAction{
		Group:              RoleGroup,
		Title:              RoleAssignActionTitle,
		OnTapRoute:         RoleAssignmentRoute,
		RequiredPermission: &profileutils.CanAssignRole,
		HasParent:          true,
		SequenceNumber:     RoleAssignNavActionSequence,
	}
)
View Source
var (
	//AgentNavActions this is the parent navigation action for agent resource
	// it has nested navigation actions below
	AgentNavActions = NavigationAction{
		Group:              AgentGroup,
		Title:              AgentNavActionTitle,
		Icon:               AgentNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     AgentNavActionSequence,
	}

	//AgentRegistrationNavAction a child of the AgentNavActions
	AgentRegistrationNavAction = NavigationAction{
		Group:              AgentGroup,
		Title:              AgentRegistrationActionTitle,
		OnTapRoute:         AgentRegistrationRoute,
		RequiredPermission: &profileutils.CanRegisterAgent,
		HasParent:          true,
		SequenceNumber:     AgentRegistrationActionSequence,
	}

	//AgentidentificationNavAction a child of the AgentNavActions
	AgentidentificationNavAction = NavigationAction{
		Group:              AgentGroup,
		Title:              AgentIdentificationActionTitle,
		OnTapRoute:         AgentIdentificationRoute,
		RequiredPermission: &profileutils.CanIdentifyAgent,
		HasParent:          true,
		SequenceNumber:     AgentSearchNavActionSequence,
	}
)
View Source
var (
	//EmployeeNavActions this is the parent navigation action for agent resource
	// it has nested navigation actions below
	EmployeeNavActions = NavigationAction{
		Group:              EmployeeGroup,
		Title:              EmployeeNavActionTitle,
		Icon:               EmployeeNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     EmployeeNavActionSequence,
	}

	//EmployeeRegistrationNavAction a child of the EmployeeNavActions
	EmployeeRegistrationNavAction = NavigationAction{
		Group:              EmployeeGroup,
		Title:              EmployeeRegistrationActionTitle,
		OnTapRoute:         EmployeeRegistrationRoute,
		RequiredPermission: &profileutils.CanCreateEmployee,
		HasParent:          true,
		SequenceNumber:     EmployeeRegistrationActionSequence,
	}

	//EmployeeidentificationNavAction a child of the EmployeeNavActions
	EmployeeidentificationNavAction = NavigationAction{
		Group:              EmployeeGroup,
		Title:              EmployeeIdentificationActionTitle,
		OnTapRoute:         EmployeeIdentificationRoute,
		RequiredPermission: &profileutils.CanViewEmployee,
		HasParent:          true,
		SequenceNumber:     EmployeeSearchNavActionSequence,
	}
)
View Source
var (
	//PatientNavActions this is the parent navigation action for patient resource
	// it has nested navigation actions below
	PatientNavActions = NavigationAction{
		Group:              PatientGroup,
		Title:              PatientNavActionTitle,
		Icon:               PatientNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     PatientNavActionSequence,
	}

	//PatientRegistrationNavAction a child of the PatientNavActions
	PatientRegistrationNavAction = NavigationAction{
		Group:              PatientGroup,
		Title:              PatientRegistrationActionTitle,
		OnTapRoute:         PatientRegistrationRoute,
		RequiredPermission: &profileutils.CanCreatePatient,
		HasParent:          true,
		SequenceNumber:     PatientRegistrationNavActionSequence,
	}

	//PatientIdentificationNavAction a child of the PatientNavActions
	PatientIdentificationNavAction = NavigationAction{
		Group:              PatientGroup,
		Title:              PatientIdentificationActionTitle,
		OnTapRoute:         PatientIdentificationRoute,
		RequiredPermission: &profileutils.CanIdentifyPatient,
		HasParent:          true,
		SequenceNumber:     PatientSearchNavActionSequence,
	}
)
View Source
var (
	// TimeLocation ...
	TimeLocation, _ = time.LoadLocation("Africa/Nairobi")

	// TimeFormatStr date time string format
	TimeFormatStr = "2006-01-02T15:04:05+03:00"

	// Repo the env to identify which repo to use
	Repo = "REPOSITORY"

	//FirebaseRepository is the value of the env when using firebase
	FirebaseRepository = "firebase"

	//PostgresRepository is the value of the env when using postgres
	PostgresRepository = "postgres"
)

AllBeneficiaryRelationship is a list of all known beneficiary relationships

AllEmploymentType ..

AllFivePointRating is a list of all known ratings

AllKYCProcessStatus ...

AllNavigationActions is a grouping of all navigation actions

AllOrganizationType contains a slice of all OrganizationType

AllPractitionerCadre is the set of known valid practitioner cadres

AllPractitionerService is a list of all known practitioner service

View Source
var (
	//ConsumerNavActions is the navigation actions to consumer management
	ConsumerNavActions = NavigationAction{
		Group:              ConsumerGroup,
		Title:              ConsumerNavActionTitle,
		Icon:               ConsumerNavActionIcon,
		OnTapRoute:         ConsumerRegistrationRoute,
		RequiredPermission: &profileutils.CanCreateConsumer,
		SequenceNumber:     ConsumerNavactionSequence,
	}
)
View Source
var (

	// KYCNavActions is the navigation acction to KYC processing
	KYCNavActions = NavigationAction{
		Group:              KYCGroup,
		Title:              RequestsNavActionTitle,
		OnTapRoute:         RequestsRoute,
		Icon:               RequestNavActionIcon,
		RequiredPermission: &profileutils.CanProcessKYC,
		SequenceNumber:     RequestsNavActionSequence,
	}
)
View Source
var (
	//PartnerNavActions is the navigation actions to partner management
	PartnerNavActions = NavigationAction{
		Group:              PartnerGroup,
		Title:              PartnerNavActionTitle,
		Icon:               PartnerNavActionIcon,
		RequiredPermission: nil,
		SequenceNumber:     PartnerNavactionSequence,
	}
)
View Source
var WelcomeMessage = "" /* 142-byte string literal not displayed */

WelcomeMessage is the default message formart for sending temporary PIN to users

Functions

This section is empty.

Types

type AdminProfile added in v0.0.23

type AdminProfile struct {
	ID             string `json:"id,omitempty"`
	ProfileID      string `json:"profileID,omitempty"`
	OrganizationID string `json:"organizationID,omitempty"`
}

AdminProfile is the profile of all users who permform admin tasks

type AgentProfile added in v0.0.23

type AgentProfile struct {
	ID        string    `json:"id,omitempty"`
	ProfileID string    `json:"profileID,omitempty"`
	AgentType AgentType `json:"agentType,omitempty"`
}

AgentProfile is the profile of all users who permform agent tasks

type AgentType added in v0.0.23

type AgentType string

AgentType is the different kind of agent groups

const (
	//FreelanceAgent are agents that work at part time with savannah
	FreelanceAgent AgentType = "Independent Agent"

	//CompanyAgent are agents who are fully employed by savannah
	CompanyAgent AgentType = "SIL Agent"
)

Valid AgentTypes that can possibly be given to a user

func (AgentType) IsValid added in v0.0.23

func (e AgentType) IsValid() bool

IsValid ..

func (AgentType) MarshalGQL added in v0.0.23

func (e AgentType) MarshalGQL(w io.Writer)

MarshalGQL ..

func (AgentType) String added in v0.0.23

func (e AgentType) String() string

func (*AgentType) UnmarshalGQL added in v0.0.23

func (e *AgentType) UnmarshalGQL(v interface{}) error

UnmarshalGQL ..

type BeneficiaryRelationship

type BeneficiaryRelationship string

BeneficiaryRelationship defines the various relationships with beneficiaries

const (
	BeneficiaryRelationshipSpouse BeneficiaryRelationship = "SPOUSE"
	BeneficiaryRelationshipChild  BeneficiaryRelationship = "CHILD"
)

BeneficiaryRelationshipSpouse is a constant of beneficiary spouse relationship

func (BeneficiaryRelationship) IsValid

func (e BeneficiaryRelationship) IsValid() bool

IsValid returns true for valid beneficiary relationship

func (BeneficiaryRelationship) MarshalGQL

func (e BeneficiaryRelationship) MarshalGQL(w io.Writer)

MarshalGQL converts the beneficiary relationship into a valid JSON string

func (BeneficiaryRelationship) String

func (e BeneficiaryRelationship) String() string

func (*BeneficiaryRelationship) UnmarshalGQL

func (e *BeneficiaryRelationship) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the input, if valid, into a beneficiary relationship value

type Branch

type Branch struct {
	ID                    string `json:"id"                    firestore:"id"`
	Name                  string `json:"name"                  firestore:"name"`
	OrganizationSladeCode string `json:"organizationSladeCode" firestore:"organizationSladeCode"`
	BranchSladeCode       string `json:"branchSladeCode"       firestore:"branchSladeCode"`
	// this won' be saved in the repository. it will be computed when fetching the supplier's allowed locations
	Default bool `json:"default"`
}

Branch represents a Slade 360 Charge Master branch

type BusinessPartner

type BusinessPartner struct {
	ID        string  `json:"id"         firestore:"id"`
	Name      string  `json:"name"       firestore:"name"`
	SladeCode string  `json:"slade_code" firestore:"sladeCode"`
	Parent    *string `json:"parent"     firestore:"parent"`
}

BusinessPartner represents a Slade 360 Charge Master business partner

type CRMContact

type CRMContact struct {
	FirstName   string `json:"first_name,omitempty"`
	LastName    string `json:"last_name,omitempty"`
	DOB         string `json:"dob,omitempty"`
	PhoneNumber string `json:"phone_number,omitempty"`
	OptOut      string `json:"opt_out,omitempty"`
	TimeStamp   string `json:"time_stamp,omitempty"`
	IsSynced    string `json:"is_synced,omitempty"`
}

CRMContact represents a stored CRM contact

type ChangePINRequest

type ChangePINRequest struct {
	PhoneNumber string `json:"phoneNumber"`
	PIN         string `json:"pin"`
	OTP         string `json:"otp"`
}

ChangePINRequest payload to set or change PIN information

type EmploymentType

type EmploymentType string

EmploymentType ...

const (
	EmploymentTypeEmployed     EmploymentType = "EMPLOYED"
	EmploymentTypeSelfEmployed EmploymentType = "SELF_EMPLOYED"
)

EmploymentTypeEmployed ..

func (EmploymentType) IsValid

func (e EmploymentType) IsValid() bool

IsValid ..

func (EmploymentType) MarshalGQL

func (e EmploymentType) MarshalGQL(w io.Writer)

MarshalGQL ..

func (EmploymentType) String

func (e EmploymentType) String() string

func (*EmploymentType) UnmarshalGQL

func (e *EmploymentType) UnmarshalGQL(v interface{}) error

UnmarshalGQL ..

type FivePointRating

type FivePointRating string

FivePointRating is used to implement

const (
	FivePointRatingPoor           FivePointRating = "POOR"
	FivePointRatingUnsatisfactory FivePointRating = "UNSATISFACTORY"
	FivePointRatingAverage        FivePointRating = "AVERAGE"
	FivePointRatingSatisfactory   FivePointRating = "SATISFACTORY"
	FivePointRatingExcellent      FivePointRating = "EXCELLENT"
)

known ratings

func (FivePointRating) IsValid

func (e FivePointRating) IsValid() bool

IsValid returns true for valid ratings

func (FivePointRating) MarshalGQL

func (e FivePointRating) MarshalGQL(w io.Writer)

MarshalGQL converts the rating into a valid JSON string

func (FivePointRating) String

func (e FivePointRating) String() string

func (*FivePointRating) UnmarshalGQL

func (e *FivePointRating) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the input, if valid, into a rating value

type Identification

type Identification struct {
	IdentificationDocType           enumutils.IdentificationDocType `json:"identificationDocType" mapstructure:"identificationDocType"`
	IdentificationDocNumber         string                          `json:"identificationDocNumber" mapstructure:"identificationDocNumber"`
	IdentificationDocNumberUploadID string                          `json:"identificationDocNumberUploadID" mapstructure:"identificationDocNumberUploadID"`
}

Identification identify model

type IndividualCoach

type IndividualCoach struct {
	IdentificationDoc       Identification       `json:"identificationDoc" mapstructure:"identificationDoc"`
	KRAPIN                  string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID          string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments     []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	PracticeLicenseID       string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
	AccreditationID         string               `json:"accreditationID" mapstructure:"accreditationID"`
	AccreditationUploadID   string               `json:"accreditationUploadID" mapstructure:"accreditationUploadID"`
}

IndividualCoach represents the KYC information required for an Individual Coach

type IndividualNutrition

type IndividualNutrition struct {
	IdentificationDoc       Identification       `json:"identificationDoc" mapstructure:"identificationDoc"`
	KRAPIN                  string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID          string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments     []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	PracticeLicenseID       string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
}

IndividualNutrition represents the KYC information required for an Individual Nutrition

type IndividualPharmaceutical

type IndividualPharmaceutical struct {
	IdentificationDoc       Identification       `json:"identificationDoc" mapstructure:"identificationDoc"`
	KRAPIN                  string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID          string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments     []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	RegistrationNumber      string               `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID       string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
}

IndividualPharmaceutical represents the KYC information required for an Individual Pharmaceutical

type IndividualPractitioner

type IndividualPractitioner struct {
	IdentificationDoc       Identification        `json:"identificationDoc" mapstructure:"identificationDoc"`
	KRAPIN                  string                `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID          string                `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments     []SupportingDocument  `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	RegistrationNumber      string                `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID       string                `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID string                `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
	PracticeServices        []PractitionerService `json:"practiceServices" mapstructure:"practiceServices"`
	Cadre                   PractitionerCadre     `json:"cadre" mapstructure:"cadre"`
}

IndividualPractitioner represents the KYC information required for an Individual Rider

type IndividualRider

type IndividualRider struct {
	IdentificationDoc              Identification       `json:"identificationDoc" mapstructure:"identificationDoc"`
	KRAPIN                         string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                 string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	DrivingLicenseID               string               `json:"drivingLicenseID" mapstructure:"drivingLicenseID"`
	DrivingLicenseUploadID         string               `json:"drivingLicenseUploadID" mapstructure:"drivingLicenseUploadID"`
	CertificateGoodConductUploadID string               `json:"certificateGoodConductUploadID" mapstructure:"certificateGoodConductUploadID"`
	SupportingDocuments            []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
}

IndividualRider represents the KYC information required for an Individual Rider

type KYCProcessStatus

type KYCProcessStatus string

KYCProcessStatus status for processing KYC for suppliers

const (
	KYCProcessStatusApproved KYCProcessStatus = "APPROVED"
	KYCProcessStatusRejected KYCProcessStatus = "REJECTED"
	KYCProcessStatusPending  KYCProcessStatus = "PENDING"
)

Valid KYCProcessStatus

func (KYCProcessStatus) IsValid

func (e KYCProcessStatus) IsValid() bool

IsValid checks if the KYCProcessStatus is valid

func (KYCProcessStatus) MarshalGQL

func (e KYCProcessStatus) MarshalGQL(w io.Writer)

MarshalGQL converts KYCProcessStatus into a valid JSON string

func (KYCProcessStatus) String

func (e KYCProcessStatus) String() string

func (*KYCProcessStatus) UnmarshalGQL

func (e *KYCProcessStatus) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the input, if valid, into an KYCProcessStatus value

type KYCRequest

type KYCRequest struct {
	ID                  string                   `json:"id"                  firestore:"id"`
	ReqPartnerType      profileutils.PartnerType `json:"reqPartnerType"      firestore:"reqPartnerType"`
	ReqOrganizationType OrganizationType         `json:"reqOrganizationType" firestore:"reqOrganizationType"`
	ReqRaw              map[string]interface{}   `json:"reqRaw"              firestore:"reqRaw"`
	Processed           bool                     `json:"processed"           firestore:"processed"`
	SupplierRecord      *profileutils.Supplier   `json:"supplierRecord"      firestore:"supplierRecord"`
	Status              KYCProcessStatus         `json:"status"              firestore:"status"`
	RejectionReason     *string                  `json:"rejectionRejection"  firestore:"rejectionRejection"`
	FiledTimestamp      time.Time                `json:"filedTimeStamp"      firestore:"filedTimeStamp"`
	ProcessedTimestamp  time.Time                `json:"processedTimeStamp"  firestore:"processedTimeStamp"`

	// points to the userProfile id of the addmin that has processed the KYC
	ProcessedBy string `json:"processedBy" firestore:"processedBy"`
}

KYCRequest represent payload required to stage kyc processing request

type Microservice

type Microservice struct {
	ID          string `json:"id"          firestore:"id"`
	Name        string `json:"name"        firestore:"name"`
	URL         string `json:"url"         firestore:"url"`
	Description string `json:"description" firestore:"description"`
}

Microservice identifies a micro-service that conforms to the Apollo Graphqql federation specification. These microservices are composed by an Apollo Gateway into a single data graph.

func (*Microservice) GetID

func (m *Microservice) GetID() firebasetools.ID

GetID returns the micro-service's ID

func (*Microservice) IsEntity

func (m *Microservice) IsEntity()

IsEntity marks the struct as an Apollo Federation entity

func (*Microservice) IsNode

func (m *Microservice) IsNode()

IsNode marks this model as a GraphQL Relay Node

func (*Microservice) SetID

func (m *Microservice) SetID(id string)

SetID sets the microservice's ID

type MicroserviceStatus

type MicroserviceStatus struct {
	Service *Microservice `json:"service"`
	Active  bool          `json:"active"`
}

MicroserviceStatus denotes the status of a deployed microservice shows if the revision is serving HTTP request

type NHIFDetails

type NHIFDetails struct {
	ID                        string                          `json:"id"                        firestore:"id"`
	ProfileID                 string                          `json:"profileID"                 firestore:"profileID"`
	MembershipNumber          string                          `json:"membershipNumber"          firestore:"membershipNumber"`
	Employment                EmploymentType                  `json:"employmentType"`
	IDDocType                 enumutils.IdentificationDocType `json:"IDDocType"`
	IDNumber                  string                          `json:"IDNumber"                  firestore:"IDNumber"`
	IdentificationCardPhotoID string                          `json:"identificationCardPhotoID" firestore:"identificationCardPhotoID"`
	NHIFCardPhotoID           string                          `json:"nhifCardPhotoID"           firestore:"nhifCardPhotoID"`
}

NHIFDetails represents a user's thin NHIF details

type NavigationAction struct {
	Group              NavigationGroup          `json:"code"`
	Title              string                   `json:"title"`
	OnTapRoute         string                   `json:"onTapRoute"`
	Icon               string                   `json:"icon"`
	Favorite           bool                     `json:"favorite"`
	HasParent          bool                     `json:"isParent"`
	Nested             []interface{}            `json:"nested"`
	RequiredPermission *profileutils.Permission `json:"requires"`

	// Sequence Number assigns a priority to an action
	// the number is used when sorting/ordering navigation actions
	// Actions with a higher sequence number appear at the top i.e ascending order
	SequenceNumber int `json:"sequenceNumber"`
}

NavigationAction is the menu rendered to PRO users for navigating the app

type NavigationGroup string

NavigationGroup is the grouping of related navigation actions based on resource

const (
	//HomeGroup groups all actions under the home resource
	HomeGroup NavigationGroup = "home"

	//RoleGroup groups all actions under the role resource
	RoleGroup NavigationGroup = "role"

	//HelpGroup groups all actions under the help resource
	HelpGroup NavigationGroup = "help"

	//AgentGroup groups all actions under the agent resource
	AgentGroup NavigationGroup = "agents"

	//KYCGroup groups all actions under the kyc resource
	KYCGroup NavigationGroup = "kyc"

	//EmployeeGroup groups all actions under the employees resource
	EmployeeGroup NavigationGroup = "employees"

	//CoversGroup groups all actions under the covers resource
	CoversGroup NavigationGroup = "covers"

	//PatientGroup groups all actions under the patient resource
	PatientGroup NavigationGroup = "patient"

	//PartnerGroup groups all actions under the partner resource
	PartnerGroup NavigationGroup = "partner"

	//RolesGroup groups all actions under the role resource
	RolesGroup NavigationGroup = "role"

	//ConsumerGroup groups all actions under the consumer resource
	ConsumerGroup NavigationGroup = "consumer"
)

type OrganizationCoach

type OrganizationCoach struct {
	OrganizationTypeName               OrganizationType     `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	KRAPIN                             string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	CertificateOfIncorporation         string               `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string               `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification     `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string               `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	RegistrationNumber                 string               `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID                  string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID            string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
}

OrganizationCoach represents the KYC information required for an Organization Coach

type OrganizationNutrition

type OrganizationNutrition struct {
	OrganizationTypeName               OrganizationType     `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	KRAPIN                             string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	CertificateOfIncorporation         string               `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string               `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification     `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string               `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	RegistrationNumber                 string               `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID                  string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID            string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
}

OrganizationNutrition represents the KYC information required for an Organization Nutrition

type OrganizationPharmaceutical

type OrganizationPharmaceutical struct {
	OrganizationTypeName               OrganizationType     `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	KRAPIN                             string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	CertificateOfIncorporation         string               `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string               `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification     `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string               `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	RegistrationNumber                 string               `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID                  string               `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID            string               `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
}

OrganizationPharmaceutical represents the KYC information required for an Organization Pharmaceutical

type OrganizationPractitioner

type OrganizationPractitioner struct {
	OrganizationTypeName               OrganizationType      `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	KRAPIN                             string                `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string                `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument  `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	CertificateOfIncorporation         string                `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string                `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification      `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string                `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	RegistrationNumber                 string                `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID                  string                `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID            string                `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
	PracticeServices                   []PractitionerService `json:"practiceServices" mapstructure:"practiceServices"`
	Cadre                              PractitionerCadre     `json:"cadre" mapstructure:"cadre"`
}

OrganizationPractitioner represents the KYC information required for an Organization Practitioner

type OrganizationProvider

type OrganizationProvider struct {
	OrganizationTypeName               OrganizationType      `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	KRAPIN                             string                `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string                `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument  `json:"supportingDocuments" mapstructure:"supportingDocuments"`
	CertificateOfIncorporation         string                `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string                `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification      `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string                `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	RegistrationNumber                 string                `json:"registrationNumber" mapstructure:"registrationNumber"`
	PracticeLicenseID                  string                `json:"practiceLicenseID" mapstructure:"practiceLicenseID"`
	PracticeLicenseUploadID            string                `json:"practiceLicenseUploadID" mapstructure:"practiceLicenseUploadID"`
	PracticeServices                   []PractitionerService `json:"practiceServices" mapstructure:"practiceServices"`
}

OrganizationProvider represents the KYC information required for an Organization Provider

type OrganizationRider

type OrganizationRider struct {
	OrganizationTypeName               OrganizationType     `json:"organizationTypeName" mapstructure:"organizationTypeName"`
	CertificateOfIncorporation         string               `json:"certificateOfIncorporation" mapstructure:"certificateOfIncorporation"`
	CertificateOfInCorporationUploadID string               `json:"certificateOfInCorporationUploadID" mapstructure:"certificateOfInCorporationUploadID"`
	DirectorIdentifications            []Identification     `json:"directorIdentifications" mapstructure:"directorIdentifications"`
	OrganizationCertificate            string               `json:"organizationCertificate" mapstructure:"organizationCertificate"`
	KRAPIN                             string               `json:"KRAPIN" mapstructure:"KRAPIN"`
	KRAPINUploadID                     string               `json:"KRAPINUploadID" mapstructure:"KRAPINUploadID"`
	SupportingDocuments                []SupportingDocument `json:"supportingDocuments" mapstructure:"supportingDocuments"`
}

OrganizationRider represents the KYC information required for an Organization Rider

type OrganizationType

type OrganizationType string

OrganizationType defines the various OrganizationTypes

const (
	OrganizationTypeLimitedCompany OrganizationType = "LIMITED_COMPANY"
	OrganizationTypeTrust          OrganizationType = "TRUST"
	OrganizationTypeUniversity     OrganizationType = "UNIVERSITY"
)

OrganizationTypeLimitedCompany is an example of a OrganizationType

func (OrganizationType) IsValid

func (e OrganizationType) IsValid() bool

IsValid checks if the OrganizationType is valid

func (OrganizationType) MarshalGQL

func (e OrganizationType) MarshalGQL(w io.Writer)

MarshalGQL converts OrganizationType into a valid JSON string

func (OrganizationType) String

func (e OrganizationType) String() string

func (*OrganizationType) UnmarshalGQL

func (e *OrganizationType) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the input, if valid, into an OrganizationType value

type PIN

type PIN struct {
	ID        string `json:"id"        firestore:"id"`
	ProfileID string `json:"profileID" firestore:"profileID"`
	PINNumber string `json:"pinNumber" firestore:"pinNumber"`
	Salt      string `json:"salt"      firestore:"salt"`

	// Flags the PIN as temporary and should be changed by user
	IsOTP bool `json:"isOTP" firestore:"isOTP"`
}

PIN represents a user's PIN information

type PostVisitSurvey

type PostVisitSurvey struct {
	LikelyToRecommend int       `json:"likelyToRecommend" firestore:"likelyToRecommend"`
	Criticism         string    `json:"criticism"         firestore:"criticism"`
	Suggestions       string    `json:"suggestions"       firestore:"suggestions"`
	UID               string    `json:"uid"               firestore:"uid"`
	Timestamp         time.Time `json:"timestamp"         firestore:"timestamp"`
}

PostVisitSurvey is used to record and retrieve post visit surveys from Firebase

type PractitionerCadre

type PractitionerCadre string

PractitionerCadre is a list of health worker cadres.

const (
	PractitionerCadreDoctor          PractitionerCadre = "DOCTOR"
	PractitionerCadreClinicalOfficer PractitionerCadre = "CLINICAL_OFFICER"
	PractitionerCadreNurse           PractitionerCadre = "NURSE"
)

practitioner cadre constants

func (PractitionerCadre) IsValid

func (e PractitionerCadre) IsValid() bool

IsValid returns true if a practitioner cadre is valid

func (PractitionerCadre) MarshalGQL

func (e PractitionerCadre) MarshalGQL(w io.Writer)

MarshalGQL writes the practitioner cadre to the supplied writer

func (PractitionerCadre) String

func (e PractitionerCadre) String() string

func (*PractitionerCadre) UnmarshalGQL

func (e *PractitionerCadre) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the supplied value to a practitioner cadre

type PractitionerService

type PractitionerService string

PractitionerService defines the various services practitioners offer

const (
	PractitionerServiceOutpatientServices PractitionerService = "OUTPATIENT_SERVICES"
	PractitionerServiceInpatientServices  PractitionerService = "INPATIENT_SERVICES"
	PractitionerServicePharmacy           PractitionerService = "PHARMACY"
	PractitionerServiceMaternity          PractitionerService = "MATERNITY"
	PractitionerServiceLabServices        PractitionerService = "LAB_SERVICES"
	PractitionerServiceOther              PractitionerService = "OTHER"
)

PractitionerServiceOutpatientServices is a constant of all known practitioner service

func (PractitionerService) IsValid

func (e PractitionerService) IsValid() bool

IsValid returns true for valid practitioner service

func (PractitionerService) MarshalGQL

func (e PractitionerService) MarshalGQL(w io.Writer)

MarshalGQL converts the practitioner service into a valid JSON string

func (PractitionerService) String

func (e PractitionerService) String() string

func (*PractitionerService) UnmarshalGQL

func (e *PractitionerService) UnmarshalGQL(v interface{}) error

UnmarshalGQL converts the input, if valid, into a practitioner service value

type RoleRevocationLog added in v0.0.2

type RoleRevocationLog struct {
	// Unique identifier for a revocation
	ID string `json:"id" firestore:"id"`

	// profile of user whose role is being revoked
	ProfileID string `json:"profileID" firestore:"profileID"`

	// ID of role being revoked
	RoleID string `json:"roleID" firestore:"roleID"`

	// Reason role is being revoked
	Reason string `json:"reason" firestore:"reason"`

	// CreatedBy is the Profile ID of the user removing the role.
	CreatedBy string `json:"createdBy,omitempty" firestore:"createdBy"`

	// Created is the timestamp indicating when the role was created
	Created time.Time `json:"created" firestore:"created"`
}

RoleRevocationLog represents a log for revoking a users role used when removing a role from a user i.e user deactivation

type SetPINRequest

type SetPINRequest struct {
	PhoneNumber string `json:"phoneNumber"`
	PIN         string `json:"pin"`
}

SetPINRequest payload to set PIN information

type SupportingDocument

type SupportingDocument struct {
	SupportingDocumentTitle       string `json:"supportingDocumentTitle" mapstructure:"supportingDocumentTitle"`
	SupportingDocumentDescription string `json:"supportingDocumentDescription" mapstructure:"supportingDocumentDescription"`
	SupportingDocumentUpload      string `json:"supportingDocumentUpload" mapstructure:"supportingDocumentUpload"`
}

SupportingDocument used to add more documents when

type ThinAddress

type ThinAddress struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

ThinAddress represents an addresses lat-long

type USSDLeadDetails

type USSDLeadDetails struct {
	ID             string           `json:"id"             firestore:"id"`
	Level          int              `json:"level"          firestore:"level"`
	PhoneNumber    string           `json:"phoneNumber"    firestore:"phoneNumber"`
	SessionID      string           `json:"sessionID"      firestore:"sessionID"`
	FirstName      string           `json:"firstName"      firestore:"firstName"`
	LastName       string           `json:"lastName"       firestore:"lastName"`
	DateOfBirth    scalarutils.Date `json:"dob"            firestore:"dob"`
	IsRegistered   bool             `json:"isRegistered"   firestore:"isRegistered"`
	ContactChannel string           `json:"contactChannel" firestore:"contactChannel"`
	WantCover      bool             `json:"wantCover"      firestore:"wantCover"`
	PIN            string           `json:"pin"            firestore:"pin"`
}

USSDLeadDetails represents ussd user session details

type UserAddresses

type UserAddresses struct {
	HomeAddress ThinAddress `json:"homeAddress"`
	WorkAddress ThinAddress `json:"workAddress"`
}

UserAddresses represents a user's home and work addresses

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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