コード例 #1
0
  public NeuroMotorFindingsVo getNeuroMotorFinding(ClinicalContactRefVo voClinContact) {
    if (voClinContact == null)
      throw new DomainRuntimeException("Clinical Contact must not be null");

    DomainFactory factory = getDomainFactory();
    String hql =
        "from NeuExamMotor neuExamMotor where neuExamMotor.clinicalContact.id = :id_ClinContact ";
    List list =
        factory.find(
            hql,
            new String[] {"id_ClinContact"},
            new Object[] {voClinContact.getID_ClinicalContact()});

    if (list != null && list.size() > 0) {
      NeuroMotorFindingsVoCollection collNeuroMotorFindings =
          NeuroMotorFindingsVoAssembler.createNeuroMotorFindingsVoCollectionFromNeuExamMotor(list);
      if (collNeuroMotorFindings != null && collNeuroMotorFindings.size() > 0)
        return collNeuroMotorFindings.get(0);
    }

    return null;
  }
コード例 #2
0
  public NeuroMotorFindingsVo getNeuroMotorFindingByCareContext(CareContextRefVo carecontextref) {
    if (carecontextref == null) throw new DomainRuntimeException("Care Context must not be null");

    DomainFactory factory = getDomainFactory();
    String hql =
        "from NeuExamMotor neuExamMotor where neuExamMotor.clinicalContact.contactType = :ClinContactType and neuExamMotor.careContext.id = :idCareContext";
    List list =
        factory.find(
            hql,
            new String[] {"ClinContactType", "idCareContext"},
            new Object[] {
              getDomLookup(ContactType.SPINALMEDICALADMISSION), carecontextref.getID_CareContext()
            });

    if (list != null && list.size() > 0) {
      NeuroMotorFindingsVoCollection collNeuroMotorFindings =
          NeuroMotorFindingsVoAssembler.createNeuroMotorFindingsVoCollectionFromNeuExamMotor(list);
      if (collNeuroMotorFindings != null && collNeuroMotorFindings.size() > 0)
        return collNeuroMotorFindings.get(0);
    }

    return null;
  }