rama creada apartir de master en j
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace adas_core.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a diagnosis associated with a patient, encapsulating the relevant diagnostic information.
|
||||
/// </summary>
|
||||
public class PatientDiagnosis
|
||||
{
|
||||
public ObjectId Id { get; set; }
|
||||
@@ -45,24 +48,31 @@ public class PatientDiagnosis
|
||||
set => CodingSystem = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string representation of the <see cref="PatientDiagnosis"/> instance, including its core fields
|
||||
/// (id, time, patientId, messageTime, startTime, endTime) and conditionally appending optional properties
|
||||
/// (codingSystem, label, code, state, category) only when they have non-empty values.
|
||||
/// </summary>
|
||||
/// <returns>A formatted string in the form <c>PatientDiagnosis[field1: value1, field2: value2, ...]</c>
|
||||
/// containing the diagnosis data; optional fields are omitted when null or empty.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
List<string> items =
|
||||
[
|
||||
$"id: {Id}",
|
||||
$"time: {Time}",
|
||||
$"patientid: {PatientId}"
|
||||
];
|
||||
if (!string.IsNullOrEmpty(CodingSystem)) items.Add($"label: {CodingSystem}");
|
||||
if (!string.IsNullOrEmpty(Label)) items.Add($"label: {Label}");
|
||||
if (!string.IsNullOrEmpty(Code)) items.Add($"diagnosisCode: {Code}");
|
||||
if (!string.IsNullOrEmpty(State)) items.Add($"state: {State}");
|
||||
if (!string.IsNullOrEmpty(Category)) items.Add($"category: {Category}");
|
||||
items.Add($"messageTime: {MessageTime}");
|
||||
items.Add($"startTime: {StartTime}");
|
||||
items.Add($"startTime: {StartTime}");
|
||||
items.Add($"endTime: {EndTime}");
|
||||
|
||||
return "PatientDiagnosis[" + string.Join(", ", items) + "]";
|
||||
}
|
||||
{
|
||||
List<string> items =
|
||||
[
|
||||
$"id: {Id}",
|
||||
$"time: {Time}",
|
||||
$"patientid: {PatientId}"
|
||||
];
|
||||
if (!string.IsNullOrEmpty(CodingSystem)) items.Add($"label: {CodingSystem}");
|
||||
if (!string.IsNullOrEmpty(Label)) items.Add($"label: {Label}");
|
||||
if (!string.IsNullOrEmpty(Code)) items.Add($"diagnosisCode: {Code}");
|
||||
if (!string.IsNullOrEmpty(State)) items.Add($"state: {State}");
|
||||
if (!string.IsNullOrEmpty(Category)) items.Add($"category: {Category}");
|
||||
items.Add($"messageTime: {MessageTime}");
|
||||
items.Add($"startTime: {StartTime}");
|
||||
items.Add($"startTime: {StartTime}");
|
||||
items.Add($"endTime: {EndTime}");
|
||||
|
||||
return "PatientDiagnosis[" + string.Join(", ", items) + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user