当前位置: 首页>>代码示例>>Java>>正文


Java Mandant类代码示例

本文整理汇总了Java中ch.elexis.data.Mandant的典型用法代码示例。如果您正苦于以下问题:Java Mandant类的具体用法?Java Mandant怎么用?Java Mandant使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Mandant类属于ch.elexis.data包,在下文中一共展示了Mandant类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setValue

import ch.elexis.data.Mandant; //导入依赖的package包/类
@Override
protected void setValue(Object element, Object value){
	TextTemplate template = (TextTemplate) element;
	int index = ((Integer) value) - 1;
	
	//all
	if (index == -1) {
		template.setMandant("");
	} else {
		// specific mandant only
		Mandant mandant = mandants.get(index);
		template.setMandant(mandant.getId());
		template.setSystemTemplate(false);
	}
	tableViewer.update(element, null);
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:17,代码来源:TextTemplateView.java

示例2: display

import ch.elexis.data.Mandant; //导入依赖的package包/类
public void display(final Object obj){
	Leistungsblock lb = (Leistungsblock) obj;
	master.setValue(lb);
	
	if (obj == null) {
		bNew.setEnabled(false);
		cbMandant.select(0);
	} else {
		String mId = lb.get(Leistungsblock.FLD_MANDANT_ID);
		int sel = 0;
		if (!StringTool.isNothing(mId)) {
			String[] items = cbMandant.getItems();
			sel = StringTool.getIndex(items, Mandant.load(mId).getLabel());
		}
		cbMandant.select(sel);
		bNew.setEnabled(true);
	}
	lLst.refresh(true);
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:20,代码来源:BlockDetailDisplay.java

示例3: init

import ch.elexis.data.Mandant; //导入依赖的package包/类
public void init(IWorkbench workbench){
	List<Mandant> ml = Hub.getMandantenList();
	String[] mands = new String[ml.size()];
	for (int i = 0; i < mands.length; i++) {
		mands[i] = ml.get(i).getLabel();
	}
	String grp = CoreHub.globalCfg.get(Preferences.ACC_GROUPS, "Admin"); //$NON-NLS-1$
	def =
		new InputData[] {
			new InputData(Messages.AnwenderPref_kuerzel, "Label", Typ.STRING, null), //$NON-NLS-1$
			new InputData(Messages.AnwenderPref_passwort, EXT_INFO, Typ.STRING, "UsrPwd"), //$NON-NLS-1$
			new InputData(Messages.AnwenderPref_gruppe, EXT_INFO, "Groups", grp.split(",")), //$NON-NLS-1$ //$NON-NLS-2$
			new InputData(Messages.AnwenderPref_fuerMandant, Messages.AnwenderPref_12,
				"Mandant", mands) //$NON-NLS-1$
		};
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:17,代码来源:AnwenderPref.java

示例4: runInUi

import ch.elexis.data.Mandant; //导入依赖的package包/类
public void runInUi(ElexisEvent ev){
	
	Mandant m = (Mandant) ev.getObject();
	if (m != null && item != null) {
		item.setText(m.getMandantLabel());
		fParent.setBackground(UiMandant.getColorForMandator(m));
		if (menuItems == null) {
			// We have a read-only coolbar item entry
			fParent.pack();
			return;
		}
		for (int i = 0; i < menuItems.length; i++) {
			String id = (String) menuItems[i].getData();
			if (m.getId().equalsIgnoreCase(id)) {
				fParent.pack();
				// TODO: Anordnung Elemente in Coolbar speicherbar?
				// TODO: Programmatische Anordnung Elemente coolbar
				menuItems[i].setSelection(true);
			} else {
				menuItems[i].setSelection(false);
			}
		}
	}
	fParent.getParent().layout();
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:26,代码来源:MandantSelectionContributionItem.java

示例5: checkKonsultationen

import ch.elexis.data.Mandant; //导入依赖的package包/类
public void checkKonsultationen(){
	Query<Konsultation> qbe = new Query<Konsultation>(Konsultation.class);
	List<Konsultation> list = qbe.execute();
	
	for (Konsultation k : list) {
		Fall fall = k.getFall();
		if (fall == null) {
			blame(k, Messages.DatabaseCleaner_NoCaseForKons); //$NON-NLS-1$
			continue;
		}
		Mandant m = k.getMandant();
		if (m == null) {
			blame(k, Messages.DatabaseCleaner_NoMandatorForKons); //$NON-NLS-1$
			continue;
		}
	}
	
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:19,代码来源:DatabaseCleaner.java

示例6: getResponsibleEAN

import ch.elexis.data.Mandant; //导入依赖的package包/类
/**
 * Determine the EAN of the responsible Kontakt for a Konsultation. The search for thee right
 * contact is in the following order.<br\>
 * 1. configured via ResponsibleComposite on RechnungsPref preference page for the Mandant of
 * the consultation<br\>
 * 2. Rechnungssteller of the Mandant of the consultation if not an organization<br\>
 * 3. the Mandant of the consultation<\br>
 * 
 * @param kons
 * @return
 */
public static String getResponsibleEAN(Konsultation kons){
	Kontakt responsibleKontakt = null;
	
	String responsibleId =
		(String) kons.getMandant().getInfoElement(TarmedRequirements.RESPONSIBLE_INFO_KEY);
	if (responsibleId != null && !responsibleId.isEmpty()) {
		responsibleKontakt = Mandant.load(responsibleId);
	} else {
		Rechnungssteller rechnungssteller = kons.getMandant().getRechnungssteller();
		String anrede = rechnungssteller.getInfoString("Anrede");
		// only way to determine if rechnungssteller is a organization is testing empty anrede
		if (anrede != null && !anrede.isEmpty()) {
			responsibleKontakt = rechnungssteller;
		} else {
			responsibleKontakt = kons.getMandant();
		}
	}
	return TarmedRequirements.getEAN(responsibleKontakt);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:31,代码来源:XMLExporterUtil.java

示例7: getAdministratorLabel

import ch.elexis.data.Mandant; //导入依赖的package包/类
/**
 * @return a human-readable label of the person that administered the vaccine
 */
public @NonNull String getAdministratorLabel(){
	String value = get(FLD_ADMINISTRATOR);
	if (value.startsWith(Mandant.class.getName())) {
		Mandant mandant = (Mandant) new PersistentObjectFactory().createFromString(value);
		
		if (mandant == null) {
			return "";
		}
		
		String title = Person.load(mandant.getId()).get(Person.TITLE);
		if (title == null || title.isEmpty()) {
			return mandant.getName() + " " + mandant.getVorname();
		}
		return title + " " + mandant.getName() + " " + mandant.getVorname();
	} else {
		if (value == null || value.length() < 2)
			return "";
			
		return value;
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:25,代码来源:Vaccination.java

示例8: performanceOptimization

import ch.elexis.data.Mandant; //导入依赖的package包/类
private String[] performanceOptimization(Patient patient, Mandant mandant){
	// performance optimization
	if (patient != null) {
		patient.get(false, Patient.NAME, Patient.FIRSTNAME, Patient.BIRTHDATE, Patient.SEX,
			Patient.FLD_PATID);
	}
	String[] data = new String[] {
		"", "", "", "", ""
	};
	if (mandant != null) {
		data[0] = mandant.getRechnungssteller().getLabel();
		data[1] = mandant.getMandantLabel();
	}
	if (patient != null) {
		Kontakt stammArzt = patient.getStammarzt();
		if (stammArzt != null) {
			data[2] = stammArzt.getLabel();
		}
		Anschrift anschrift = patient.getAnschrift();
		data[3] = anschrift.getPlz();
		data[4] = anschrift.getOrt();
		
	}
	return data;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:26,代码来源:AlleLeistungen.java

示例9: getZsr

import ch.elexis.data.Mandant; //导入依赖的package包/类
private static String getZsr(Rezept rezept){
	Mandant mandant = rezept.getMandant();
	Rechnungssteller rechnungssteller = mandant.getRechnungssteller();
	
	String zsr = rechnungssteller.getXid(DOMAIN_KSK);
	if (zsr != null && !zsr.isEmpty() && zsr.length() >= 6) {
		return zsr.replaceAll("\\.", "");
	}
	zsr = rechnungssteller.getInfoString("KSK");
	if (zsr != null && !zsr.isEmpty() && zsr.length() >= 6) {
		return zsr.replaceAll("\\.", "");
	}
	zsr = mandant.getXid(DOMAIN_KSK);
	if (zsr != null && !zsr.isEmpty() && zsr.length() >= 6) {
		return zsr.replaceAll("\\.", "");
	}
	zsr = mandant.getInfoString("KSK");
	if (zsr != null && !zsr.isEmpty() && zsr.length() >= 6) {
		return zsr.replaceAll("\\.", "");
	}
	throw new IllegalStateException("Keine ZSR gefunden");
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:23,代码来源:DocboxService.java

示例10: loadAssignedMandant

import ch.elexis.data.Mandant; //导入依赖的package包/类
private Mandant loadAssignedMandant(boolean retry){
	List<LabOrder> orders =
		LabOrder.getLabOrders(labResult.getPatient(), null, null, labResult, null, null, null);
	if (orders != null && !orders.isEmpty()) {
		String mandantId = orders.get(0).get(LabOrder.FLD_MANDANT);
		if (mandantId != null && !mandantId.isEmpty()) {
			return Mandant.load(mandantId);
		}
	}
	
	// sometimes the mandant is persisted delayed from another thread - we have to try again to fetch the mandant id
	if (retry)
	{
		try {
			Thread.sleep(1500);
			return loadAssignedMandant(false);
		}
		 catch (InterruptedException e) {
			/* ignore */
		}
	}
	return null;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:24,代码来源:AddLabInboxElement.java

示例11: execute

import ch.elexis.data.Mandant; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException{
	String paramAttachments = event.getParameter("at.medevit.elexis.ehc.ui.vacdoc.attachments");
	String paramPatientId = event.getParameter("at.medevit.elexis.ehc.ui.vacdoc.patient.id");
	String paramTmpDir = event.getParameter("at.medevit.elexis.ehc.ui.vacdoc.tmp.dir");
	
	if (paramAttachments != null && paramPatientId != null && paramTmpDir != null) {
		Patient patient = Patient.load(paramPatientId);
		if (patient.exists() && !paramAttachments.isEmpty()) {
			Mandant mandant = ElexisEventDispatcher.getSelectedMandator();
			List<File> files = new ArrayList<>();
			
			for (String attachmentPath : paramAttachments.split(":::")) {
				File f = new File(attachmentPath);
				files.add(f);
			}
			return EhcCoreServiceHolder.getService().createXdmContainer(patient, mandant, files,
				paramTmpDir + File.separator + "export.xdm");
		}
	}
	return null;
	
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:24,代码来源:CreateXdmHandler.java

示例12: createMandanten

import ch.elexis.data.Mandant; //导入依赖的package包/类
private void createMandanten(){
	mandator = new Mandant("Testinger", "Hannelore", "01.01.1999", "w");
	mandator.setLabel("mt");
	mandator.set(Kontakt.FLD_STREET, "Testweg 15");
	mandator.set(Kontakt.FLD_ZIP, "1234");
	mandator.set(Kontakt.FLD_PLACE, "Testhausen");
	mandator.set(Kontakt.FLD_PHONE1, "+41 79 123 45 90");
	mandator.set(Person.TITLE, "Dr. med.");
	
	mandator.setExtInfoStoredObjectByKey("Anrede", "Frau");
	mandator.setExtInfoStoredObjectByKey("Kanton", "AG");
	
	mandator.addXid(DOMAIN_EAN, "2000000000002", true);
	
	CoreHub.setMandant(mandator);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:17,代码来源:TestData.java

示例13: before

import ch.elexis.data.Mandant; //导入依赖的package包/类
@BeforeClass
public static void before() throws IOException{
	patient = new Patient("name", "firstname", "01.01.2000", Patient.FEMALE);
	patient.set(Kontakt.FLD_PHONE1, "+01555123");
	patient.set(Kontakt.FLD_MOBILEPHONE, "+01444132");
	Anschrift anschrift = new Anschrift();
	anschrift.setOrt("City");
	anschrift.setPlz("123");
	anschrift.setStrasse("Street 1");
	patient.setAnschrift(anschrift);
	addAHVNumber(patient, 1);
	
	mandant = new Mandant("mandant", "firstname", "02.02.2002", Mandant.MALE);
	mandant.set(Kontakt.FLD_PHONE1, "+01555987");
	mandant.set(Kontakt.FLD_MOBILEPHONE, "+01444987");
	anschrift = new Anschrift();
	anschrift.setOrt("City");
	anschrift.setPlz("987");
	anschrift.setStrasse("Street 2");
	mandant.setAnschrift(anschrift);
	mandant.addXid(DOMAIN_EAN, "2000000000002", true);
	Xid.localRegisterXIDDomainIfNotExists(DOMAIN_KSK, "KSK/ZSR-Nr", Xid.ASSIGNMENT_REGIONAL); //$NON-NLS-1$
	mandant.addXid(DOMAIN_KSK, "C000002", true);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:25,代码来源:EhcCoreServiceTest.java

示例14: performVaccination

import ch.elexis.data.Mandant; //导入依赖的package包/类
private void performVaccination(String patientId, Artikel article){
	UiDesk.asyncExec(new Runnable() {
		@Override
		public void run(){
			Date d = new Date();
			if (ApplyVaccinationHandler.inProgress()) {
				d = ApplyVaccinationHandler.getKonsDate();
			}
			
			Mandant m = (Mandant) ElexisEventDispatcher.getSelected(Mandant.class);
			ApplicationInputDialog aid =
				new ApplicationInputDialog(UiDesk.getTopShell(), article);
			aid.open();
			String lotNo = aid.getLotNo();
			String side = aid.getSide();
			
			Vaccination vacc = new Vaccination(patientId, article, d, lotNo, m.storeToString());
			
			if (side != null && !side.isEmpty()) {
				vacc.setSide(side);
			}
		}
	});
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:25,代码来源:VaccinationVerrechnetAdjuster.java

示例15: addMandant

import ch.elexis.data.Mandant; //导入依赖的package包/类
public BigInteger addMandant(Mandant mandant){
	BigInteger docId = fireConfig.getDocId(mandant);
	// only add a new doctor model object if no already in the list
	if (doctors.get(docId) == null) {
		if (report.getDoctors() == null) {
			report.setDoctors(fireConfig.getFactory().createReportDoctors());
		}
		
		TDoctor tDoctor = fireConfig.getFactory().createTDoctor();
		tDoctor.setId(docId);
		tDoctor.setSystem("Elexis");
		tDoctor.setFirstName(mandant.getVorname());
		tDoctor.setLastName(mandant.getName());
		
		try {
			tDoctor.setGeburtstag(
				XmlUtil.getXmlGregorianCalendar(new TimeTool(mandant.getGeburtsdatum())));
		} catch (DatatypeConfigurationException e) {
			LoggerFactory.getLogger(ReportBuilder.class).warn("date error", e);
		}
		
		report.getDoctors().getDoctor().add(tDoctor);
		doctors.put(docId, tDoctor);
	}
	return docId;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:27,代码来源:ReportBuilder.java


注:本文中的ch.elexis.data.Mandant类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。