Java 类ims.core.vo.lookups.ContactType 实例源码

项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    loadVertebralCombos();

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    boolean bMedicalAdmissionContactSelected = (currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroMotorInpatient));

    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    form.getLocalContext().setIsClinicalContactType(bMedicalAdmissionContactSelected);

    displayRecordBrowser(bMedicalInpatientForm.booleanValue());
    form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

    if (writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);

}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    loadVertebralCombos();

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroInterpInpatient));

    form.getLocalContext().setMedicalAdmissionContactSelected(bMedicalAdmissionContactSelected);
    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    displayRecordBrowser(bMedicalInpatientForm.booleanValue());

    if(writeConditionsApply(bMedicalInpatientForm,  bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    boolean bMedicalAdmissionContactSelected = (currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpineExamInpatient));

    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    displayRecordBrowser(bMedicalInpatientForm.booleanValue());

    if(writeConditionsApply(bMedicalInpatientForm,  bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);     

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
项目:AvoinApotti    文件:Logic.java   
private boolean open(boolean bInitDrawingCtrl)
{
    clearControls();
    form.drawingBack().clearShapes();

    form.setMode(FormMode.VIEW);

    if(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpineExamInpatient))
    {
        form.drawingBack().clearBrushes();
        fillRecordBrowser();
        initialiseDrawingControl(form.getLocalContext().getadmisSpineExam(),true);
    }
    else
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
        if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
            form.getLocalContext().setadmisSpineExam(domain.getAdmisSpineExamination(voClinicalContact, null));
        else
            form.getLocalContext().setadmisSpineExam(domain.getMedicalAdmissionSpineExamByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

        populateScreenFromData(form.getLocalContext().getadmisSpineExam(),bInitDrawingCtrl);
    }
    return true;    
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    boolean bMedicalAdmissionContactSelected = (currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroReflexesInpatient));

    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    displayRecordBrowser(bMedicalInpatientForm.booleanValue());

    if(writeConditionsApply(bMedicalInpatientForm,  bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);     

    displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
    displayProblemsGrd(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172

}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedNeuroReflexesVo(null);

    clearScreen();
    loadLookupsIntoGrids();

    if(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroReflexes))
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

        if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
            form.getLocalContext().setReflexRecord(domain.getNeuroReflexRecord(voClinicalContact, null));
        else
            form.getLocalContext().setReflexRecord(domain.getSpinalMedicalAdmissionReflexesByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

        populateScreenFromData();
    }
    else
    {
        fillRecordBrowser();
    }
}
项目:AvoinApotti    文件:Logic.java   
public void initialize() throws FormOpenException
{
    // Initialize dynamic grid
    initializeDymanicGrid();

    // Initialize combo-box
    initializeCombos();

    form.getLocalContext().setSelectedFindings(null);

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    form.getLocalContext().setIsClinicalContactType(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    form.getLocalContext().setIsMedicalInpatientForm(new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.NeurologicalExaminationMotorInpatient)));

    displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm());
    // form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
}
项目:AvoinApotti    文件:Logic.java   
private void initialize()
{
    prepopulateControls();

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bInpatientOutpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBonesInpatient) || engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBonesDialog));

    form.getLocalContext().setbMedicalAdmissionContactSelected(bMedicalAdmissionContactSelected);
    form.getLocalContext().setIsMedicalInpatientForm(bInpatientOutpatientForm);
    form.btnOk().setEnabled(false);
    displayRecordBrowser(bInpatientOutpatientForm.booleanValue());
    form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

    if (writeConditionsApply(bInpatientOutpatientForm, bMedicalAdmissionContactSelected))
        form.grdIndex().setReadOnly(false);
    else
        form.grdIndex().setReadOnly(true);

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
项目:AvoinApotti    文件:Logic.java   
private void open()
{
    clear();
    form.setMode(FormMode.VIEW);
    form.chkProblem().setEnabled(false);

    if (!engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBones))
    {
        fillRecordBrowser();
    }
    else
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

        if (voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
            form.getLocalContext().setSelectedRecord(domain.getBoneJointsRecords(voClinicalContact, null));
        else
            form.getLocalContext().setSelectedRecord(domain.getMedicalAdmissionJointByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

        populateGrid();
    }

    reselectUpdatedNode();
    enableDetailsButtons();
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{       
    AdmisSummary summary = null;
    NeuroMotorFindingsVo neurofinding = null;
    ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    if(voClinicalContact != null  && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
    {

        summary = domain.getAdmissionSummaryByClinicalContact(voClinicalContact);
        neurofinding = domain.getNeuroMotorFinding(voClinicalContact);

    }
    else
    {
        summary = domain.getAdmissionSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        neurofinding = domain.getNeuroMotorFindingByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    }



    if (summary != null)
        populateForm(summary,neurofinding);
}
项目:AvoinApotti    文件:MedAdmisSummImpl.java   
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;    
}
项目:AvoinApotti    文件:MedNeuroInterpImpl.java   
public AdmisNeuroInterpretVo getSpinalMedicalAdmissionInterpretByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    AdmisNeuroInterpretVo voAdmisNeuroInterpret = new AdmisNeuroInterpretVo();

    List motor =   factory.find(" from NeuInterpret int where int.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    NeuroInterpretVoCollection collNeuroInterpretVo = NeuroInterpretVoAssembler.createNeuroInterpretVoCollectionFromNeuInterpret(motor);
    if(collNeuroInterpretVo != null && collNeuroInterpretVo.size()>0)
    {
        voAdmisNeuroInterpret.setNeuroInterpret(collNeuroInterpretVo.get(0));
        return voAdmisNeuroInterpret;
    }
    else
        return null;
}
项目:AvoinApotti    文件:MedMskJointsBonesImpl.java   
public MskBoneJointVo getMedicalAdmissionJointByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    List jointBone =   factory.find(" from MskExamJointBones jb where jb.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    MskBoneJointVoCollection voMskBoneJointVoColl = MskBoneJointVoAssembler.createMskBoneJointVoCollectionFromMskExamJointBones(jointBone);
    if(voMskBoneJointVoColl.size()>0)
    {
        voMskBoneJointVoColl.sort(SortOrder.DESCENDING);
        return voMskBoneJointVoColl.get(0);
    }
    else
        return null;
}
项目:AvoinApotti    文件:MedInvPlanImpl.java   
public InvPlanVo getInvPlanByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("Care Context not Provided");

    DomainFactory factory = getDomainFactory();

    List plan =   factory.find(" from InvAndPlan plan where plan.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    InvPlanVoCollection voCollInvPlan = InvPlanVoAssembler.createInvPlanVoCollectionFromInvAndPlan(plan);

    if(voCollInvPlan.size()>0)
        return voCollInvPlan.get(0);
    else 
        return null;
}
项目:AvoinApotti    文件:MedNeuroReflexesImpl.java   
public NeuroReflexesExaminationVo getSpinalMedicalAdmissionReflexesByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    NeuroReflexesExaminationVo voNeuroReflexesExamination = new NeuroReflexesExaminationVo();

    List reflexes =   factory.find(" from NeuExamReflxs reflex where reflex.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    NeuroReflexesVoCollection voNeuroReflexesColl = NeuroReflexesVoAssembler.createNeuroReflexesVoCollectionFromNeuExamReflxs(reflexes);
    if(voNeuroReflexesColl != null && voNeuroReflexesColl.size()>0)
        voNeuroReflexesExamination.setNeuroRef(voNeuroReflexesColl.get(0));

    if(voCareContextRef != null)
        voNeuroReflexesExamination.setProblemsOnAdmission(getProblemByCareContext(voCareContextRef.getID_CareContext()));

    return voNeuroReflexesExamination;
}
项目:AvoinApotti    文件:MedNeuroMotorImpl.java   
public NeuroMotorExaminationVo getSpinalMedicalAdmissionMotorByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    NeuroMotorExaminationVo voNeuroMotorExamination = new NeuroMotorExaminationVo();

    List motor =   factory.find(" from NeuExamMotor motor where motor.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

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

}
项目:AvoinApotti    文件:InjuryDetailsImpl.java   
public InjuryDetailsVoCollection getInjuryDetailsByMedicalAdmissionClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List injuries =   factory.find(" from InjuryDetails inj where inj.clinicalContact.id = " + 
            "( select cons.id from ClinicalContact con join con.careContext.clinicalContacts cons where cons.contactType = :type and con.id = :idClinContact )order by inj.systemInformation.creationDateTime desc ",
            new String[]{"type", "idClinContact" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voClinicalContactRef.getID_ClinicalContact()});  //wdev-13529

    InjuryDetailsVoCollection voCollInjuries = InjuryDetailsVoAssembler.createInjuryDetailsVoCollectionFromInjuryDetails(injuries);

    return voCollInjuries;
}
项目:AvoinApotti    文件:InjuryDetailsImpl.java   
public InjuryDetailsVoCollection getInjuryDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("Care Context not Provided");

    DomainFactory factory = getDomainFactory();

    List injuries =   factory.find(" from InjuryDetails inj where inj.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare) order by inj.systemInformation.creationDateTime desc ",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});   //wdev-13529

    InjuryDetailsVoCollection voCollInjuries = InjuryDetailsVoAssembler.createInjuryDetailsVoCollectionFromInjuryDetails(injuries);

    return voCollInjuries;
}
项目:AvoinApotti    文件:Logic.java   
private void loadContactsComboWithoutSpecificItems(boolean bRemoveSpinalMedAdmissionContactType, boolean bRemoveInpatientContactType, boolean bRemoveOutPatientContactType)
{
    form.cmbConContactType().clear();

    ContactTypeCollection collContactType = LookupHelper.getContactType(domain.getLookupService());
    for(int i=0;i<collContactType.size();i++)
    {
        if(bRemoveSpinalMedAdmissionContactType && collContactType.get(i).equals(ContactType.SPINALMEDICALADMISSION))
            continue;

        if(bRemoveInpatientContactType && collContactType.get(i).equals(ContactType.INPATIENT))
            continue;

        if(bRemoveOutPatientContactType && collContactType.get(i).equals(ContactType.OUTPATIENT))
            continue;

        form.cmbConContactType().newRow(collContactType.get(i), collContactType.get(i).getText());
    }
}
项目:AvoinApotti    文件:Patient_SummaryImpl.java   
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType)
{
    if (contactType == null)
        return null;

    LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
    LookupInstVo instMap = getMappings(instContactType);
    LookupMappingVoCollection mapColl = instMap.getMappings();
    for (int j = 0; j < mapColl.size(); j++)
    {
        LookupMappingVo valueObject = mapColl.get(j);
        TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
        if (taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING))
        {
            Integer codeVal = Integer.valueOf(valueObject.getExtCode());
            WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
            for (int i = 0; i < collWorklistContactType.size(); i++)
            {
                if (codeVal == collWorklistContactType.get(i).getId())
                    return collWorklistContactType.get(i);
            }
        }
    }

    return null;
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType) {
    if (contactType == null) return null;

    LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
    LookupInstVo instMap = getMappings(instContactType);
    LookupMappingVoCollection mapColl = instMap.getMappings();
    for (int j = 0; j < mapColl.size(); j++)
    {
        LookupMappingVo valueObject = mapColl.get(j);
        TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
        if(taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING)){
            Integer codeVal = Integer.valueOf(valueObject.getExtCode());
            WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
            for(int i=0;i<collWorklistContactType.size();i++)
            {
                if(codeVal == collWorklistContactType.get(i).getId())
                    return collWorklistContactType.get(i);
            }
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void initialize()
{
    loadVertebralCombos();

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    boolean bMedicalAdmissionContactSelected = (currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroMotorInpatient));

    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    form.getLocalContext().setIsClinicalContactType(bMedicalAdmissionContactSelected);

    displayRecordBrowser(bMedicalInpatientForm.booleanValue());
    form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

    if (writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-18846
}
项目:openMAXIMS    文件:Logic.java   
private void initialize()
{
    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    boolean bMedicalAdmissionContactSelected = (currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpineExamInpatient));

    form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
    displayRecordBrowser(bMedicalInpatientForm.booleanValue());

    if(writeConditionsApply(bMedicalInpatientForm,  bMedicalAdmissionContactSelected))
        activateButtons(true);
    else
        activateButtons(false);     

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
项目:openmaxims-linux    文件:PatientSummaryImpl.java   
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType) {
    if (contactType == null) return null;

    LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
    LookupInstVo instMap = getMappings(instContactType);
    LookupMappingVoCollection mapColl = instMap.getMappings();
    for (int j = 0; j < mapColl.size(); j++)
    {
        LookupMappingVo valueObject = mapColl.get(j);
        TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
        if(taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING)){
            Integer codeVal = Integer.valueOf(valueObject.getExtCode());
            WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
            for(int i=0;i<collWorklistContactType.size();i++)
            {
                if(codeVal == collWorklistContactType.get(i).getId())
                    return collWorklistContactType.get(i);
            }
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
public void initialize() throws FormOpenException
{
    // Initialize dynamic grid
    initializeDymanicGrid();

    // Initialize combo-box
    initializeCombos();

    form.getLocalContext().setSelectedFindings(null);

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    form.getLocalContext().setIsClinicalContactType(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    form.getLocalContext().setIsMedicalInpatientForm(new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.NeurologicalExaminationMotorInpatient)));

    displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm());
    // form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
}
项目:openMAXIMS    文件:Logic.java   
public void initialize() throws FormOpenException
{
    // Initialize dynamic grid
    initializeDymanicGrid();

    // Initialize combo-box
    initializeCombos();

    form.getLocalContext().setSelectedFindings(null);

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    form.getLocalContext().setIsClinicalContactType(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    form.getLocalContext().setIsMedicalInpatientForm(new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.NeurologicalExaminationMotorInpatient)));

    displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm());
    // form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
}
项目:openMAXIMS    文件:Logic.java   
private void initialize()
{
    prepopulateControls();

    ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
    Boolean bInpatientOutpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBonesInpatient) || engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBonesDialog));

    form.getLocalContext().setbMedicalAdmissionContactSelected(bMedicalAdmissionContactSelected);
    form.getLocalContext().setIsMedicalInpatientForm(bInpatientOutpatientForm);
    form.btnOk().setEnabled(false);
    displayRecordBrowser(bInpatientOutpatientForm.booleanValue());
    form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

    if (writeConditionsApply(bInpatientOutpatientForm, bMedicalAdmissionContactSelected))
        form.grdIndex().setReadOnly(false);
    else
        form.grdIndex().setReadOnly(true);

    form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
项目:openMAXIMS    文件:Logic.java   
private void open()
{
    clear();
    form.setMode(FormMode.VIEW);
    form.chkProblem().setEnabled(false);

    if (!engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBones))
    {
        fillRecordBrowser();
    }
    else
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

        if (voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
            form.getLocalContext().setSelectedRecord(domain.getBoneJointsRecords(voClinicalContact, null));
        else
            form.getLocalContext().setSelectedRecord(domain.getMedicalAdmissionJointByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

        populateGrid();
    }

    reselectUpdatedNode();
    enableDetailsButtons();
}
项目:openmaxims-linux    文件:Patient_SummaryImpl.java   
public WorklistContactType getWorklistContactTypeByExternalCode(ContactType contactType)
{
    if (contactType == null)
        return null;

    LookupInstVo instContactType = LookupHelper.getContactTypeInstance(getLookupService(), contactType.getId());
    LookupInstVo instMap = getMappings(instContactType);
    LookupMappingVoCollection mapColl = instMap.getMappings();
    for (int j = 0; j < mapColl.size(); j++)
    {
        LookupMappingVo valueObject = mapColl.get(j);
        TaxonomyType taxonomyType = getExtSystemInstance(valueObject.getExtSystem());
        if (taxonomyType.equals(TaxonomyType.WORKLIST_MAPPING))
        {
            Integer codeVal = Integer.valueOf(valueObject.getExtCode());
            WorklistContactTypeCollection collWorklistContactType = LookupHelper.getWorklistContactType(getLookupService());
            for (int i = 0; i < collWorklistContactType.size(); i++)
            {
                if (codeVal == collWorklistContactType.get(i).getId())
                    return collWorklistContactType.get(i);
            }
        }
    }

    return null;
}
项目:openmaxims-linux    文件:InjuryDetailsImpl.java   
public InjuryDetailsVoCollection getInjuryDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("Care Context not Provided");

    DomainFactory factory = getDomainFactory();

    List injuries =   factory.find(" from InjuryDetails inj where inj.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare) order by inj.systemInformation.creationDateTime desc ",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});   //wdev-13529

    InjuryDetailsVoCollection voCollInjuries = InjuryDetailsVoAssembler.createInjuryDetailsVoCollectionFromInjuryDetails(injuries);

    return voCollInjuries;
}
项目:openMAXIMS    文件:MedAdmisSummImpl.java   
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;    
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{       
    AdmisSummary summary = null;
    NeuroMotorFindingsVo neurofinding = null;
    ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

    if(voClinicalContact != null  && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
    {

        summary = domain.getAdmissionSummaryByClinicalContact(voClinicalContact);
        neurofinding = domain.getNeuroMotorFinding(voClinicalContact);

    }
    else
    {
        summary = domain.getAdmissionSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        neurofinding = domain.getNeuroMotorFindingByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    }



    if (summary != null)
        populateForm(summary,neurofinding);
}
项目:openmaxims-linux    文件:MedNeuroInterpImpl.java   
public AdmisNeuroInterpretVo getSpinalMedicalAdmissionInterpretByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    AdmisNeuroInterpretVo voAdmisNeuroInterpret = new AdmisNeuroInterpretVo();

    List motor =   factory.find(" from NeuInterpret int where int.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    NeuroInterpretVoCollection collNeuroInterpretVo = NeuroInterpretVoAssembler.createNeuroInterpretVoCollectionFromNeuInterpret(motor);
    if(collNeuroInterpretVo != null && collNeuroInterpretVo.size()>0)
    {
        voAdmisNeuroInterpret.setNeuroInterpret(collNeuroInterpretVo.get(0));
        return voAdmisNeuroInterpret;
    }
    else
        return null;
}
项目:openMAXIMS    文件:MedMskJointsBonesImpl.java   
public MskBoneJointVo getMedicalAdmissionJointByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    List jointBone =   factory.find(" from MskExamJointBones jb where jb.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    MskBoneJointVoCollection voMskBoneJointVoColl = MskBoneJointVoAssembler.createMskBoneJointVoCollectionFromMskExamJointBones(jointBone);
    if(voMskBoneJointVoColl.size()>0)
    {
        voMskBoneJointVoColl.sort(SortOrder.DESCENDING);
        return voMskBoneJointVoColl.get(0);
    }
    else
        return null;
}
项目:openMAXIMS    文件:MedInvPlanImpl.java   
public InvPlanVo getInvPlanByCareContext(CareContextRefVo voCareContextRef)
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("Care Context not Provided");

    DomainFactory factory = getDomainFactory();

    List plan =   factory.find(" from InvAndPlan plan where plan.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    InvPlanVoCollection voCollInvPlan = InvPlanVoAssembler.createInvPlanVoCollectionFromInvAndPlan(plan);

    if(voCollInvPlan.size()>0)
        return voCollInvPlan.get(0);
    else 
        return null;
}
项目:openMAXIMS    文件:MedNeuroReflexesImpl.java   
public NeuroReflexesExaminationVo getSpinalMedicalAdmissionReflexesByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    NeuroReflexesExaminationVo voNeuroReflexesExamination = new NeuroReflexesExaminationVo();

    List reflexes =   factory.find(" from NeuExamReflxs reflex where reflex.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

    NeuroReflexesVoCollection voNeuroReflexesColl = NeuroReflexesVoAssembler.createNeuroReflexesVoCollectionFromNeuExamReflxs(reflexes);
    if(voNeuroReflexesColl != null && voNeuroReflexesColl.size()>0)
        voNeuroReflexesExamination.setNeuroRef(voNeuroReflexesColl.get(0));

    if(voCareContextRef != null)
        voNeuroReflexesExamination.setProblemsOnAdmission(getProblemByCareContext(voCareContextRef.getID_CareContext()));

    return voNeuroReflexesExamination;
}
项目:openMAXIMS    文件:MedNeuroMotorImpl.java   
public NeuroMotorExaminationVo getSpinalMedicalAdmissionMotorByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();

    NeuroMotorExaminationVo voNeuroMotorExamination = new NeuroMotorExaminationVo();

    List motor =   factory.find(" from NeuExamMotor motor where motor.clinicalContact.id = " + 
            "( select cons.id from CareContext con join con.clinicalContacts cons where cons.contactType = :type and con.id = :idcare)",
            new String[]{"type", "idcare" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voCareContextRef.getID_CareContext()});

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

}
项目:openMAXIMS    文件:InjuryDetailsImpl.java   
public InjuryDetailsVoCollection getInjuryDetailsByMedicalAdmissionClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if(voClinicalContactRef == null)
        throw new CodingRuntimeException("Contact not Provided");

    DomainFactory factory = getDomainFactory();

    //the following query retrievs the one and only contact of type spinalmedicaladmission if it has been instantiated
    List injuries =   factory.find(" from InjuryDetails inj where inj.clinicalContact.id = " + 
            "( select cons.id from ClinicalContact con join con.careContext.clinicalContacts cons where cons.contactType = :type and con.id = :idClinContact )order by inj.systemInformation.creationDateTime desc ",
            new String[]{"type", "idClinContact" },
            new Object[]{ getDomLookup(ContactType.SPINALMEDICALADMISSION),voClinicalContactRef.getID_ClinicalContact()});  //wdev-13529

    InjuryDetailsVoCollection voCollInjuries = InjuryDetailsVoAssembler.createInjuryDetailsVoCollectionFromInjuryDetails(injuries);

    return voCollInjuries;
}
项目:openmaxims-linux    文件:Logic.java   
private void open()
{
    form.setMode(FormMode.VIEW);
    form.getLocalContext().setSelectedNeuroReflexesVo(null);

    clearScreen();
    loadLookupsIntoGrids();

    if(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroReflexes))
    {
        ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

        if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
            form.getLocalContext().setReflexRecord(domain.getNeuroReflexRecord(voClinicalContact, null));
        else
            form.getLocalContext().setReflexRecord(domain.getSpinalMedicalAdmissionReflexesByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));

        populateScreenFromData();
    }
    else
    {
        fillRecordBrowser();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadContactsComboWithoutSpecificItems(boolean bRemoveSpinalMedAdmissionContactType, boolean bRemoveInpatientContactType, boolean bRemoveOutPatientContactType)
{
    form.cmbConContactType().clear();

    ContactTypeCollection collContactType = LookupHelper.getContactType(domain.getLookupService());
    for(int i=0;i<collContactType.size();i++)
    {
        if(bRemoveSpinalMedAdmissionContactType && collContactType.get(i).equals(ContactType.SPINALMEDICALADMISSION))
            continue;

        if(bRemoveInpatientContactType && collContactType.get(i).equals(ContactType.INPATIENT))
            continue;

        if(bRemoveOutPatientContactType && collContactType.get(i).equals(ContactType.OUTPATIENT))
            continue;

        form.cmbConContactType().newRow(collContactType.get(i), collContactType.get(i).getText());
    }
}