Browse Source

职业病

bjmzak
wxd 1 year ago
parent
commit
4c06e79d03
  1. 5
      src/Shentun.Peis.Application.Contracts/MyUser/UserLoginDto.cs
  2. 5
      src/Shentun.Peis.Application.Contracts/OccupationalDiseases/PatientSymptomDto.cs
  3. 18
      src/Shentun.Peis.Application.Contracts/PrintReports/OccupationalDiseaseMedicalReportDto.cs
  4. 1
      src/Shentun.Peis.Application/MyUser/MyUserAppService.cs
  5. 44
      src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs
  6. 8
      src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs

5
src/Shentun.Peis.Application.Contracts/MyUser/UserLoginDto.cs

@ -20,6 +20,11 @@ namespace Shentun.Peis.MyUser
public Guid UserId { get; set; } public Guid UserId { get; set; }
/// <summary>
/// 用户操作类别
/// </summary>
public char OperatorType { get; set; }
public string access_token { get; set; } public string access_token { get; set; }
public string token_type { get; set; } public string token_type { get; set; }

5
src/Shentun.Peis.Application.Contracts/OccupationalDiseases/PatientSymptomDto.cs

@ -10,6 +10,11 @@ namespace Shentun.Peis.OccupationalDiseases
{ {
public Guid SymptomId { get; set; } public Guid SymptomId { get; set; }
/// <summary>
/// 症状名称
/// </summary>
public string SymptomName { get; set; }
/// <summary> /// <summary>
/// 程度 /// 程度
/// </summary> /// </summary>

18
src/Shentun.Peis.Application.Contracts/PrintReports/OccupationalDiseaseMedicalReportDto.cs

@ -7,7 +7,7 @@ using System.Text;
namespace Shentun.Peis.PrintReports namespace Shentun.Peis.PrintReports
{ {
public class OccupationalDiseaseMedicalReportDto: MedicalReportDto
public class OccupationalDiseaseMedicalReportDto : MedicalReportDto
{ {
/// <summary> /// <summary>
/// 职业病检查类别 /// 职业病检查类别
@ -174,10 +174,15 @@ namespace Shentun.Peis.PrintReports
public char? SmokeFlag { get; set; } public char? SmokeFlag { get; set; }
/// <summary> /// <summary>
/// 每天多少支
/// 每天多少支 区间开始
/// </summary> /// </summary>
public int? SmokeNum { get; set; } public int? SmokeNum { get; set; }
/// <summary>
/// 每天多少支 区间结束
/// </summary>
public int? SmokeNumMax { get; set; }
/// <summary> /// <summary>
/// 抽烟年限 /// 抽烟年限
/// </summary> /// </summary>
@ -189,10 +194,15 @@ namespace Shentun.Peis.PrintReports
public char? DrinkFlag { get; set; } public char? DrinkFlag { get; set; }
/// <summary> /// <summary>
/// 每次多少ml
/// 每次多少ml 区间开始
/// </summary> /// </summary>
public int? DrinkNum { get; set; } public int? DrinkNum { get; set; }
/// <summary>
/// 每次多少ml 区间结束
/// </summary>
public int? DrinkNumMax { get; set; }
/// <summary> /// <summary>
/// 饮酒年限 /// 饮酒年限
/// </summary> /// </summary>
@ -335,7 +345,7 @@ namespace Shentun.Peis.PrintReports
/// <summary> /// <summary>
/// 是否恢复 /// 是否恢复
/// </summary> /// </summary>
public char? IsRecovery { get; set; }
public string IsRecovery { get; set; }
/// <summary> /// <summary>
/// 治疗方式 /// 治疗方式

1
src/Shentun.Peis.Application/MyUser/MyUserAppService.cs

@ -610,6 +610,7 @@ namespace Shentun.Peis.MyUser
//msg = "登录成功", //msg = "登录成功",
peisid = PeisId, peisid = PeisId,
UserId = user.Id, UserId = user.Id,
OperatorType = user.GetProperty<char>("operator_type"),
access_token = token.AccessToken, access_token = token.AccessToken,
expires_in = token.ExpiresIn, expires_in = token.ExpiresIn,
refresh_token = token.RefreshToken, refresh_token = token.RefreshToken,

44
src/Shentun.Peis.Application/OccupationalDiseases/OccupationalDiseaseAppService.cs

@ -15,6 +15,7 @@ using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
@ -35,7 +36,7 @@ namespace Shentun.Peis.OccupationalDiseases
private readonly IRepository<PatientPastMedicalHistory, Guid> _patientPastMedicalHistoryRepository; private readonly IRepository<PatientPastMedicalHistory, Guid> _patientPastMedicalHistoryRepository;
private readonly PatientOccupationalDiseaseManager _patientOccupationalDiseaseManager; private readonly PatientOccupationalDiseaseManager _patientOccupationalDiseaseManager;
private readonly CacheService _cacheService; private readonly CacheService _cacheService;
private readonly IRepository<Symptom, Guid> _symptomRepository;
private readonly IRepository<Patient, Guid> _patientRepository; private readonly IRepository<Patient, Guid> _patientRepository;
private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository; private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository;
@ -327,7 +328,7 @@ namespace Shentun.Peis.OccupationalDiseases
LastModifierId = s.LastModifierId, LastModifierId = s.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).ToList();
}).OrderBy(o => o.CreationTime).ToList();
result.PatientPoisonDtos = patientPoisonDtos; result.PatientPoisonDtos = patientPoisonDtos;
@ -352,7 +353,7 @@ namespace Shentun.Peis.OccupationalDiseases
LastModifierId = s.LastModifierId, LastModifierId = s.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).ToList();
}).OrderBy(o => o.CreationTime).ToList();
result.PatientOccupationalMedicalHistoryDtos = patientOccupationalMedicalHistoryDtos; result.PatientOccupationalMedicalHistoryDtos = patientOccupationalMedicalHistoryDtos;
@ -377,7 +378,7 @@ namespace Shentun.Peis.OccupationalDiseases
LastModifierId = s.LastModifierId, LastModifierId = s.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).ToList();
}).OrderBy(o => o.CreationTime).ToList();
result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryDtos; result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryDtos;
@ -385,20 +386,31 @@ namespace Shentun.Peis.OccupationalDiseases
#region 症状 #region 症状
var patientSymptomList = await _patientSymptomRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId);
// var patientSymptomList = await _patientSymptomRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId);
var patientSymptomList = from patientSymptom in await _patientSymptomRepository.GetQueryableAsync()
join symptom in await _symptomRepository.GetQueryableAsync() on patientSymptom.SymptomId equals symptom.Id into symptomTemp
from symptomHaveEmpty in symptomTemp.DefaultIfEmpty()
where patientSymptom.PatientRegisterId == input.PatientRegisterId
select new
{
patientSymptom,
symptomName = symptomHaveEmpty != null ? symptomHaveEmpty.DisplayName : ""
};
List<PatientSymptomDto> patientSymptomDtos = patientSymptomList.Select(s => new PatientSymptomDto List<PatientSymptomDto> patientSymptomDtos = patientSymptomList.Select(s => new PatientSymptomDto
{ {
Degree = s.Degree,
SymptomId = s.SymptomId,
TimeLength = s.TimeLength,
CreationTime = s.CreationTime,
CreatorId = s.CreatorId,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).ToList();
Degree = s.patientSymptom.Degree,
SymptomId = s.patientSymptom.SymptomId,
TimeLength = s.patientSymptom.TimeLength,
SymptomName = s.symptomName,
CreationTime = s.patientSymptom.CreationTime,
CreatorId = s.patientSymptom.CreatorId,
LastModificationTime = s.patientSymptom.LastModificationTime,
LastModifierId = s.patientSymptom.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.patientSymptom.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.patientSymptom.LastModifierId).Result
}).OrderBy(o => o.CreationTime).ToList();
result.PatientSymptomDtos = patientSymptomDtos; result.PatientSymptomDtos = patientSymptomDtos;
@ -425,7 +437,7 @@ namespace Shentun.Peis.OccupationalDiseases
LastModificationTime = s.LastModificationTime, LastModificationTime = s.LastModificationTime,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result, CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).ToList();
}).OrderBy(o => o.CreationTime).ToList();
result.PatientOccupationalHistoryDtos = patientOccupationalHistoryDtos; result.PatientOccupationalHistoryDtos = patientOccupationalHistoryDtos;

8
src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs

@ -551,6 +551,7 @@ namespace Shentun.Peis.PrintReports
ChildrenNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.ChildrenNum, ChildrenNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.ChildrenNum,
DrinkFlag = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkFlag, DrinkFlag = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkFlag,
DrinkNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkNum, DrinkNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkNum,
DrinkNumMax = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkNum != null ? patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkNum.Value + 50 : null,
DrinkYears = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkYears, DrinkYears = patientOccupationalDiseaseEnt.patientOccupationalDisease.DrinkYears,
FirstMenstruation = patientOccupationalDiseaseEnt.patientOccupationalDisease.FirstMenstruation, FirstMenstruation = patientOccupationalDiseaseEnt.patientOccupationalDisease.FirstMenstruation,
HandleSuggestion = patientOccupationalDiseaseEnt.patientOccupationalDisease.HandleSuggestion, HandleSuggestion = patientOccupationalDiseaseEnt.patientOccupationalDisease.HandleSuggestion,
@ -572,6 +573,7 @@ namespace Shentun.Peis.PrintReports
RiskFactors = patientOccupationalDiseaseEnt.patientOccupationalDisease.RiskFactors, RiskFactors = patientOccupationalDiseaseEnt.patientOccupationalDisease.RiskFactors,
SmokeFlag = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeFlag, SmokeFlag = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeFlag,
SmokeNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeNum, SmokeNum = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeNum,
SmokeNumMax = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeNum != null ? patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeNum + 5 : null,
SmokeYears = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeYears, SmokeYears = patientOccupationalDiseaseEnt.patientOccupationalDisease.SmokeYears,
StillbirthTimes = patientOccupationalDiseaseEnt.patientOccupationalDisease.StillbirthTimes, StillbirthTimes = patientOccupationalDiseaseEnt.patientOccupationalDisease.StillbirthTimes,
TotalWorkTime = patientOccupationalDiseaseEnt.patientOccupationalDisease.TotalWorkTime TotalWorkTime = patientOccupationalDiseaseEnt.patientOccupationalDisease.TotalWorkTime
@ -647,7 +649,7 @@ namespace Shentun.Peis.PrintReports
{ {
DiagnosisDate = DataHelper.ConversionDateShortToString(s.DiagnosisDate), DiagnosisDate = DataHelper.ConversionDateShortToString(s.DiagnosisDate),
DiagnosisHospital = s.DiagnosisHospital, DiagnosisHospital = s.DiagnosisHospital,
IsRecovery = s.IsRecovery,
IsRecovery = s.IsRecovery == 'Y' ? "治愈" : "未愈",
OccupationalDisease = s.OccupationalDisease, OccupationalDisease = s.OccupationalDisease,
TreatmentMethods = s.TreatmentMethods, TreatmentMethods = s.TreatmentMethods,
DisplayOrder = patientOccupationalMedicalHistoryList.IndexOf(s) + 1 DisplayOrder = patientOccupationalMedicalHistoryList.IndexOf(s) + 1
@ -658,13 +660,13 @@ namespace Shentun.Peis.PrintReports
#region 既往病史 #region 既往病史
var patientPastMedicalHistoryList =( await _patientPastMedicalHistoryRepository.GetQueryableAsync())
var patientPastMedicalHistoryList = (await _patientPastMedicalHistoryRepository.GetQueryableAsync())
.Where(m => m.PatientRegisterId == input.PatientRegisterId).OrderBy(o => o.CreationTime).ToList(); .Where(m => m.PatientRegisterId == input.PatientRegisterId).OrderBy(o => o.CreationTime).ToList();
result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryList.Select(s => new OccupationalDiseaseMedicalReport_PatientOccupationalMedicalHistoryDto result.PatientPastMedicalHistoryDtos = patientPastMedicalHistoryList.Select(s => new OccupationalDiseaseMedicalReport_PatientOccupationalMedicalHistoryDto
{ {
DiagnosisDate = DataHelper.ConversionDateShortToString(s.DiagnosisDate), DiagnosisDate = DataHelper.ConversionDateShortToString(s.DiagnosisDate),
DiagnosisHospital = s.DiagnosisHospital, DiagnosisHospital = s.DiagnosisHospital,
IsRecovery = s.IsRecovery,
IsRecovery = s.IsRecovery == 'Y' ? "治愈" : "未愈",
OccupationalDisease = s.OccupationalDisease, OccupationalDisease = s.OccupationalDisease,
TreatmentMethods = s.TreatmentMethods, TreatmentMethods = s.TreatmentMethods,
DisplayOrder = patientPastMedicalHistoryList.IndexOf(s) + 1 DisplayOrder = patientPastMedicalHistoryList.IndexOf(s) + 1

Loading…
Cancel
Save