Skip to contents

R6 class representing a health unit e.g. a GP practice or hospital.

R6 class representing a health unit e.g. a GP practice or hospital.

Public fields

.metadata

A data.frame storing meatadata for health unit

.data

A data.frame storing health statistics for health unit.

Methods


Method new()

Create instance of health unit.

Usage

health_unit$new(.metadata, .data)

Arguments

.metadata

(data.frame)
A data.frame storing metadata for health unit.

.data

(data.frame)
A data.frame storing health statistics for health unit.


Method validate()

Validate structure of health unit.

Usage

health_unit$validate()


Method metadata()

Get metadata of health unit.

Usage

health_unit$metadata()


Method data()

Get data of health unit.

Usage

health_unit$data()


Method combine_data()

Get combined metadata and data in single data.frame.

Usage

health_unit$combine_data()


Method ID()

Get ID of health unit.

Usage

health_unit$ID()


Method title()

Get title of health unit.

Usage

health_unit$title()


Method address()

Get address of health unit.

Usage

health_unit$address()


Method health_board()

Get health board of health unit.

Usage

health_unit$health_board()


Method popup_modal()

Initialise model popup of health unit.

Usage

health_unit$popup_modal(ns)

Arguments

ns

(character(1))
Namespace to create health unit UI.


Method clone()

The objects of this class are cloneable with this method.

Usage

health_unit$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.