-
Notifications
You must be signed in to change notification settings - Fork 52
Implement Allergy Tracking #104
Copy link
Copy link
Open
Labels
ContractRustStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
What needs to be done:
Track pet allergies so vets know what to avoid when treating pets.
Why this matters:
Allergies can be life-threatening - this info must be easily accessible in emergencies.
Technical Details:
- File to modify:
stellar-contracts/src/lib.rs - What to add:
- Enum:
AllergySeverity(Mild, Moderate, Severe, LifeThreatening) - Struct:
Allergy - Function:
add_allergy() - Function:
get_allergies(pet_id: u64) -> Vec<Allergy> - Function:
remove_allergy(allergy_id: u64)
- Enum:
Structure:
#[contracttype]
pub enum AllergySeverity {
Mild,
Moderate,
Severe,
LifeThreatening,
}
#[contracttype]
#[derive(Clone)]
pub struct Allergy {
pub id: u64,
pub pet_id: u64,
pub allergen: String,
pub severity: AllergySeverity,
pub symptoms: String,
pub diagnosed_date: u64,
pub diagnosed_by: Address,
}
**Tests to add:**
- Test adding allergy
- Test severity levels
- Test emergency accessReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ContractRustStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers