2023-11-28 14:18:00 +03:30
|
|
|
|
using DocuMed.Common.Extensions;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DocuMed.Domain.Entities.MedicalHistory;
|
2023-10-19 21:28:09 +03:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public partial class MedicalHistoryAnswer
|
|
|
|
|
|
{
|
|
|
|
|
|
public static MedicalHistoryAnswer Create(
|
|
|
|
|
|
string answer,
|
|
|
|
|
|
string question,
|
|
|
|
|
|
MedicalHistoryPart part,
|
|
|
|
|
|
MedicalHistoryQuestionType questionType,
|
|
|
|
|
|
Guid medicalHistoryId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new MedicalHistoryAnswer(answer, question, part, questionType, medicalHistoryId);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public partial class MedicalHistory
|
|
|
|
|
|
{
|
|
|
|
|
|
public MedicalHistoryAnswer AddAnswer(string answer, string question, MedicalHistoryPart part, MedicalHistoryQuestionType questionType)
|
|
|
|
|
|
{
|
|
|
|
|
|
var mhAnswer = MedicalHistoryAnswer.Create(answer, question, part, questionType, Id);
|
|
|
|
|
|
Answers.Add(mhAnswer);
|
|
|
|
|
|
return mhAnswer;
|
|
|
|
|
|
}
|
|
|
|
|
|
public static MedicalHistory Create(
|
|
|
|
|
|
string chiefComplaint,
|
2023-10-28 23:57:28 +03:30
|
|
|
|
Guid sectionId,
|
2023-10-19 21:28:09 +03:30
|
|
|
|
string presentIllnessDetail,
|
|
|
|
|
|
string pastDiseasesHistoryDetail,
|
|
|
|
|
|
string pastSurgeryHistoryDetail,
|
|
|
|
|
|
string familyHistoryDetail,
|
|
|
|
|
|
string allergyDetail,
|
|
|
|
|
|
string drugHistoryDetail,
|
|
|
|
|
|
string addictionHistoryDetail,
|
|
|
|
|
|
string systemReviewDetail,
|
|
|
|
|
|
string vitalSignDetail,
|
2023-11-05 16:14:13 +03:30
|
|
|
|
string generalAppearanceDetail,
|
2023-11-18 13:02:16 +03:30
|
|
|
|
double systolicBloodPressure,
|
|
|
|
|
|
double diastolicBloodPressure,
|
|
|
|
|
|
double pulseRate,
|
|
|
|
|
|
double sPO2,
|
|
|
|
|
|
double temperature,
|
2025-01-12 11:22:32 +03:30
|
|
|
|
Guid studentId,
|
|
|
|
|
|
Guid patientId,
|
2023-11-05 16:14:13 +03:30
|
|
|
|
Guid medicalHistoryTemplateId)
|
2023-10-19 21:28:09 +03:30
|
|
|
|
{
|
2023-11-28 14:18:00 +03:30
|
|
|
|
var code = StringExtensions.GetIntId(6);
|
2023-10-19 21:28:09 +03:30
|
|
|
|
return new MedicalHistory(presentIllnessDetail,
|
|
|
|
|
|
pastDiseasesHistoryDetail,
|
|
|
|
|
|
pastSurgeryHistoryDetail,
|
|
|
|
|
|
familyHistoryDetail,
|
|
|
|
|
|
allergyDetail,
|
|
|
|
|
|
drugHistoryDetail,
|
|
|
|
|
|
addictionHistoryDetail,
|
|
|
|
|
|
systemReviewDetail,
|
|
|
|
|
|
vitalSignDetail,
|
2023-11-05 16:14:13 +03:30
|
|
|
|
generalAppearanceDetail,
|
2023-10-28 23:57:28 +03:30
|
|
|
|
chiefComplaint,
|
|
|
|
|
|
sectionId,
|
|
|
|
|
|
systolicBloodPressure,
|
|
|
|
|
|
diastolicBloodPressure,
|
|
|
|
|
|
pulseRate,
|
|
|
|
|
|
sPO2,
|
2023-11-28 14:18:00 +03:30
|
|
|
|
temperature,
|
|
|
|
|
|
code,
|
2025-01-12 11:22:32 +03:30
|
|
|
|
studentId,
|
|
|
|
|
|
patientId,
|
2023-11-05 16:14:13 +03:30
|
|
|
|
medicalHistoryTemplateId);
|
2023-10-19 21:28:09 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|