=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -37,6 +37,7 @@ public class ConfigUnitsService(
|
||||
/// </summary>
|
||||
/// <param name="obs">The patient observation to be mapped.</param>
|
||||
/// <returns>The mapped observation when a matching unit configuration is resolved; otherwise, the original observation.</returns>
|
||||
/// <!-- aidoc:v1 sig=2c52e52 body=2db877e -->
|
||||
public async Task<T> Map<T>(T obs) where T : BasePatientObservation
|
||||
{
|
||||
if (!_configUnitsRequired) return obs;
|
||||
@@ -52,6 +53,7 @@ public class ConfigUnitsService(
|
||||
/// </summary>
|
||||
/// <param name="obs">The <see cref="PumpObservation"/> to be mapped.</param>
|
||||
/// <returns>The mapped <see cref="PumpObservation"/>, returned as-is when units configuration is not required or after pump value mapping otherwise.</returns>
|
||||
/// <!-- aidoc:v1 sig=daf9ea9 body=c2e84ce -->
|
||||
public async Task<PumpObservation> Map(PumpObservation obs)
|
||||
{
|
||||
if (!_configUnitsRequired) return obs;
|
||||
@@ -68,6 +70,7 @@ public class ConfigUnitsService(
|
||||
/// <summary>
|
||||
/// Recorre recursivamente las propiedades del objeto para encontrar y convertir PumpValues.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=01209a6 body=958cccd -->
|
||||
private async Task MapPumpValues(object? targetObject)
|
||||
{
|
||||
if (targetObject == null) return;
|
||||
@@ -106,6 +109,7 @@ public class ConfigUnitsService(
|
||||
/// <param name="obs">The base patient observation to which the configured unit value will be applied.</param>
|
||||
/// <param name="conf">The configuration unit item whose <c>Value</c> is used as the unit to assign.</param>
|
||||
/// <returns>The input observation, with <c>Units</c> set from <paramref name="conf"/> when applicable, or the unchanged observation when it is not a <see cref="PatientObservation"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=ef286fc body=8674339 -->
|
||||
private T MapConf<T>(T obs, ConfigUnitItem conf) where T : BasePatientObservation
|
||||
{
|
||||
if (obs is not PatientObservation pobs) return obs;
|
||||
@@ -122,6 +126,7 @@ public class ConfigUnitsService(
|
||||
/// </summary>
|
||||
/// <param name="code">The unique code identifier of the configuration unit item to look up.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the matching <see cref="ConfigUnitItem"/>, or null if the configuration is unavailable or no item is found.</returns>
|
||||
/// <!-- aidoc:v1 sig=b153e30 body=ca52840 -->
|
||||
public async Task<ConfigUnitItem?> Get(string code)
|
||||
{
|
||||
var result = await GetConfig();
|
||||
@@ -138,6 +143,7 @@ public class ConfigUnitsService(
|
||||
/// A <see cref="Task{TResult}"/> containing the cached or freshly fetched <see cref="ConfigUnits"/>, or
|
||||
/// <c>null</c> if the repository lookup fails.
|
||||
/// </returns>
|
||||
/// <!-- aidoc:v1 sig=982237a body=0843e00 -->
|
||||
private async Task<ConfigUnits?> GetConfig()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user