namespace ClinicalHealthcareManagement features TreatmentPlan {abstract} mandatory patientInfo alternative adult child String "Patient Name" {constraint len("Patient Name") > 0 & len("Patient Name") <= 50} Integer Age {constraint Age >= 0 & Age <= 120} Date "Date of Birth" Boolean hasInsurance medicalHistory or chronicCondition1 alternative diabetesTypeII hypertension chronicCondition2 alternative asthma cardiacDisease Optional medicationPrescription {alternative medicineA treatmentB} mandatory scheduledAppointments or weeklyAppointment biweeklyAppointment monthlyAppointment diagnosisProcedure {abstract} optional physicalExam alternative internalExam externalExam neurologicalExam labTests {or bloodTest urinalysis xRay} diagnosticImaging alternative ultrasound ctScan mri therapyType {abstract} or physiotherapy Integer sessionsPerWeek {constraint sessionsPerWeek >= 1 & sessionsPerWeek <= 5} occupationalTherapy Integer interventionTime {constraint interventionTime > 30 & interventionTime <= 90} speechTherapy Boolean hasAidedCommunicationDevice hospitalizationType {abstract} or inpatientStay {Integer nightsInHospital {constraint nightsInHospital >= 1 & nightsInHospital < 60}} outpatientStay Integer followUpAppointments {constraint followUpAppointments >= 2 & followUpAppointments < 12} careManagementPlan mandatory riskAssessment Boolean "High Risk" {constraint !hasInsurance} rehabilitationServices alternative longTermCare Integer durationOfCare {constraint durationOfCare > 60 & durationOfCare <= 365} homeHealthAid or constraints chronicCondition1 => diabetesTypeII | hypertension chronicCondition2 => asthma | cardiacDisease "Patient Name" == 'John Doe' => patientInfo.hasInsurance weeklyAppointment & biweeklyAppointment => false monthlyAppointment | (physicalExam & diagnosticImaging) => true medicationPrescription.medicineA => !treatmentB longTermCare.durationOfCare > 90 => careManagementPlan.rehabilitationServices.longTermCare