# Class PatientObservation

Namespace
  adas_core.Domain.Models

Assembly
  adas-core.Domain.dll

Represents a patient observation, extending the base patient observation value functionality.

    public class PatientObservation : BasePatientObservationValue

Inheritance
  object
  JsonConverter
  BasePatientObservation
  BasePatientObservationValue
  PatientObservation

Inherited Members
  BasePatientObservationValue.Value
  BasePatientObservation.Id
  BasePatientObservation.PatientId
  BasePatientObservation.UserId
  BasePatientObservation.ClinicalEpisode
  BasePatientObservation.Patient
  BasePatientObservation.SystemId
  BasePatientObservation.Code
  BasePatientObservation.CodingSystem
  BasePatientObservation.ParentData
  BasePatientObservation.Time
  BasePatientObservation.EndTime
  BasePatientObservation.Name
  BasePatientObservation.Units
  BasePatientObservation.CheckObservations
  BasePatientObservation.CreateObservation
  BasePatientObservation.ToJsonString()
  BasePatientObservation.ToListString()
  BasePatientObservation.CanConvert(Type)
  BasePatientObservation.WriteJson(JsonWriter, object, JsonSerializer)
  BasePatientObservation.ReadJson(JsonReader, Type, object, JsonSerializer)
  JsonConverter.CanRead
  JsonConverter.CanWrite
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Remarks

This class serves as a concrete implementation of patient observation data, inheriting common observation value behavior from BasePatientObservationValue.

## Constructors

### PatientObservation()

    public PatientObservation()

### PatientObservation(ObjectId, object, string?)

    public PatientObservation(ObjectId patientId, object value, string? name)

#### Parameters

`patientId` ObjectId
`value` object
`name` string

## Properties

### Alarm

    public AlarmConfig? Alarm { get; set; }

#### Property Value

AlarmConfig

### AlertColor

    public string? AlertColor { get; set; }

#### Property Value

string

### ColorOnExpired

    public string? ColorOnExpired { get; set; }

#### Property Value

string

### Expired

    [BsonDefaultValue(false)]
    public bool Expired { get; set; }

#### Property Value

bool

### Expires

    public int? Expires { get; set; }

#### Property Value

int?

### InsertMode

    public ObservationEnum.InsertMode InsertMode { get; set; }

#### Property Value

ObservationEnum.InsertMode

### Level

    public int Level { get; set; }

#### Property Value

int

### Max

    public double? Max { get; set; }

#### Property Value

double?

### MaxWarn

    public double? MaxWarn { get; set; }

#### Property Value

double?

### MessageTime

    public DateTime MessageTime { get; set; }

#### Property Value

DateTime

### Min

    public double? Min { get; set; }

#### Property Value

double?

### MinWarn

    public double? MinWarn { get; set; }

#### Property Value

double?

### Persist

    public bool? Persist { get; set; }

#### Property Value

bool?

### Result

    public string? Result { get; set; }

#### Property Value

string

### ShowOnExpired

    public bool ShowOnExpired { get; set; }

#### Property Value

bool

### Status

    public StatusEnum.Type Status { get; set; }

#### Property Value

StatusEnum.Type

### UiConfiguration

    public Dictionary<string, object>? UiConfiguration { get; set; }

#### Property Value

Dictionary<string, object>

### WarnColor

    public string? WarnColor { get; set; }

#### Property Value

string

## Methods

### DeepCopy()

Creates a copy of the current PatientObservation instance by performing a shallow copy via MemberwiseClone and casting the cloned object back to PatientObservation.

    public PatientObservation DeepCopy()

#### Returns

PatientObservation

  A PatientObservation instance that is a shallow copy of the current object.

### ToString()

Returns a string representation of the PatientObservation, including its value, optional min/max/warning thresholds, result, status, expiration, and persistence settings. Optional properties are only included in the output when they have non-null or, for strings, non-empty values.

    public override string ToString()

#### Returns

string

  A formatted string in the form `PatientObservation[property1: value1, ...]` containing the populated properties of the observation.