ehr

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Infra       *infrastructure.Infra
	Doc         *service.DefaultDocumentService
	DocGroup    *docGroupService.Service
	User        *userService.Service
	GroupAccess *groupAccess.Service
}

func NewService

func NewService(docSvc *docService.DefaultDocumentService, userSvc *userService.Service, docGroupSvc *docGroupService.Service, gaSvc *groupAccess.Service) *Service

func (*Service) CreateStatus

func (s *Service) CreateStatus(ehrStatusID string, subject base.PartySelf) (doc *model.EhrStatus, err error)

func (*Service) CreateSubject

func (s *Service) CreateSubject(subjectID, subjectNamespace, subType string) (subject base.PartySelf)

func (*Service) EhrCreate

func (s *Service) EhrCreate(ctx context.Context, userID, systemID string, ehrUUID, groupAccessUUID *uuid.UUID, request *model.EhrCreateRequest, procRequest *proc.Request) (*model.EHR, error)

func (*Service) EhrCreateWithID

func (s *Service) EhrCreateWithID(ctx context.Context, userID, systemID string, ehrUUID, groupAccessUUID *uuid.UUID, request *model.EhrCreateRequest, procRequest *proc.Request) (*model.EHR, error)

func (*Service) GetByID

func (s *Service) GetByID(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID) ([]byte, error)

func (*Service) GetDocBySubject

func (s *Service) GetDocBySubject(ctx context.Context, userID, systemID, subjectID, namespace string) (docDecrypted []byte, err error)

GetDocBySubject Get decrypted document by subject

func (*Service) GetStatus

func (s *Service) GetStatus(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID) (*model.EhrStatus, error)

GetStatus Get current (last) status of EHR document

func (*Service) GetStatusByNearestTime

func (s *Service) GetStatusByNearestTime(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID, nearestTime time.Time) ([]byte, error)

func (*Service) GetStatusByVersionID

func (s *Service) GetStatusByVersionID(ctx context.Context, userID, systemID string, ehrUUID *uuid.UUID, versionID *base.ObjectVersionID) ([]byte, error)

func (*Service) SaveEhr

func (s *Service) SaveEhr(ctx context.Context, multiCallTx *indexer.MultiCallTx, procRequest *proc.Request, userID, systemID string, doc *model.EHR, allDocsGroup *model.DocumentGroup) error

func (*Service) SaveStatus

func (s *Service) SaveStatus(ctx context.Context, multiCallTx *indexer.MultiCallTx, procRequest *proc.Request, userID, systemID string, ehrUUID *uuid.UUID, status *model.EhrStatus, allDocsGroup *model.DocumentGroup) error

func (*Service) UpdateEhr

func (s *Service) UpdateEhr(ctx context.Context, multiCallTx *indexer.MultiCallTx, procRequest *proc.Request, userID, systemID string, ehrUUID *uuid.UUID, status *model.EhrStatus, allDocsGroup *model.DocumentGroup) error

func (*Service) UpdateStatus

func (s *Service) UpdateStatus(ctx context.Context, procRequest *proc.Request, userID, systemID string, ehrUUID *uuid.UUID, status *model.EhrStatus) error

func (*Service) ValidateEhr

func (s *Service) ValidateEhr(ehr *model.EHR) bool

func (*Service) ValidateStatus

func (s *Service) ValidateStatus(status *model.EhrStatus) bool

Jump to

Keyboard shortcuts

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