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

项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCmbCountyValueChanged() throws PresentationLogicException
{
    if(form.cmbCountry().getValue() != null)
    {
        Country country = form.cmbCountry().getValue();

        LookupInstVo inst = LookupHelper.getCountryInstance(this.domain.getLookupService(),country.getID());
        LookupInstVo instMap = domain.getMappings(inst);

        if(instMap.getMappings() != null)
        {
            for(int i = 0; i < instMap.getMappings().size(); i++)
            {
                if("CCG Mapping".equals(instMap.getMappings().get(i).getExtSystem()))
                {
                    form.txtPctCode().setValue(instMap.getMappings().get(i).getExtCode());
                    break;
                }
            }
        }
    }
}
项目:openMAXIMS    文件:VoMapper.java   
private void populateEHICDetails(Patient patVo,IN1 in1,ProviderSystemVo providerSystem) throws HL7Exception
{
    if (!isEHIC(in1))
        return;

    NationalHealthCoverVo insurance = null;
    if(patVo.getNationalHealthCover() == null)
        insurance = new NationalHealthCoverVo();
    else
        insurance=patVo.getNationalHealthCover();

    //IN1-36
    String insuranceRegNumber = in1.getPolicyNumber().getValue();
    if (insuranceRegNumber != null)
    {
        if (insuranceRegNumber.equals(Hl7Null))
            insurance.setEHICNumber(null);
        else
            insurance.setEHICNumber(insuranceRegNumber);
    }

    //IN1-13
    String date = in1.getPlanExpirationDate().getValue();
    if (date!=null)
    {
        insurance.setEHICExpiryDate(new PartialDate(date));
    }

    //IN1-5-6
    String country = in1.getInsuranceCompanyAddress(0).getCountry().getValue();
    if (country != null)
    {
        if (country.equals(Hl7Null))
            insurance.setMedicalCardProved(null);
        else
            insurance.setEHICCountry((Country) svc.getLocalLookup(Country.class, Country.TYPE_ID, providerSystem.getCodeSystem().getText(),country));
    }

    //IN1-4
    String institution = in1.getInsuranceCompanyName(0).getOrganizationName().getValue();
    if(institution!=null)
    {
        if(institution.equals(Hl7Null))
            insurance.setEHICInstitution(null);
        else
            insurance.setEHICInstitution(institution);
    }

    if(patVo.getNationalHealthCover() == null)  
        patVo.setNationalHealthCover(insurance);
}