Documentation
¶
Index ¶
- Constants
- Variables
- func NewId() string
- func SetSession(ctx context.Context, sess *Session) context.Context
- func Watch(fn func(c Config, quit chan bool))
- type Acompanhamento
- type Cache
- type Comercial
- type Config
- type Dashboard
- type Health
- type Item
- type Medico
- type Options
- type Paciente
- type Procedimento
- type Response
- type Session
- type User
- type Validator
Constants ¶
View Source
const EventGetHealth = "EVENT_GET_HEALTH"
EventGetHealth evento de health check via nats
Variables ¶
View Source
var MapConta = map[int64]string{
1: "_Terceiros",
2: "Din Caixa",
3: "Din Cofre",
4: "BB Clinica",
5: "BB Nucleo",
6: "Safra Cartões",
}
View Source
var MapFormaPagto = map[int64]string{
1: "Reembolso",
2: "Dinheiro",
3: "Transferencia",
4: "Boleto",
5: "Cheque",
6: "Débito",
7: "Crédito a Vista",
8: "Crédito Parcelado",
}
View Source
var MapFuncao = map[int64]string{
1: "CP",
2: "AN",
3: "IN",
4: "1AX",
5: "2AX",
}
View Source
var MapLocal = map[int64]string{
1: "Clinica Abrão",
2: "Albert Einstein",
3: "Lefort Liberdade",
4: "Lefort Morumbi",
5: "São Luiz Jabaquara",
6: "São Luiz Morumbi",
7: "São Luiz Itaim",
8: "Vila Nova Star",
}
View Source
var MapPlanoContas = map[int64]string{
1: "01.01.01 - Receitas Consultório",
2: "01.01.02 - Receitas Hospital",
3: "01.01.03 - Receitas Materiais",
4: "01.02.01 - Ajuste Conciliação de Receitas",
5: "01.02.02 - Faturamento Terceiros",
6: "01.02.03 - Receitas Taxas de Cirurgia",
7: "01.01.03 - Alugueis de Sala",
8: "01.01.03 - Outras Receitas",
}
View Source
var MapProcedimento = map[int64]string{
1: "CONSULTA",
2: "EXAMES",
3: "CIRURGIA",
4: "RETORNO",
5: "ESCLERO",
6: "CURATIVO",
7: "COMBOS",
8: "VENDAS DE PRODUTOS",
9: "TAXAS E LOCAÇÃO",
}
View Source
var MapStatusEsteira = map[int64]string{
1: "Convenio",
2: "Particular",
3: "Convẽnio + Extra",
}
View Source
var MapStatusPrevia = map[int64]string{
1: "01-Pendente envio de protocolo paciente",
2: "02-Pendente solicitação da prévia",
3: "03-Confirmação da prévia atrasada",
4: "04-Finalização da prévia atrasada",
}
View Source
var MapStatusProcedimento = map[int64]string{
1: "A Agendar",
2: "Agendado",
3: "Realizado",
4: "Cancelado",
}
View Source
var MapStatusReembolso = map[int64]string{
1: "01-Aguardando finalização de prévia",
2: "02-Envio para convênio atrasado",
3: "03-Liberação convênio atrasada",
4: "04-Repasse paciente atrasado",
5: "05-Repasse clínica atrasado",
}
View Source
var MapTipoPagto = map[int64]string{
1: "Reembolso",
2: "Extra",
3: "Particular",
}
Functions ¶
func SetSession ¶
SetSession sobrescreve o contexto com a sessão
Types ¶
type Acompanhamento ¶
type Acompanhamento struct { Id string `json:"id" bd:"id"` Id_Procedimento string `json:"id_procedimento" bd:"id_procedimento"` Desc_Procedimento string `json:"desc_procedimento" bd:"-"` Envio_Protocolo int64 `json:"envio_protocolo" bd:"envio_protocolo"` Solicitacao_Previa int64 `json:"solicitacao_previa" bd:"solicitacao_previa"` Confirmacao_Solicitacao int64 `json:"confirmacao_solicitacao" bd:"confirmacao_solicitacao"` Finalizacao_Previa int64 `json:"finalizacao_previa" bd:"finalizacao_previa"` Status_Previa int64 `json:"status_previa" bd:"status_previa"` DescStatusPrevia string `json:"desc_status_previa" bd:"-"` Envio_Convenio int64 `json:"envio_convenio" bd:"envio_convenio"` Liberacao int64 `json:"liberacao" bd:"liberacao"` Repasse_Paciente int64 `json:"repasse_paciente" bd:"repasse_paciente"` Repasse_Clinica int64 `json:"repasse_clinica" bd:"repasse_clinica"` Status_Reembolso int64 `json:"status_reembolso" bd:"status_reembolso"` DescStatusReembolso string `json:"desc_status_reembolso" bd:"-"` Obs string `json:"obs" bd:"obs"` }
func AcompanhamentoFromJson ¶
func AcompanhamentoFromJson(data io.Reader) (*Acompanhamento, error)
func (*Acompanhamento) PreSave ¶
func (me *Acompanhamento) PreSave()
func (*Acompanhamento) PreencheAcompanhamento ¶
func (me *Acompanhamento) PreencheAcompanhamento(r *Acompanhamento) *Acompanhamento
type Cache ¶
type Cache interface { Get(ctx context.Context, key string, v interface{}) error Set(ctx context.Context, key string, v interface{}) error Del(ctx context.Context, key string) error WithExpiration(d time.Duration) Cache }
Cache é a interface do pacote de cache
type Comercial ¶
type Comercial struct { Id string `json:"id" bd:"id"` Id_Procedimento string `json:"id_procedimento" bd:"id_procedimento"` Procedimento Procedimento `json:"procedimento" bd:"-"` Nome_Paciente string `json:"nome_paciente" bd:"-"` Nome_Medico string `json:"nome_medico" bd:"-"` Id_Medico_Part string `json:"id_medico_part" bd:"id_medico_part"` Nome_Medico_Part string `json:"nome_medico_part" bd:"-"` Funcao_Medico_Part int64 `json:"funcao_medico_part" bd:"funcao_medico_part"` Funcao_Medico_Part_Desc string `json:"funcao_medico_part_desc" bd:"-"` Qtd_Parcelas int64 `json:"qtd_parcelas" bd:"qtd_parcelas"` Valor_Parcelas float64 `json:"valor_parcelas" bd:"valor_parcelas"` Tipo_Pagamento int64 `json:"tipo_pagamento" bd:"tipo_pagamento"` Tipo_Pagamento_Desc string `json:"tipo_pagamento_desc" bd:"-"` Forma_Pagamento int64 `json:"forma_pagamento" bd:"forma_pagamento"` Forma_Pagamento_Desc string `json:"forma_pagamento_desc" bd:"-"` Data_Emissao_NF int64 `json:"data_emissao_nf" bd:"data_emissao_nf"` Data_Vencimento int64 `json:"data_vencimento" bd:"data_vencimento"` Data_Pagamento int64 `json:"data_pagamento" bd:"data_pagamento"` Data_Compensacao int64 `json:"data_compensacao" bd:"data_compensacao"` Plano_Contas int64 `json:"plano_contas" bd:"plano_contas"` Plano_Contas_Desc string `json:"plano_contas_desc" bd:"-"` Conta int64 `json:"conta" bd:"conta"` Conta_Desc string `json:"conta_desc" bd:"-"` Valor_Ajuste float64 `json:"valor_ajuste" bd:"valor_ajuste"` Valor_Liquido float64 `json:"valor_liquido" bd:"valor_liquido"` Obs string `json:"obs" bd:"obs"` }
func (*Comercial) PreencheComercial ¶
type Config ¶
type Config interface { GetInt(key string) int GetBool(key string) bool GetString(key string) string GetFloat64(key string) float64 GetDuration(key string) time.Duration GetStringSlice(key string) []string Close() }
Config interface de configuração
type Dashboard ¶
type Dashboard struct { StatusFinanceiro string `json:"status_financeiro"` StatusPrevia string `json:"status_previa"` StatusReembolso string `json:"status_reembolso"` NomePaciente string `json:"nome_paciente"` NomeMedico string `json:"nome_medico"` Procedimento string `json:"procedimento"` DataProcedimento int64 `json:"data_procedimento"` IdProcedimento string `json:"id_procedimento"` }
type Health ¶
type Health struct { Version string `json:"version"` ServerStatedAt string `json:"server_started_at"` DatabaseStatus string `json:"database_status" db:"database_status"` }
Health modelo padrão para o health check
type Item ¶
type Item struct { ID string `json:"id"` Token string `json:"token"` CreateAt int64 `json:"create_at"` ExpiresAt int64 `json:"expires_at"` LastActivityAt int64 `json:"last_activity_at"` UserID string `json:"user_id"` DeviceID string `json:"device_id"` Roles string `json:"roles"` IsOAuth bool `json:"is_oauth"` Props map[string]string `json:"props"` }
Item de exemplo
func ItemFromJson ¶
ItemFromJson converte um io.Reader para *Item
type Medico ¶
type Paciente ¶
type Paciente struct { Id string `json:"id" bd:"id"` Cpf string `json:"cpf" bd:"cpf"` Nome string `json:"nome" bd:"nome"` Telefone string `json:"telefone" bd:"telefone"` Telefone2 string `json:"telefone2" bd:"telefone2"` Convenio string `json:"convenio" bd:"convenio"` Plano string `json:"plano" bd:"plano"` Acomodacao string `json:"acomodacao" bd:"acomodacao"` Status int64 `json:"status" bd:"status"` }
type Procedimento ¶
type Procedimento struct { Id string `json:"id" bd:"id"` Id_Paciente string `json:"id_paciente" bd:"id_paciente"` Nome_Paciente string `json:"nome_paciente" bd:"-"` Id_Medico string `json:"id_medico" bd:"id_medico"` Nome_Medico string `json:"nome_medico" bd:"-"` Desc_Procedimento string `json:"desc_procedimento" bd:"desc_procedimento"` Procedimento int64 `json:"procedimento" bd:"procedimento"` NomeProcedimento string `json:"nome_procedimento" bd:"-"` Local_Procedimento int64 `json:"local_procedimento" bd:"local_procedimento"` NomeLocal string `json:"nome_local" bd:"-"` Status int64 `json:"status" bd:"status"` NomeStatus string `json:"nome_status" bd:"-"` Data int64 `json:"data" bd:"data"` Valor float64 `json:"valor" bd:"valor"` Esteira int64 `json:"esteira" bd:"esteira"` DescEsteira string `json:"desc_esteira" bd:"-"` }
func ProcedimentosFromJson ¶
func ProcedimentosFromJson(data io.Reader) (*Procedimento, error)
func (*Procedimento) PreSave ¶
func (me *Procedimento) PreSave()
func (*Procedimento) PreencheProcedimentos ¶
func (me *Procedimento) PreencheProcedimentos(r *Procedimento) *Procedimento
func (*Procedimento) Validate ¶
func (me *Procedimento) Validate() error
type Response ¶
type Response struct { Data interface{} `json:"data,omitempty" swaggerignore:"true"` Meta map[string]interface{} `json:"metadata,omitempty" swaggerignore:"true"` Err error `json:"error,omitempty" swaggerignore:"true"` }
Response is a default model
type Session ¶
type Session struct { ID string `json:"id"` Token string `json:"token"` CreateAt int64 `json:"create_at"` ExpiresAt int64 `json:"expires_at"` LastActivityAt int64 `json:"last_activity_at"` UserID string `json:"user_id"` DeviceID string `json:"device_id"` Roles string `json:"roles"` IsOAuth bool `json:"is_oauth"` Props map[string]string `json:"props"` }
Session modelo padrão de sessão
Click to show internal directories.
Click to hide internal directories.