service

package
v0.0.0-...-9910568 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	State         bool   `json:"State"`
	TransactionID string `json:"TransactionID"`
}

type Data

type Data struct {
	Common
	QueryData string
}

type Doctor

type Doctor struct {
	Common
	Id             string `json:"id"`             //医生身份证号
	Name           string `json:"name"`           //医生姓名
	DepartmentName string `json:"departmentName"` //科室名称
	DepartmentId   string `json:"departmentId"`   //科室id
}

type Drug

type Drug struct {
	Common
	Name  string `json:"name"`  //药品名
	Id    string `json:"id"`    //药品id
	Links []Link `json:"links"` //流通环节
}

type InsuranceForm

type InsuranceForm struct {
	Common
	Id               string `json:"id"`               //保险单id
	Date             string `json:"date"`             //保险单写入日期
	Company          string `json:"company"`          //保险公司名
	InsuranceContent string `json:"insuranceContent"` //保险单详情
}
type Link struct {
	LinkName    string `json:"linkName"`    //经过的环节名称
	LinkTime    string `json:"linkTime"`    //经过环节的时间
	LinkPlace   string `json:"linkPlace"`   //经过环节的地点
	LinkContent string `json:"linkContent"` //在此环节进行的操作
}

type MedicalRecord

type MedicalRecord struct {
	Common
	Id               string `json:"id"`               //病历id
	Date             string `json:"date"`             //病历写入日期
	Doctor           Doctor `json:"doctor"`           //医生
	DiagnosisResults string `json:"diagnosisResults"` //诊断结果
}

type Patient

type Patient struct {
	Common
	Id                string             `json:"id"` //身份证号
	Name              string             `json:"name"`
	Money             string             `json:"money"`
	MedicalRecords    []MedicalRecord    `json:"medicalRecords"`    //病历数组
	RegistrationForms []RegistrationForm `json:"registrationForms"` //挂号单数组
	InsuranceForms    []InsuranceForm    `json:"insuranceForms"`    //保险单数组
}

type RegistrationForm

type RegistrationForm struct {
	Common
	Id     string `json:"id"`     //挂号单id
	Date   string `json:"date"`   //挂号单写入日期
	Doctor Doctor `json:"doctor"` //医生
}

type ServiceSetup

type ServiceSetup struct {
	ChaincodeID string
	Client      *channel.Client
}

func (*ServiceSetup) FindDrug

func (t *ServiceSetup) FindDrug(id string) (Drug, error)

查询药品

func (*ServiceSetup) FindRegis

func (t *ServiceSetup) FindRegis(id string) (RegistrationForm, error)

查询挂号单

func (*ServiceSetup) GetInfo

func (t *ServiceSetup) GetInfo(name string) (string, error)

func (*ServiceSetup) GetInsurance

func (t *ServiceSetup) GetInsurance(id string) (InsuranceForm, error)

查询保险单

func (*ServiceSetup) GetPatient

func (t *ServiceSetup) GetPatient(id string) (Patient, error)

查询病人

func (*ServiceSetup) RecordDrug

func (t *ServiceSetup) RecordDrug(name, id, lname, ltime, lplace, lcontent string) (string, error)

存储药品

func (*ServiceSetup) RecordRegis

func (t *ServiceSetup) RecordRegis(id, date, doctorid, doctorname, departmentname, departmentid string) (string, error)

存储挂号单

func (*ServiceSetup) SetInfo

func (t *ServiceSetup) SetInfo(key, value string) (string, error)

func (*ServiceSetup) SetInsure

func (t *ServiceSetup) SetInsure(id, company, insuranceContent, date string) (string, error)

存储保险单

func (*ServiceSetup) SetPatient

func (t *ServiceSetup) SetPatient(id, name, money string, insform InsuranceForm, regisform RegistrationForm, medicalRecord MedicalRecord) (string, error)

存储病人

Jump to

Keyboard shortcuts

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