This file contains 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
function type(obj) { | |
var obj_type = typeof obj; | |
return ({ | |
is: function (type) { | |
return obj_type === type; | |
}, | |
is_object: function () { | |
return obj_type === "object"; | |
}, | |
is_func: function () { |
This file contains 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
//catan | |
// github.com/MichaelLPerry/dof | |
type Hand = { Wood: byte; Wheat: byte; Sheep: byte; Stone: byte; Gold:byte} with | |
member x.Values = [x.Wood; x.Wheat; x.Sheep; x.Stone; x.Gold] | |
member x.IsValid = x.Values |> Seq.forall ((>=) 0uy) | |
member x.HasAtLeast (resources:Hand) = | |
let calculated = x.Values |> Seq.map2 (<=) resources.Values | |
calculated |> Seq.forall id | |
static member Zero = {Wood = 0uy; Wheat = 0uy; Sheep = 0uy; Stone = 0uy; Gold = 0uy} |
This file contains 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
let internal save connection apptId apptPatientId apptPatientInfoId apptProviderScheduledId apptFacilityId apptStartTime apptEndTime apptTypeId apptStatus apptBillingStage apptLoS apptCheckInFlag apptCheckInTime apptCheckOutTime apptForeignEhrId apptAccidentRelated apptAccidentId apptAccidentDate apptAccidentState presentingCondition notesToBiller isChecked apptPrimaryGuarantorType admitStatus (admitFacilityId:int Nullable) referralPcp = | |
let admitStatus = if String.IsNullOrEmpty(admitStatus) then null else admitStatus | |
getScalar connection false (fun db -> db.UspAppointmentsInsUpd(apptId, apptPatientId, apptPatientInfoId, apptProviderScheduledId, apptFacilityId, apptStartTime, apptEndTime, apptTypeId, apptStatus, apptBillingStage, apptLoS, apptCheckInFlag, apptCheckInTime, apptCheckOutTime, apptForeignEhrId, apptAccidentRelated, apptAccidentId, apptAccidentDate, apptAccidentState, presentingCondition, notesToBiller, isChecked, apptPrimaryGuarantorType,admitStatus=admitStatus,admitFacilit |
This file contains 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
namespace Pm.Schema.DataModels.Claims // Generated by item in namespace PracticeManagement.Foundation | |
open System | |
open System.ComponentModel | |
open System.Linq.Expressions | |
/// 59 properties | |
type IClaim = | |
abstract member AccidentDate:DateTime Nullable with get | |
abstract member AccidentState:string with get |
This file contains 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
<#@ assembly name="System.Core" | |
#><#@ assembly name="System.Data.Linq" | |
#><#@ assembly name="EnvDTE" | |
#><#@ assembly name="EnvDTE80" | |
#><#@ assembly name="System.Xml" | |
#><#@ assembly name="System.Xml.Linq" | |
#><#@ import namespace="System" | |
#><#@ import namespace="System.CodeDom" | |
#><#@ import namespace="System.CodeDom.Compiler" | |
#><#@ import namespace="System.Collections.Generic" |
This file contains 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
<#@ template debug="True" language="C#" hostspecific="True" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Data" #> | |
<#@ assembly name="System.Data.Entity.Design" #> | |
<#@ import namespace="System.Globalization" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Data.Entity.Design.PluralizationServices" #> |
This file contains 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
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Data" #> | |
<#@ assembly name="System.Data.Entity.Design" #> | |
<#@ import namespace="System.Globalization" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Data.Entity.Design.PluralizationServices" #> | |
<# EnvDTE.DTE Dte; |
This file contains 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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<!-- for build server primarily --> | |
<FSharpTargetsPath Condition="'$(FSharpTargetsPath)' == '' And Exists('C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets')">C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | |
<FSharpTargetsPath Condition="'$(FSharpTargetsPath)' == '' And Exists('C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0')">C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> | |
<FSharpTargetsPath Condition="'$(FSharpTargetsPath)' == '' ">..\3rdParty\Microsoft.FSharp.Targets</FSharpTargetsPath> | |
<!-- love these option settings, but not required --> | |
<WarningLevel>5</WarningLevel> | |
<OtherFlags>--warnon:1182 --warnaserror-:0052</OtherFlags> | |
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
This file contains 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
module BReusable | |
open System | |
open System.Text | |
let trim (s:string) = if isNull s then null else s.Trim() | |
let after (delimiter:string) (s:string) = s.Substring(s.IndexOf delimiter + delimiter.Length) | |
let before (delimiter:string) (s:string) = s.Substring(0,s.IndexOf delimiter) | |
let beforeI (delimiter:string) (s:string) = s.Substring(0,s.IndexOf(delimiter, StringComparison.CurrentCultureIgnoreCase)) | |
let capture (pattern:string) (s:string) = Regex.Match(s, pattern).Groups.[1].Value | |
let isNullOrEmptyToOpt s = if String.IsNullOrEmpty s then None else Some s |
This file contains 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
module Pm.Dal.AdoHelper | |
// desired features | |
// "do we have a connectionstring or connection?" ignorance-capable coding | |
// "are we in a transaction?" ignorance-capable coding | |
// massive reduction in using blocks necessary | |
// remove any reliance/requirement to refer directly to System.Data in layers that need not | |
// conventions: | |
// pascal cased functions if they are specially crafted to be easier for C# to consume |
OlderNewer