igengx
This commit is contained in:
+38
-7
@@ -380,6 +380,15 @@ export interface PrescriptionEsignConfig {
|
||||
review_enabled?: boolean
|
||||
}
|
||||
|
||||
export interface PrescriptionEsignLogEntry {
|
||||
event: string
|
||||
label: string
|
||||
time: number
|
||||
source: 'tsa' | 'system' | 'local'
|
||||
actor_name?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
export interface PrescriptionEsignStatus extends PrescriptionEsignConfig {
|
||||
required: boolean
|
||||
status: 'pending' | 'authenticating' | 'signing' | 'signed' | 'failed' | 'uncertain' | 'voided' | 'legacy'
|
||||
@@ -396,8 +405,17 @@ export interface PrescriptionEsignStatus extends PrescriptionEsignConfig {
|
||||
issued_at?: number
|
||||
signature_time?: number
|
||||
signature_time_source?: 'tsa' | 'local' | ''
|
||||
doctor_signer_name?: string
|
||||
review_required?: boolean
|
||||
review_state?: PrescriptionEsignReviewStatus['state']
|
||||
review_submitted_at?: number
|
||||
awaiting_upload?: boolean
|
||||
can_submit_for_review?: boolean
|
||||
can_review_prescription?: boolean
|
||||
review_signer_name?: string
|
||||
review_signature?: string
|
||||
review_signature_time?: number
|
||||
signing_log?: PrescriptionEsignLogEntry[]
|
||||
signed_at?: number
|
||||
auth_url?: string
|
||||
}
|
||||
@@ -449,6 +467,8 @@ export interface PrescriptionEsignDoctorStatus {
|
||||
enabled: boolean
|
||||
status: 'unbound' | 'needs_mobile' | 'renewal_required' | 'authenticating' | 'binding_required' | 'ready'
|
||||
cert_expires_at: number
|
||||
certificate_state?: 'valid' | 'renewal_required' | 'unconfirmed'
|
||||
can_edit_signer_name?: boolean
|
||||
identity_details_required?: boolean
|
||||
quicksign_enabled?: boolean
|
||||
quicksign_authorizing?: boolean
|
||||
@@ -463,8 +483,12 @@ export function prescriptionEsignConfig(): Promise<PrescriptionEsignConfig> {
|
||||
return request.get({ url: '/tcm.prescription/esignConfig' })
|
||||
}
|
||||
|
||||
export function prescriptionEsignStatus(params: { id: number }): Promise<PrescriptionEsignStatus> {
|
||||
return request.get({ url: '/tcm.prescription/esignStatus', params })
|
||||
export function prescriptionEsignSetConfig(params: { enabled: boolean }): Promise<PrescriptionEsignConfig> {
|
||||
return request.post({ url: '/tcm.prescription/esignSetConfig', params })
|
||||
}
|
||||
|
||||
export function prescriptionEsignStatus(params: { id: number }, signal?: AbortSignal): Promise<PrescriptionEsignStatus> {
|
||||
return request.get({ url: '/tcm.prescription/esignStatus', params, signal }, { ignoreCancelToken: true })
|
||||
}
|
||||
|
||||
/** Read-only identity readiness; this endpoint never submits a signature. */
|
||||
@@ -496,7 +520,7 @@ export function prescriptionEsignDoctorStatus(signal?: AbortSignal): Promise<Pre
|
||||
)
|
||||
}
|
||||
|
||||
export function prescriptionEsignDoctorStart(params: { mobile?: string }): Promise<PrescriptionEsignDoctorStatus> {
|
||||
export function prescriptionEsignDoctorStart(params: { mobile?: string; signer_name?: string }): Promise<PrescriptionEsignDoctorStatus> {
|
||||
return request.post(
|
||||
{ url: '/tcm.prescription/esignDoctorStart', params, timeout: 180000 },
|
||||
{ isOpenRetry: false, retryCount: 0, ignoreCancelToken: true }
|
||||
@@ -557,8 +581,8 @@ export function prescriptionDelete(params: { id: number }) {
|
||||
}
|
||||
|
||||
// 处方详情
|
||||
export function prescriptionDetail(params: { id: number }) {
|
||||
return request.get({ url: '/tcm.prescription/detail', params })
|
||||
export function prescriptionDetail(params: { id: number }, signal?: AbortSignal) {
|
||||
return request.get({ url: '/tcm.prescription/detail', params, signal }, signal ? { ignoreCancelToken: true } : undefined)
|
||||
}
|
||||
|
||||
// 根据诊单获取处方列表
|
||||
@@ -572,10 +596,17 @@ export function prescriptionGetByAppointment(params: { appointment_id: number })
|
||||
}
|
||||
|
||||
// 作废处方
|
||||
export function prescriptionVoid(params: { id: number }) {
|
||||
export function prescriptionVoid(params: { id: number; pending_only?: boolean }) {
|
||||
return request.post({ url: '/tcm.prescription/void', params })
|
||||
}
|
||||
|
||||
export function prescriptionSubmitForReview(params: {
|
||||
id: number
|
||||
}): Promise<{ review_submitted_at: number; can_submit_for_review: false }> {
|
||||
return request.post({ url: '/tcm.prescription/submitForReview', params },
|
||||
{ isOpenRetry: false, retryCount: 0, ignoreCancelToken: true })
|
||||
}
|
||||
|
||||
/** 处方审核:action approve | reject(驳回同时作废处方) */
|
||||
export function prescriptionAudit(params: {
|
||||
id: number
|
||||
@@ -816,7 +847,7 @@ export function prescriptionOrderSetShipMode(params: { id: number; ship_mode: 'g
|
||||
|
||||
// ========== 处方库 ==========
|
||||
|
||||
export type PrescriptionAiProfile = 'qwen' | 'openai'
|
||||
export type PrescriptionAiProfile = 'qwen' | 'openai' | 'doubao'
|
||||
|
||||
export interface PrescriptionLibraryHerb {
|
||||
medicine_id?: number
|
||||
|
||||
Reference in New Issue
Block a user