Skip to content

Commit

Permalink
Add drug registration process and new treatment pages
Browse files Browse the repository at this point in the history
Introduce a new Decentralized Clinical Trial Drug Registration Process using Mermaid for visualization. Additionally, add new placeholder pages for treatment conditions and a list view for fetching conditions in the DFDA app.
  • Loading branch information
mikepsinn committed Sep 7, 2024
1 parent 756198d commit 76e89a7
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/dfda/conditions/[conditionName]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client"
import React from 'react'



export default function ConditionPage() {

return (
<div className="container mx-auto px-4 py-8 space-y-8">

</div>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use client"
import React from 'react'
export default function TreatmentForConditionPage() {
return (
<div className="container mx-auto px-4 py-8 space-y-8">
TODO: Implement this page
</div>
)
}
17 changes: 17 additions & 0 deletions app/dfda/conditions/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use client"
import React from 'react'
import { fetchConditions } from '../dfdaActions'
export default async function ConditionListPage() {

const conditions = await fetchConditions()
return (
<div className="container mx-auto px-4 py-8 space-y-8">
<h1 className="text-2xl font-bold">Conditions</h1>
<ul>
{conditions.map((condition) => (
<li key={condition.id}>{condition.name}</li>
))}
</ul>
</div>
)
}
7 changes: 7 additions & 0 deletions lib/utils/slugify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function slugify(text: string): string {
return text
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '')
.replace(/^(\d)/, 'n$1'); // Prepend 'n' if slug starts with a number
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
graph TD
A["Login to company account"] --> B["Click 'Register New Drug'"]
B --> C["Enter drug information"]
C --> D["Upload documentation"]
D --> E["AI generates study protocols"]
E --> F{"Review and approve protocols"}
F -->|"Approved"| G["System submits for regulatory review"]
F -->|"Needs adjustment"| E
G --> H["Begin participant recruitment"]
H --> I["Receive enrollment updates"]
I --> J["Ship drug to pharmacies/participants"]
J --> K["System manages trial logistics"]
K --> L["Monitor trial progress"]
L --> M{"Trial complete?"}
M -->|"No"| L
M -->|"Yes"| N["System generates final report"]
N --> O["Receive final report"]
O --> P["Make development decisions"]

0 comments on commit 76e89a7

Please sign in to comment.