fix security

This commit is contained in:
voltsrage
2026-06-21 19:53:19 +08:00
parent a37fad0e57
commit 7170b6efad
14 changed files with 422 additions and 27 deletions
@@ -30,7 +30,7 @@ public class FhirMetadataController : ControllerBase
Software = new CapabilityStatement.SoftwareComponent { Name = "VigilCare Clinical" },
Implementation = new CapabilityStatement.ImplementationComponent
{
Description = "VigilCare Clinical FHIR R4 inbound facade",
Description = "VigilCare Clinical FHIR R4 facade",
Url = $"{Request.Scheme}://{Request.Host}/fhir/R4"
},
FhirVersion = FHIRVersion.N4_0_1,
@@ -42,8 +42,14 @@ public class FhirMetadataController : ControllerBase
Mode = CapabilityStatement.RestfulCapabilityMode.Server,
Resource = new List<CapabilityStatement.ResourceComponent>
{
ResourceCapability("Patient", TypeRestfulInteraction.Create),
ResourceCapability("Encounter", TypeRestfulInteraction.Create),
ResourceCapability("Patient",
TypeRestfulInteraction.Create,
TypeRestfulInteraction.Read,
TypeRestfulInteraction.SearchType),
ResourceCapability("Encounter",
TypeRestfulInteraction.Create,
TypeRestfulInteraction.Read,
TypeRestfulInteraction.SearchType),
ResourceCapability("Observation", TypeRestfulInteraction.Create),
ResourceCapability("MedicationAdministration", TypeRestfulInteraction.Create),
new CapabilityStatement.ResourceComponent
@@ -63,13 +69,12 @@ public class FhirMetadataController : ControllerBase
}
private static CapabilityStatement.ResourceComponent ResourceCapability(
string type, TypeRestfulInteraction interaction) =>
string type, params TypeRestfulInteraction[] interactions) =>
new()
{
Type = type,
Interaction = new List<CapabilityStatement.ResourceInteractionComponent>
{
new() { Code = interaction }
}
Interaction = interactions
.Select(i => new CapabilityStatement.ResourceInteractionComponent { Code = i })
.ToList()
};
}