
import request from '@/utils/request'
// 申请单相关接口

/**
 * 查询检查申请单
 */
export function getCheck(queryParams) {
  return request({
    url: '/reg-doctorstation/request-form/get-check',
    method: 'get',
    params: queryParams
  })
}
/**
 * 查询检验申请单
 */
export function getInspection(queryParams) {
  return request({
    url: '/reg-doctorstation/request-form/get-inspection',
    method: 'get',
    params: queryParams
  })
}
/**
 * 查询输血申请单
 */
export function getBloodTransfusion(queryParams) {
  return request({
    url: '/reg-doctorstation/request-form/get-blood-transfusion',
    method: 'get',
    params: queryParams
  })
}
/**
 * 查询手术申请单
 */
export function getSurgery(queryParams) {
  return request({
    url: '/reg-doctorstation/request-form/get-surgery',
    method: 'get',
    params: queryParams
  })
}


/**
 * 查询护理医嘱信息
 */
export function getNursingOrdersInfos() {
  return request({
    url: '/reg-doctorstation/special-advice/nursing-orders',
    method: 'get'
  })
}

/**
 * 保存护理医嘱信息
 * @param {Object} data - 护理医嘱数据
 * @param {number} data.encounterId - 就诊id
 * @param {number} data.patientId - 患者id
 * @param {number} data.conditionId - 诊断ID
 * @param {number} data.encounterDiagnosisId - 就诊诊断id
 * @param {string} data.startTime - 医嘱开始时间 (yyyy-MM-dd HH:mm:ss)
 * @param {Array} data.nursingOrdersSaveDetailDtoList - 护理医嘱详情保存集合
 * @param {number} data.nursingOrdersSaveDetailDtoList[].definitionId - 护理项目定义ID
 * @param {number} data.nursingOrdersSaveDetailDtoList[].categoryEnum - 护理项目类别编码：
 *   26(护理级别)、38(病情)、39(护理常规)、27(膳食)、40(体位)、41(陪护)、42(隔离等级)
 */
export function saveNursingOrders(data) {
  return request({
    url: '/reg-doctorstation/special-advice/nursing-orders',
    method: 'post',
    data: data
  })
}

/**
 * 获取患者护理状态信息（用于回显）
 */
export function getEncounterNursingOrders(params) {
  return request({
    url: '/reg-doctorstation/special-advice/encounter-nursing-orders',
    method: 'get',
    params: params
  })
}


