diff --git a/.github/workflows/release_leave.yaml b/.github/workflows/release_leave.yaml index ed90a260..6ade856c 100644 --- a/.github/workflows/release_leave.yaml +++ b/.github/workflows/release_leave.yaml @@ -48,7 +48,7 @@ jobs: username: ${{secrets.DOCKER_USER}} password: ${{secrets.DOCKER_PASS}} - name: Build and load local docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64 diff --git a/BMA.EHR.Command.Service/Controllers/OrderController.cs b/BMA.EHR.Command.Service/Controllers/OrderController.cs index ee5ddb90..cc1591d4 100644 --- a/BMA.EHR.Command.Service/Controllers/OrderController.cs +++ b/BMA.EHR.Command.Service/Controllers/OrderController.cs @@ -812,25 +812,25 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; order.PositionName = req.registerPosition; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; // c-pm-01 ถึง c-pm-04 - var placement = await _placementRepository.GetByIdAsync(req.examRound); - order.Placement = placement!; + // var placement = await _placementRepository.GetByIdAsync(req.examRound); + // order.Placement = placement!; order.ConclusionRegisterNo = req.conclusionRegisterNo; order.ConclusionRegisterDate = req.conclusionRegisterDate; order.ConclusionResultNo = req.conclusionResultNo; @@ -922,25 +922,25 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; order.PositionName = req.registerPosition; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; // c-pm-01 ถึง c-pm-04 - var placement = await _placementRepository.GetByIdAsync(req.examRound); - order.Placement = placement!; + // var placement = await _placementRepository.GetByIdAsync(req.examRound); + // order.Placement = placement!; order.ConclusionRegisterNo = req.conclusionRegisterNo; order.ConclusionRegisterDate = req.conclusionRegisterDate; order.ConclusionResultNo = req.conclusionResultNo; @@ -1032,25 +1032,25 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; order.PositionName = req.registerPosition; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; // c-pm-01 ถึง c-pm-04 - var placement = await _placementRepository.GetByIdAsync(req.examRound); - order.Placement = placement!; + // var placement = await _placementRepository.GetByIdAsync(req.examRound); + // order.Placement = placement!; order.ConclusionRegisterNo = req.conclusionRegisterNo; order.ConclusionRegisterDate = req.conclusionRegisterDate; order.ConclusionResultNo = req.conclusionResultNo; @@ -1142,25 +1142,25 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; order.PositionName = req.registerPosition; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; // c-pm-01 ถึง c-pm-04 - var placement = await _placementRepository.GetByIdAsync(req.examRound); - order.Placement = placement!; + // var placement = await _placementRepository.GetByIdAsync(req.examRound); + // order.Placement = placement!; order.ConclusionRegisterNo = req.conclusionRegisterNo; order.ConclusionRegisterDate = req.conclusionRegisterDate; order.ConclusionResultNo = req.conclusionResultNo; @@ -1247,18 +1247,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.ConclusionMeetingNo = req.conclusionMeetingNo; @@ -1345,18 +1345,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.ConclusionMeetingNo = req.conclusionMeetingNo; @@ -1439,18 +1439,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; var result = await _repository.UpdateAsync(order); @@ -1533,18 +1533,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; @@ -1634,18 +1634,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; @@ -1743,18 +1743,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.PlacementCommandIssuer = req.placementCommandIssuer; @@ -1850,18 +1850,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.PlacementCommandIssuer = req.placementCommandIssuer; @@ -1950,18 +1950,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.PlacementCommandIssuer = req.placementCommandIssuer; @@ -2048,18 +2048,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.ReceiveOrganizationName = req.receiveOrganizationName; @@ -2146,18 +2146,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.TransferOrganizationName = req.transferOrganizationName; @@ -2241,18 +2241,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; var result = await _repository.UpdateAsync(order); @@ -2335,18 +2335,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.GovAidCommandNo = req.govAidCommandNo; @@ -2429,18 +2429,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; var result = await _repository.UpdateAsync(order); @@ -2526,18 +2526,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.Fault = req.fault; @@ -2635,18 +2635,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.Fault = req.fault; @@ -2749,18 +2749,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.Fault = req.fault; @@ -2857,18 +2857,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; //order.PlacementCommandIssuer = req.placementCommandIssuer; @@ -2952,18 +2952,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; var result = await _repository.UpdateAsync(order); @@ -3043,18 +3043,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; var result = await _repository.UpdateAsync(order); @@ -3137,18 +3137,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.ConclusionTranferNo = req.conclusionTranferNo; order.ConclusionTranferDate = req.conclusionTranferDate; @@ -3235,18 +3235,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3337,18 +3337,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3439,18 +3439,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3540,18 +3540,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3641,18 +3641,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3742,18 +3742,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3843,18 +3843,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -3944,18 +3944,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4047,18 +4047,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4152,18 +4152,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4257,18 +4257,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4362,18 +4362,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4467,18 +4467,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; @@ -4572,18 +4572,18 @@ namespace BMA.EHR.Command.Service.Controllers throw new Exception(GlobalMessages.CommandNotFound); - var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); - var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); + // var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue); + // var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId); order.CommandNo = req.orderNo; order.CommandYear = req.orderYear.ToString(); order.CommandSubject = req.orderTitle; - order.CommandType = commandType!; + // order.CommandType = commandType!; order.IssuerOrganizationId = req.orderBy; order.IssuerOrganizationName = req.orderByOrganizationName; order.AuthorizedUserFullName = req.signatoryBy; order.AuthorizedPosition = req.signatoryPosition; - order.CommandStatus = status!; + // order.CommandStatus = status!; order.CommandAffectDate = req.orderDate; order.CaseFault = req.caseFault; order.FaultLevel = req.faultLevel; diff --git a/BMA.EHR.Command.Service/appsettings.json b/BMA.EHR.Command.Service/appsettings.json index 980f7296..79efcf23 100644 --- a/BMA.EHR.Command.Service/appsettings.json +++ b/BMA.EHR.Command.Service/appsettings.json @@ -14,7 +14,7 @@ "AllowedHosts": "*", "ConnectionStrings": { //"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB", - "DefaultConnection": "server=192.168.1.61;user=root;password=adminVM123;port=4061;database=bma_ehr;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" + "DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;" }, "Jwt": { "Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI", diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index d1b07731..779b1611 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -471,8 +471,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers foreach (var d in req.result) { var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates - .Include(x=>x.DisciplineDisciplinary) - .Where(x => x.Status == "REPORT") + .Include(x => x.DisciplineDisciplinary) + //.Where(x => x.Status == "REPORT") .Where(x => x.Id == d.id) .FirstOrDefaultAsync(); if (data != null) @@ -491,7 +491,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers date = d.commandAffectDate, detail = data.DisciplineDisciplinary.Title, level = data.DisciplineDisciplinary.DisciplinaryFaultLevel, - refCommandDate = "", + refCommandDate = DateTime.Now, refCommandNo = $"{d.commandNo}/{d.commandYear}", unStigma = d.detail, }); @@ -537,7 +537,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers date = d.commandAffectDate, detail = data.DisciplineDisciplinary.Title, level = data.DisciplineDisciplinary.DisciplinaryFaultLevel, - refCommandDate = "", + refCommandDate = DateTime.Now, refCommandNo = $"{d.commandNo}/{d.commandYear}", unStigma = d.detail, }); @@ -582,7 +582,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers date = d.commandAffectDate, detail = data1.DisciplineInvestigate.Title, level = "", - refCommandDate = "", + refCommandDate = DateTime.Now, refCommandNo = $"{d.commandNo}/{d.commandYear}", unStigma = d.detail, }); @@ -594,8 +594,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => x.IsReport == "REPORT") .Where(x => x.Id == d.id) .FirstOrDefaultAsync(); - if (data2 != null) { - data2.IsReport = "NEW"; + if (data2 != null) + { + data2.IsReport = "NEW"; var baseAPI = _configuration["API"]; var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; using (var client = new HttpClient()) @@ -608,7 +609,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers date = d.commandAffectDate, detail = data2.DisciplineDisciplinary.Title, level = data2.DisciplineDisciplinary.DisciplinaryFaultLevel, - refCommandDate = "", + refCommandDate = DateTime.Now, refCommandNo = $"{d.commandNo}/{d.commandYear}", unStigma = d.detail, }); @@ -638,7 +639,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers .Where(x => x.Status == "REPORT") .Where(x => x.Id == d.id) .FirstOrDefaultAsync(); - if (data != null) { + if (data != null) + { data.Status = "DONE"; var baseAPI = _configuration["API"]; var apiUrlDiscipline = $"{baseAPI}/org/profile/discipline"; @@ -652,7 +654,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers date = d.commandAffectDate, detail = data.DisciplineDisciplinary.Title, level = data.DisciplineDisciplinary.DisciplinaryFaultLevel, - refCommandDate = "", + refCommandDate = DateTime.Now, refCommandNo = $"{d.commandNo}/{d.commandYear}", unStigma = d.detail, });