public static boolean check(EObject eObject, String body) throws Exception { OCL.Helper helper = ocl.createOCLHelper(); helper.setContext(eObject.eClass()); Constraint constraint = helper.createInvariant(body); OCL.Query query = ocl.createQuery(constraint); return query.check(eObject); }
public static Object query(EObject eObject, String body) throws Exception { OCL.Helper helper = ocl.createOCLHelper(); helper.setContext(eObject.eClass()); OCLExpression expression = helper.createQuery(body); OCL.Query query = ocl.createQuery(expression); return query.evaluate(eObject); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(AbdomenSection abdomenSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.ABDOMEN_SECTION, IHEPackage.Literals.ABDOMEN_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(abdomenSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static PhysicalExamSection getPhysicalExamSection(ProgressNote progressNote) { if (GET_PHYSICAL_EXAM_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( ConsolPackage.Literals.PROGRESS_NOTE, ConsolPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(332)); try { GET_PHYSICAL_EXAM_SECTION__EOCL_QRY = helper.createQuery(GET_PHYSICAL_EXAM_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PHYSICAL_EXAM_SECTION__EOCL_QRY); return (PhysicalExamSection) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static VitalSignsSectionEntriesOptional getVitalSignsSectionEntriesOptional(ProgressNote progressNote) { if (GET_VITAL_SIGNS_SECTION_ENTRIES_OPTIONAL__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( ConsolPackage.Literals.PROGRESS_NOTE, ConsolPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(337)); try { GET_VITAL_SIGNS_SECTION_ENTRIES_OPTIONAL__EOCL_QRY = helper.createQuery(GET_VITAL_SIGNS_SECTION_ENTRIES_OPTIONAL__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_VITAL_SIGNS_SECTION_ENTRIES_OPTIONAL__EOCL_QRY); return (VitalSignsSectionEntriesOptional) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(HeadSection headSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.HEAD_SECTION, IHEPackage.Literals.HEAD_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(headSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(RectumSection rectumSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.RECTUM_SECTION, IHEPackage.Literals.RECTUM_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(rectumSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AssessmentAndPlanSectionProcNote getAssessmentAndPlanSection(ProgressNote progressNote) { if (GET_ASSESSMENT_AND_PLAN_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.PROGRESS_NOTE, CDTPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(89)); try { GET_ASSESSMENT_AND_PLAN_SECTION__EOCL_QRY = helper.createQuery(GET_ASSESSMENT_AND_PLAN_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_ASSESSMENT_AND_PLAN_SECTION__EOCL_QRY); return (AssessmentAndPlanSectionProcNote) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ReviewOfSystemsSectionIHE getReviewOfSystemsSection(ProgressNote progressNote) { if (GET_REVIEW_OF_SYSTEMS_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.PROGRESS_NOTE, CDTPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(100)); try { GET_REVIEW_OF_SYSTEMS_SECTION__EOCL_QRY = helper.createQuery(GET_REVIEW_OF_SYSTEMS_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_REVIEW_OF_SYSTEMS_SECTION__EOCL_QRY); return (ReviewOfSystemsSectionIHE) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(NeckSection neckSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.NECK_SECTION, IHEPackage.Literals.NECK_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(neckSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InternalReference getInternalReference(ProcedureEntry procedureEntry) { if (GET_INTERNAL_REFERENCE__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.PROCEDURE_ENTRY, IHEPackage.Literals.PROCEDURE_ENTRY.getEAllOperations().get(61)); try { GET_INTERNAL_REFERENCE__EOCL_QRY = helper.createQuery(GET_INTERNAL_REFERENCE__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_INTERNAL_REFERENCE__EOCL_QRY); return (InternalReference) query.evaluate(procedureEntry); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(VesselsSection vesselsSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.VESSELS_SECTION, IHEPackage.Literals.VESSELS_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(vesselsSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemStatusObservation getProblemStatusObservation(ProblemEntry problemEntry) { if (GET_PROBLEM_STATUS_OBSERVATION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.PROBLEM_ENTRY, IHEPackage.Literals.PROBLEM_ENTRY.getEAllOperations().get(77)); try { GET_PROBLEM_STATUS_OBSERVATION__EOCL_QRY = helper.createQuery(GET_PROBLEM_STATUS_OBSERVATION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_STATUS_OBSERVATION__EOCL_QRY); return (ProblemStatusObservation) query.evaluate(problemEntry); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProblemEntry getProblemEntry(HeartSection heartSection) { if (GET_PROBLEM_ENTRY__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( IHEPackage.Literals.HEART_SECTION, IHEPackage.Literals.HEART_SECTION.getEAllOperations().get(58)); try { GET_PROBLEM_ENTRY__EOCL_QRY = helper.createQuery(GET_PROBLEM_ENTRY__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PROBLEM_ENTRY__EOCL_QRY); return (ProblemEntry) query.evaluate(heartSection); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ChiefComplaintSection getChiefComplaintSection(ProgressNote progressNote) { if (GET_CHIEF_COMPLAINT_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( ConsolPackage.Literals.PROGRESS_NOTE, ConsolPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(328)); try { GET_CHIEF_COMPLAINT_SECTION__EOCL_QRY = helper.createQuery(GET_CHIEF_COMPLAINT_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_CHIEF_COMPLAINT_SECTION__EOCL_QRY); return (ChiefComplaintSection) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static InstructionsSection getInstructionsSection(ProgressNote progressNote) { if (GET_INSTRUCTIONS_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( ConsolPackage.Literals.PROGRESS_NOTE, ConsolPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(338)); try { GET_INSTRUCTIONS_SECTION__EOCL_QRY = helper.createQuery(GET_INSTRUCTIONS_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_INSTRUCTIONS_SECTION__EOCL_QRY); return (InstructionsSection) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AssessmentSectionProcNote getAssessmentSection(ProgressNote progressNote) { if (GET_ASSESSMENT_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.PROGRESS_NOTE, CDTPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(90)); try { GET_ASSESSMENT_SECTION__EOCL_QRY = helper.createQuery(GET_ASSESSMENT_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_ASSESSMENT_SECTION__EOCL_QRY); return (AssessmentSectionProcNote) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static AlertsSection getAlertsSection(ProgressNote progressNote) { if (GET_ALERTS_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.PROGRESS_NOTE, CDTPackage.Literals.PROGRESS_NOTE.getEAllOperations().get(92)); try { GET_ALERTS_SECTION__EOCL_QRY = helper.createQuery(GET_ALERTS_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_ALERTS_SECTION__EOCL_QRY); return (AlertsSection) query.evaluate(progressNote); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static MedicationsSection getMedicationsSection(HistoryAndPhysical historyAndPhysical) { if (GET_MEDICATIONS_SECTION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.HISTORY_AND_PHYSICAL, CDTPackage.Literals.HISTORY_AND_PHYSICAL.getEAllOperations().get(89)); try { GET_MEDICATIONS_SECTION__EOCL_QRY = helper.createQuery(GET_MEDICATIONS_SECTION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_MEDICATIONS_SECTION__EOCL_QRY); return (MedicationsSection) query.evaluate(historyAndPhysical); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static PhysicalExaminationSection getPhysicalExamination(ConsultationNote consultationNote) { if (GET_PHYSICAL_EXAMINATION__EOCL_QRY == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setOperationContext( CDTPackage.Literals.CONSULTATION_NOTE, CDTPackage.Literals.CONSULTATION_NOTE.getEAllOperations().get(85)); try { GET_PHYSICAL_EXAMINATION__EOCL_QRY = helper.createQuery(GET_PHYSICAL_EXAMINATION__EOCL_EXP); } catch (ParserException pe) { throw new UnsupportedOperationException(pe.getLocalizedMessage()); } } OCL.Query query = EOCL_ENV.createQuery(GET_PHYSICAL_EXAMINATION__EOCL_QRY); return (PhysicalExaminationSection) query.evaluate(consultationNote); }