Project Overview
As global demographics skew towards aging populations, efficient health tracking for seniors becomes critical. Traditional offline record-keeping lacks cohesion and accessibility, while older adults often miss crucial preventative care information. To bridge this gap, this document outlines the engineering of a Spring Boot-driven health examination tracking and preventative care platform. The solution digitizes clinical records, automates health evaluations, and proactively distributes wellness knowledge to enhance self-care capabilities.
System Architecture
Technology Stack
- Backend Framework: Spring Boot, utilized to streamline RESTful API development and minimize boilerplate configuration.
- Frontend Interface: Vue.js combined with standard web technologies (HTML/CSS/JS) to construct a responsive, component-based UI.
- Data Persistence: MySQL, chosen for its reliability and performance in managing relational data such as clinical metrics, user profiles, and educational content.
Architectural Pattern
The platform adopts a Browser/Server (B/S) paradigm. Client browsers interact with Spring Boot endpoints via asynchronous network requests, while the backend orchestrates business logic and communicates with the MySQL datastore. This decoupled design ensures maintainability and horizontal scalability.
Core Functional Modules
Checkup Data Management
This component governs the lifecycle of medical examination records, supporting insertion, modification, retrieval, and deletion. Operators can input vital metrics—such as blood pressure, blood glucose, height, and weight—alongside detailed diagnostic outcomes. The system enables categorized filtering and statistical aggregation, culminating in the automated generation of comprehensive health reports.
Account and Role Governance
Handles the authentication lifecycle from registration through credential verification. The module enforces identity checks during login and supplies administrative tooling for role assignment and privilege enforcement, ensuring secure access control across the platform.
Health Evaluation Engine
Processes submitted clinical metrics through predefined diagnostic algorithms. By analyzing physiological indicators, the engine calculates a health risk assessment and formulates tailored lifestyle or medical recommendations. Findings are visualized through graphical charts and detailed textual summaries for both the senior user and overseeing administrators.
Preventive Care Knowledge Distribution
Automates the dissemination of wellness literature. Based on a user's specific health evaluasion outcomes and stated preferences, the engine schedules targeted delivery of disease prevention materials. Notifications are dispatched via in-app messaging or SMS, complemented by an on-demand searchable repository of health guides.
Data Storage Schema
The relational model is structured around the following primary entities:
- sys_accounts: Persists user identity details, including login credentials, contact information, and demographic attributes.
- medical_examinations: Records clinical datasets encompassing examination timestamps, vital signs, and specialized test outcomes.
- assessment_reports: Stores the output from the Health Evaluation Engine, capturing risk scores and prescriptive advice.
- preventive_guides: Contains the educational content catalog, tracking titles, body text, publication dates, and target demographic suitability.
- role_permissions: Defines authorization matrices linking accounts to their permitted system operations.
Schema integrity is maintained through primary/foreign key constraints, with indexing applied to high-frequency query columns to optimize retrieval throughput.
Implementation Details
Backend: Authentication Endpoint
The entry point for system access utilizes a custom validation mechanism to verify credentials and issue security tokens.
@RestController
@RequestMapping("/api/auth")
public class AccessController {
@Autowired
private AccountManager accountManager;
@Autowired
private TokenIssuer tokenIssuer;
@PostMapping("/signin")
public ResponseEntity<AuthPayload> signIn(@RequestBody LoginCredentials credentials) {
Optional<Account> accountOpt = accountManager.locateByLoginName(credentials.getLoginName());
if (accountOpt.isPresent() && accountManager.matchSecret(credentials.getSecret(), accountOpt.get().getHashedSecret())) {
String accessToken = tokenIssuer.issueToken(accountOpt.get().getOid(), accountOpt.get().getLoginName());
return ResponseEntity.ok(new AuthPayload(accessToken, accountOpt.get().getPublicProfile()));
}
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
}
}
Backend: Clinical Data Persistence
Leveraging JPA abstractions to abstract database interactions for examination records.
@Repository
public interface CheckupRepo extends JpaRepository<MedicalCheckup, Long> {
List<MedicalCheckup> fetchByAccountIdAndCheckupDate(Long accountId, LocalDate checkupDate);
}
@Service
public class ClinicalDataService {
@Autowired
private CheckupRepo checkupRepo;
public MedicalCheckup persistExamRecord(MedicalCheckup record) {
return checkupRepo.saveAndFlush(record);
}
public List<MedicalCheckup> retrieveHistory(Long accountId, LocalDate targetDate) {
return checkupRepo.fetchByAccountIdAndCheckupDate(accountId, targetDate);
}
}
Frontend: API Integration
Vue components interact with the backend REST endpoints using asynchronous patterns to handle data flow and routing.
export default {
data() {
return { loginName: '', secret: '' }
},
methods: {
async authenticateUser() {
try {
const payload = { loginName: this.loginName, secret: this.secret };
const { data } = await axios.post('/api/auth/signin', payload);
sessionStorage.setItem('accessToken', data.accessToken);
this.$router.replace('/main-panel');
} catch (err) {
console.error("Authentication failed", err);
this.showAlert("Invalid credentials provided");
}
}
}
}
User Interface Features
The system segregates interfaces based on user roles:
- Senior User Portal: Dashboard, wellness facts, disease prevention guides, platform overview, examination catalog, community forum, personal profile, and live consultation.
- Administrative Console: Account governance, baseline parameter configuraton, wellness content moderation, disease prevention catalog management, and community forum oversight.