Files
AIclinicalresearch/backend/src/modules/asl/fulltext-screening/__tests__/fulltext-screening-api.http
HaHafeng d4d33528c7 feat(dc): Complete Phase 1 - Portal workbench page development
Summary:
- Implement DC module Portal page with 3 tool cards
- Create ToolCard component with decorative background and hover animations
- Implement TaskList component with table layout and progress bars
- Implement AssetLibrary component with tab switching and file cards
- Complete database verification (4 tables confirmed)
- Complete backend API verification (6 endpoints ready)
- Optimize UI to match prototype design (V2.html)

Frontend Components (~715 lines):
- components/ToolCard.tsx - Tool cards with animations
- components/TaskList.tsx - Recent tasks table view
- components/AssetLibrary.tsx - Data asset library with tabs
- hooks/useRecentTasks.ts - Task state management
- hooks/useAssets.ts - Asset state management
- pages/Portal.tsx - Main portal page
- types/portal.ts - TypeScript type definitions

Backend Verification:
- Backend API: 1495 lines code verified
- Database: dc_schema with 4 tables verified
- API endpoints: 6 endpoints tested (templates API works)

Documentation:
- Database verification report
- Backend API test report
- Phase 1 completion summary
- UI optimization report
- Development task checklist
- Development plan for Tool B

Status: Phase 1 completed (100%), ready for browser testing
Next: Phase 2 - Tool B Step 1 and 2 development
2025-12-02 21:53:24 +08:00

283 lines
7.6 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
###
# API
# 使REST ClientVS Code
###
@baseUrl = http://localhost:3001
@apiPrefix = /api/v1/asl/fulltext-screening
### ========================================
###
### ========================================
### 1.
GET {{baseUrl}}/api/v1/asl/projects
Content-Type: application/json
### 2. projectId
@projectId = 55941145-bba0-4b15-bda4-f0a398d78208
GET {{baseUrl}}/api/v1/asl/projects/{{projectId}}/literatures?page=1&limit=10
Content-Type: application/json
### ========================================
### API 1:
### ========================================
### 1.1:
# @name createTask
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "{{projectId}}",
"literatureIds": [
"e9c18ba3-9ad7-4cc9-ac78-b74a7ec91b12",
"e44ea8d9-6ba8-4b88-8d24-4fb46b3584e0"
],
"modelA": "deepseek-v3",
"modelB": "qwen-max",
"promptVersion": "v1.0.0"
}
### taskId
@taskId = {{createTask.response.body.data.taskId}}
### 1.2:
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "{{projectId}}"
}
### 1.3: projectId
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "00000000-0000-0000-0000-000000000000",
"literatureIds": ["lit-001"]
}
### 1.4: literatureIds
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "{{projectId}}",
"literatureIds": []
}
### ========================================
### API 2:
### ========================================
### 2.1:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}
Content-Type: application/json
### 2.2: taskId
GET {{baseUrl}}{{apiPrefix}}/tasks/00000000-0000-0000-0000-000000000000
Content-Type: application/json
### 2.3: 5
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}
Content-Type: application/json
### ========================================
### API 3:
### ========================================
### 3.1:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results
Content-Type: application/json
### 3.2: 10
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?page=1&pageSize=10
Content-Type: application/json
### 3.3:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?filter=conflict
Content-Type: application/json
### 3.4:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?filter=pending
Content-Type: application/json
### 3.5:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?filter=reviewed
Content-Type: application/json
### 3.6:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?sortBy=priority&sortOrder=desc
Content-Type: application/json
### 3.7:
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?sortBy=createdAt&sortOrder=asc
Content-Type: application/json
### 3.8: 2
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?page=2&pageSize=5
Content-Type: application/json
### 3.9: filter
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?filter=invalid
Content-Type: application/json
### 3.10: pageSize
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?pageSize=999
Content-Type: application/json
### ========================================
### API 4:
### ========================================
### ID
# @name getFirstResult
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/results?pageSize=1
Content-Type: application/json
### resultId
@resultId = {{getFirstResult.response.body.data.results[0].resultId}}
### 4.1:
PUT {{baseUrl}}{{apiPrefix}}/results/{{resultId}}/decision
Content-Type: application/json
{
"finalDecision": "include",
"reviewNotes": ""
}
### 4.2:
PUT {{baseUrl}}{{apiPrefix}}/results/{{resultId}}/decision
Content-Type: application/json
{
"finalDecision": "exclude",
"exclusionReason": "field9",
"reviewNotes": "P±SD"
}
### 4.3:
PUT {{baseUrl}}{{apiPrefix}}/results/{{resultId}}/decision
Content-Type: application/json
{
"finalDecision": "exclude"
}
### 4.4: finalDecision
PUT {{baseUrl}}{{apiPrefix}}/results/{{resultId}}/decision
Content-Type: application/json
{
"finalDecision": "maybe"
}
### 4.5: resultId
PUT {{baseUrl}}{{apiPrefix}}/results/00000000-0000-0000-0000-000000000000/decision
Content-Type: application/json
{
"finalDecision": "include"
}
### ========================================
### API 5: Excel
### ========================================
### 5.1: Excel
GET {{baseUrl}}{{apiPrefix}}/tasks/{{taskId}}/export
Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
### 5.2: ExceltaskId
GET {{baseUrl}}{{apiPrefix}}/tasks/00000000-0000-0000-0000-000000000000/export
Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
### ========================================
###
### ========================================
### 1:
# @name fullFlowTask
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "{{projectId}}",
"literatureIds": [
"e9c18ba3-9ad7-4cc9-ac78-b74a7ec91b12"
],
"modelA": "deepseek-v3",
"modelB": "qwen-max"
}
@fullFlowTaskId = {{fullFlowTask.response.body.data.taskId}}
### 2: 2
GET {{baseUrl}}{{apiPrefix}}/tasks/{{fullFlowTaskId}}
Content-Type: application/json
### 3:
# @name fullFlowResults
GET {{baseUrl}}{{apiPrefix}}/tasks/{{fullFlowTaskId}}/results
Content-Type: application/json
@fullFlowResultId = {{fullFlowResults.response.body.data.results[0].resultId}}
### 4:
PUT {{baseUrl}}{{apiPrefix}}/results/{{fullFlowResultId}}/decision
Content-Type: application/json
{
"finalDecision": "include",
"reviewNotes": " - "
}
### 5: Excel
GET {{baseUrl}}{{apiPrefix}}/tasks/{{fullFlowTaskId}}/export
Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
### ========================================
###
### ========================================
### :
POST {{baseUrl}}{{apiPrefix}}/tasks
Content-Type: application/json
{
"projectId": "{{projectId}}",
"literatureIds": [
"e9c18ba3-9ad7-4cc9-ac78-b74a7ec91b12",
"e44ea8d9-6ba8-4b88-8d24-4fb46b3584e0",
"c8f9e2d1-3a4b-5c6d-7e8f-9a0b1c2d3e4f"
],
"modelA": "deepseek-v3",
"modelB": "qwen-max"
}
### ========================================
###
### ========================================
### 使
###
GET {{baseUrl}}/api/v1/asl/projects/{{projectId}}/literatures
Content-Type: application/json
###