Spaces:
Sleeping
Sleeping
Commit
·
e75450b
1
Parent(s):
8170b74
Update
Browse files
frontend/src/components/ReportModal.tsx
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
import { useState } from 'react';
|
| 2 |
import { XIcon } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
interface ReportModalProps {
|
| 5 |
isOpen: boolean;
|
|
@@ -16,7 +20,6 @@ export interface ReportFormData {
|
|
| 16 |
metadata: {
|
| 17 |
physician: string;
|
| 18 |
facility: string;
|
| 19 |
-
specimen_type: string;
|
| 20 |
clinical_history?: string;
|
| 21 |
};
|
| 22 |
notes?: string;
|
|
@@ -26,12 +29,11 @@ export interface ReportFormData {
|
|
| 26 |
|
| 27 |
export function ReportModal({ isOpen, onClose, onSubmit, analysisId, analysisSummaryJson }: ReportModalProps) {
|
| 28 |
const [formData, setFormData] = useState<ReportFormData>({
|
| 29 |
-
patient_id:
|
| 30 |
exam_date: new Date().toISOString().split('T')[0],
|
| 31 |
metadata: {
|
| 32 |
-
physician:
|
| 33 |
-
facility:
|
| 34 |
-
specimen_type: '',
|
| 35 |
clinical_history: '',
|
| 36 |
},
|
| 37 |
notes: '',
|
|
@@ -106,6 +108,7 @@ export function ReportModal({ isOpen, onClose, onSubmit, analysisId, analysisSum
|
|
| 106 |
id="patient_id"
|
| 107 |
value={formData.patient_id}
|
| 108 |
onChange={handleChange}
|
|
|
|
| 109 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 110 |
/>
|
| 111 |
</div>
|
|
@@ -141,6 +144,7 @@ export function ReportModal({ isOpen, onClose, onSubmit, analysisId, analysisSum
|
|
| 141 |
id="metadata.physician"
|
| 142 |
value={formData.metadata.physician}
|
| 143 |
onChange={handleChange}
|
|
|
|
| 144 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 145 |
/>
|
| 146 |
</div>
|
|
@@ -155,23 +159,11 @@ export function ReportModal({ isOpen, onClose, onSubmit, analysisId, analysisSum
|
|
| 155 |
id="metadata.facility"
|
| 156 |
value={formData.metadata.facility}
|
| 157 |
onChange={handleChange}
|
|
|
|
| 158 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 159 |
/>
|
| 160 |
</div>
|
| 161 |
-
|
| 162 |
-
<label htmlFor="metadata.specimen_type" className="block text-sm font-medium text-gray-700">
|
| 163 |
-
Specimen Type *
|
| 164 |
-
</label>
|
| 165 |
-
<input
|
| 166 |
-
required
|
| 167 |
-
type="text"
|
| 168 |
-
name="metadata.specimen_type"
|
| 169 |
-
id="metadata.specimen_type"
|
| 170 |
-
value={formData.metadata.specimen_type}
|
| 171 |
-
onChange={handleChange}
|
| 172 |
-
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 173 |
-
/>
|
| 174 |
-
</div>
|
| 175 |
<div>
|
| 176 |
<label htmlFor="metadata.clinical_history" className="block text-sm font-medium text-gray-700">
|
| 177 |
Clinical History
|
|
|
|
| 1 |
import { useState } from 'react';
|
| 2 |
import { XIcon } from 'lucide-react';
|
| 3 |
+
// Static defaults for fields requested to be static. Change these constants to update the values shown.
|
| 4 |
+
const DEFAULT_PATIENT_ID = '41334';
|
| 5 |
+
const DEFAULT_PHYSICIAN = 'Rajesh Venugopal';
|
| 6 |
+
const DEFAULT_FACILITY = 'Multi-Lab Speciality';
|
| 7 |
|
| 8 |
interface ReportModalProps {
|
| 9 |
isOpen: boolean;
|
|
|
|
| 20 |
metadata: {
|
| 21 |
physician: string;
|
| 22 |
facility: string;
|
|
|
|
| 23 |
clinical_history?: string;
|
| 24 |
};
|
| 25 |
notes?: string;
|
|
|
|
| 29 |
|
| 30 |
export function ReportModal({ isOpen, onClose, onSubmit, analysisId, analysisSummaryJson }: ReportModalProps) {
|
| 31 |
const [formData, setFormData] = useState<ReportFormData>({
|
| 32 |
+
patient_id: DEFAULT_PATIENT_ID,
|
| 33 |
exam_date: new Date().toISOString().split('T')[0],
|
| 34 |
metadata: {
|
| 35 |
+
physician: DEFAULT_PHYSICIAN,
|
| 36 |
+
facility: DEFAULT_FACILITY,
|
|
|
|
| 37 |
clinical_history: '',
|
| 38 |
},
|
| 39 |
notes: '',
|
|
|
|
| 108 |
id="patient_id"
|
| 109 |
value={formData.patient_id}
|
| 110 |
onChange={handleChange}
|
| 111 |
+
readOnly
|
| 112 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 113 |
/>
|
| 114 |
</div>
|
|
|
|
| 144 |
id="metadata.physician"
|
| 145 |
value={formData.metadata.physician}
|
| 146 |
onChange={handleChange}
|
| 147 |
+
readOnly
|
| 148 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 149 |
/>
|
| 150 |
</div>
|
|
|
|
| 159 |
id="metadata.facility"
|
| 160 |
value={formData.metadata.facility}
|
| 161 |
onChange={handleChange}
|
| 162 |
+
readOnly
|
| 163 |
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"
|
| 164 |
/>
|
| 165 |
</div>
|
| 166 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
<div>
|
| 168 |
<label htmlFor="metadata.clinical_history" className="block text-sm font-medium text-gray-700">
|
| 169 |
Clinical History
|