This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Threading | |
open System.Threading.Tasks | |
/// <summary> | |
/// Represents an asynchronous agent that processes messages of type 'T. | |
/// This is a wrapper around FSharp's MailboxProcessor, providing a unified API for agent-based concurrency. | |
/// </summary> | |
type Agent<'T>(body: Agent<'T> -> Async<unit>) as self = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type DoseRule = { | |
Id: string | |
Name: string | |
Description: string | |
Dosage: string | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AtriumDB Domain Model - Physiological Data Storage and Retrieval System | |
open System | |
// Core Value Types | |
type DeviceId = DeviceId of string | |
type PatientId = PatientId of string | |
type BedspaceId = BedspaceId of string | |
type SignalType = SignalType of string | |
type Timestamp = Timestamp of int64 // millisecond precision |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "nuget: Octokit" | |
open Octokit | |
open System | |
open System.IO | |
open System.Text.RegularExpressions | |
// Configuration | |
type Config = { | |
Token: string | |
RepoUrl: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "nuget: IcedTasks" | |
#r "nuget: Microsoft.SemanticKernel, 1.21.1" | |
#r "nuget: FSharp.Control.TaskSeq, 0.4.0" | |
open IcedTasks | |
open Microsoft.SemanticKernel | |
open System | |
open System.ComponentModel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "nuget: Newtonsoft.Json" | |
/// Utility methods to use ollama | |
/// https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion | |
module Ollama = | |
open System |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Main | |
End Sub | |
' Define other methods and classes here | |
Public Function CalcPELOD2Score(intGCS As Integer, strPupil As String, dblLactate As Double, intMAP As Integer, | |
intMos As Integer, dblCreat As Double, intPaO2 As Integer, intFiO2 As Integer, | |
intPaCO2 As Integer, blnVent As Boolean, intWBC As Integer, intPlatelets As Integer) As Integer | |
Dim intScore As Integer = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Main | |
End Sub | |
' This function, CalculatePedSOFAScore, calculates the Pediatric Sequential Organ Failure Assessment (pSOFA) score for a child based on various physiological parameters. | |
' The pSOFA score is used to assess the extent of organ dysfunction in critically ill patients. | |
' | |
' The function takes several parameters including the age of the child in months, partial pressure of oxygen to fraction of inspired oxygen (PaO2/FiO2), | |
' saturation of peripheral oxygen to fraction of inspired oxygen (SpO2/FiO2), platelet count, bilirubin, mean arterial pressure (MAP), | |
' rates of infusion of various vasoactive drugs (Dopamine, Dobutamine, Epinephrine, Norepinephrine), Glasgow Coma Scale (GCS), and Creatinine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Main | |
Dim SOFAScore As Integer | |
SOFAScore = CalculateSOFAScore(350, 120, 14, 1.5, 75, 0, 0, 0.1, 0.1, 2.5, 600, True) | |
Console.WriteLine("SOFA Score: " & SOFAScore) | |
End Sub | |
' A function that calculates a SOFA score (Sequential Organ Failure Assessment) | |
' This function calculates the SOFA (Sequential Organ Failure Assessment) score based on various parameters. | |
' The SOFA score is used to assess the extent of a person's organ function or rate of failure in the ICU (Intensive Care Unit). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Main | |
Dim SOFAScore As Integer | |
SOFAScore = CalculateSOFAScore(350, 120, 14, 1.5, 75, 0, 0, 0.1, 0.1, 2.5, 600, True) | |
Console.WriteLine("SOFA Score: " & SOFAScore) | |
End Sub | |
' A function that calculates a SOFA score (Sequential Organ Failure Assessment) | |
' This function calculates the SOFA (Sequential Organ Failure Assessment) score based on various parameters. | |
' The SOFA score is used to assess the extent of a person's organ function or rate of failure in the ICU (Intensive Care Unit). |
NewerOlder