feature: HL7 FHIR R4 Integration

This commit is contained in:
voltsrage
2026-06-27 22:23:45 +08:00
parent 756cff332c
commit 5646dfddb4
27 changed files with 2658 additions and 16 deletions
@@ -0,0 +1,27 @@
using Hl7.Fhir.Model;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
[ApiController]
[Route("fhir")]
[Produces("application/fhir+json")]
public class FhirMetadataController : ControllerBase
{
private readonly IFhirService _fhir;
public FhirMetadataController(IFhirService fhir) => _fhir = fhir;
/// <summary>
/// FHIR metadata: GET /fhir/metadata
/// Returns the server's CapabilityStatement describing supported
/// resources, interactions, and search parameters.
/// No authentication required (FHIR spec requirement).
/// </summary>
[HttpGet("metadata")]
[AllowAnonymous]
[ProducesResponseType(typeof(CapabilityStatement), StatusCodes.Status200OK)]
public IActionResult GetMetadata()
{
return Ok(_fhir.GetCapabilityStatement());
}
}