From 62dced289a675ee7d4c273213f8a4ca18b3b2fb8 Mon Sep 17 00:00:00 2001 From: Lars Kemmann Date: Sun, 14 Jul 2024 16:45:57 -0400 Subject: [PATCH 1/2] NSwag codegen version update --- src/caretogether-pwa/src/GeneratedClient.ts | 2 +- swagger.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/caretogether-pwa/src/GeneratedClient.ts b/src/caretogether-pwa/src/GeneratedClient.ts index 74b0fe1f..f5061e54 100644 --- a/src/caretogether-pwa/src/GeneratedClient.ts +++ b/src/caretogether-pwa/src/GeneratedClient.ts @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v14.0.8.0 (NJsonSchema v11.0.1.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // //---------------------- diff --git a/swagger.json b/swagger.json index 2f8de9d1..7cd9e8ef 100644 --- a/swagger.json +++ b/swagger.json @@ -1,5 +1,5 @@ { - "x-generator": "NSwag v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))", + "x-generator": "NSwag v14.0.8.0 (NJsonSchema v11.0.1.0 (Newtonsoft.Json v13.0.0.0))", "openapi": "3.0.0", "info": { "title": "CareTogether CMS API", From 1fc3abe7a7c2376f783fe6564cc2227a4eeea85b Mon Sep 17 00:00:00 2001 From: Lars Kemmann Date: Sun, 14 Jul 2024 16:48:00 -0400 Subject: [PATCH 2/2] Promoting 'Primary Reason for Referral' custom referral field to OData --- src/CareTogether.Api/OData/LiveODataModelController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CareTogether.Api/OData/LiveODataModelController.cs b/src/CareTogether.Api/OData/LiveODataModelController.cs index 21a6a424..6839e04d 100644 --- a/src/CareTogether.Api/OData/LiveODataModelController.cs +++ b/src/CareTogether.Api/OData/LiveODataModelController.cs @@ -66,7 +66,7 @@ public sealed record Role([property: Key] string Name); public sealed record Referral([property: Key] Guid Id, [property: ForeignKey("FamilyId")] Family Family, Guid FamilyId, DateOnly Opened, DateOnly? Closed, string? ReferralSource, - ReferralCloseReason? CloseReason); + ReferralCloseReason? CloseReason, string? PrimaryReasonForReferral); public sealed record Arrangement([property: Key] Guid Id, [property: ForeignKey("TypeName")] ArrangementType Type, string TypeName, @@ -667,7 +667,8 @@ private static IEnumerable RenderReferrals( referralInfo.ClosedAtUtc.HasValue ? DateOnly.FromDateTime(referralInfo.ClosedAtUtc.Value) : null, // Making this 'custom field' semi-standard across organizations/policies. referralInfo.CompletedCustomFields.SingleOrDefault(field => field.CustomFieldName == "Referral Source")?.Value as string, - referralInfo.CloseReason)); + referralInfo.CloseReason, + referralInfo.CompletedCustomFields.SingleOrDefault(field => field.CustomFieldName == "Primary Reason for Referral")?.Value as string)); } private static IEnumerable RenderArrangements(