medical_logic = new MedicalLogic(); } /** * 挂号预结算 * @param RegisterPreSettleRequest $request * @param string $patient_id * @return JsonResponse * @throws GeneralException */ public function registerPreSettle(RegisterPreSettleRequest $request, string $patient_id): JsonResponse { $patient_property = PatientProperty::from((int) $request->patient_property); $settle_type = SettleType::from((int) $request->settle_type); $response = $this->medical_logic->registerPreSettle( $patient_id, $request->date, $request->dept_id, $request->doctor_id, $request->reg_id, $patient_property, $settle_type ); return jsonResponse(Response::HTTP_OK, 'success', RegisterPreSettleResource::make($response)->toArray()); } /** * 医保支付 * @param Request $request * @param string $patient_id * @return JsonResponse * @throws GeneralException */ public function register(Request $request, string $patient_id): JsonResponse { $patient_property = PatientProperty::from((int) $request->patient_property); $settle_type = SettleType::from((int) $request->settle_type); $response = $this->medical_logic->medicalRegister( $patient_id, $request->date, $request->dept_id, $request->doctor_id, $request->reg_id, $patient_property, $settle_type ); return jsonResponse(Response::HTTP_OK, 'success', $response); } }