https://github.com/solana-turbin3/q1_25_builder_atomickrak1n
Turbin3 Builders Cohort Q1 2025 repository
https://github.com/solana-turbin3/q1_25_builder_atomickrak1n
Last synced: 3 months ago
JSON representation
Turbin3 Builders Cohort Q1 2025 repository
- Host: GitHub
- URL: https://github.com/solana-turbin3/q1_25_builder_atomickrak1n
- Owner: solana-turbin3
- Created: 2025-01-15T04:34:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-03-16T00:55:18.000Z (3 months ago)
- Last Synced: 2025-03-16T01:27:50.573Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 9.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Insta-Labs: Technical Specification
- [LOI](https://docs.google.com/document/d/e/2PACX-1vQoLpTkVrhBBIQ5wSSYvwFE3i54lxmwqGUY152jTlBhaRbKtTdJCA_nf9ChVTQJara0VN05aO2f3KjF/pub)
- [User Stories](https://docs.google.com/document/d/e/2PACX-1vQOkCD06oXVEj9tZBNuYGgMJR_s1LWunMcv1_LxLl9v1B6fTmJXeJOH0y0l6HadNb9cUovro4hxq_Q9/pub)
- [Arch Diagrams](https://drive.google.com/file/d/1mw5i_7jyAtiSQZSaxGb8mNJajiVW1A8e/view?usp=sharing)
- [Deployed Program](https://explorer.solana.com/address/9tNAK3cjM1HKEd2ijZZpwF4LN84Kbq1eKR3LhvRC8HD5?cluster=devnet)
---## **Project Structure**
The contract follows a **modular design** with separate files for **state management** and **business logic (instructions/contexts)**.### **1️. Account Structures**
These define **data storage** on Solana.- **`patient_data.rs`** – Stores patient details and **lab test history** in a PDA.
- **`test_result.rs`** – Defines the structure for **individual test records**, including Blood, Urine, and Imaging tests.---
### **2️. Instructions**
These handle **transactions and interactions** with the smart contract.- **`initialize_patient.rs`** – Creates a **new patient account (PDA)** using a **Unique Patient ID (UPID)**.
- **`store_test_results.rs`** – Allows **authorized labs** to store patient test results **on-chain**.
- **`get_test_results.rs`** – Fetches a **patient’s medical history** securely.---
### **Account Structures**
```rust
pub struct PatientData {
pub upid: String,
pub bump: u8,
pub admin: Pubkey,
pub tests: Vec,
}pub struct TestResult {
pub test_id: String,
pub test_type: String,
pub path_lab_name: String,
pub timestamp: i64,// Blood Test Fields
pub haemoglobin: Option,
pub rbc_count: Option,
pub wbc_count: Option,
pub platelet_count: Option,
pub mcv: Option,
pub mch: Option,
pub mchc: Option,
pub rdw: Option,
pub neutrophils: Option,
pub lymphocytes: Option,
pub monocytes: Option,
pub eosinophils: Option,
pub basophils: Option,// Urine Test Fields
pub ph_level: Option,
pub protein: Option,
pub glucose: Option,}
```## Future Roadmap
Phase 2 Features
- Adding more type of tests
- Making ULID (Unique Lab ID functional)
- Comparing test rates across the cities possible## Passed Tests
