當前位置: 首頁>>代碼示例>>Java>>正文


Java Clinic類代碼示例

本文整理匯總了Java中org.oscarehr.common.model.Clinic的典型用法代碼示例。如果您正苦於以下問題:Java Clinic類的具體用法?Java Clinic怎麽用?Java Clinic使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Clinic類屬於org.oscarehr.common.model包,在下文中一共展示了Clinic類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPrescriptionHl7QrCodeImage

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public static byte[] getPrescriptionHl7QrCodeImage(int prescriptionId) {

		logger.debug("Display QR Code for prescriptionId="+prescriptionId);	
		
		try {
			Clinic clinic = clinicDAO.getClinic();
			Prescription prescription = prescriptionDao.find(prescriptionId);
			Provider provider = providerDao.getProvider(prescription.getProviderNo());
			Demographic demographic = demographicDao.getDemographicById(prescription.getDemographicId());
			List<Drug> drugs=drugDao.findByPrescriptionId(prescription.getId().intValue());
						
			OMP_O09 hl7PrescriptionMessage=OmpO09.makeOmpO09(clinic, provider, demographic, prescription, drugs);
			String hl7PrescriptionString = OscarToOscarUtils.pipeParser.encode(hl7PrescriptionMessage);
			logger.debug(hl7PrescriptionString);
			
			int qrCodeScale=Integer.valueOf(OscarProperties.getInstance().getProperty("QR_CODE_IMAGE_SCALE_FACTOR"));
			
			byte[] image=QrCodeUtils.toMultipleQrCodePngs(hl7PrescriptionString, getEcLevel(), QrCodesOrientation.VERTICAL, qrCodeScale);
			
			return(image);
		} catch (Exception e) {
			logger.error("Unexpected error.", e);
		}

		return (null);
	}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:27,代碼來源:PrescriptionQrCodeUIBean.java

示例2: fillPrd

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
/**
 * @param prd
 * @param provider
 * @param providerRoleId Note that this is not the oscar provider role, look in the method to see valid values
 * @param providerRoleDescription Note that this is not the oscar provider role, look in the method to see valid values
 */
public static void fillPrd(PRD prd, Provider provider, String providerRoleId, String providerRoleDescription, Clinic clinic) throws DataTypeException, HL7Exception {
	// Value Description
	// -----------------
	// RP Referring Provider
	// PP Primary Care Provider
	// CP Consulting Provider
	// RT Referred to Provider
	prd.getProviderRole(0).getIdentifier().setValue(providerRoleId);
	prd.getProviderRole(0).getText().setValue(providerRoleDescription);

	XPN xpn = prd.getProviderName(0);
	xpn.getFamilyName().getSurname().setValue(provider.getLastName());
	xpn.getGivenName().setValue(provider.getFirstName());
	xpn.getPrefixEgDR().setValue(provider.getTitle());

	XAD xad = prd.getProviderAddress(0);
	fillXAD(xad, clinic, null, "O");

	XTN xtn = prd.getProviderCommunicationInformation(0);
	xtn.getUnformattedTelephoneNumber().setValue(provider.getWorkPhone());
	xtn.getCommunicationAddress().setValue(provider.getEmail());

	PLN pln = prd.getProviderIdentifiers(0);
	pln.getIDNumber().setValue(provider.getProviderNo());
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:32,代碼來源:DataTypeUtils.java

示例3: makeOruR01

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
/**
 * This method is essentially used to make an ORU_R01 containing pretty much any random data.
 * @throws UnsupportedEncodingException 
 */
public static ORU_R01 makeOruR01(Clinic clinic, Demographic demographic, ObservationData observationData, Provider sendingProvider, ProfessionalSpecialist receivingProfessionalSpecialist) throws HL7Exception, UnsupportedEncodingException {
	ORU_R01 observationMsg = new ORU_R01();

	DataTypeUtils.fillMsh(observationMsg.getMSH(), new Date(), clinic.getClinicName(), "ORU", "R01", "ORU_R01", DataTypeUtils.HL7_VERSION_ID);
	DataTypeUtils.fillSft(observationMsg.getSFT(), OscarProperties.getBuildTag(), OscarProperties.getBuildDate());

	ORU_R01_PATIENT_RESULT patientResult = observationMsg.getPATIENT_RESULT(0);
	DataTypeUtils.fillPid(patientResult.getPATIENT().getPID(), 1, demographic);

	ORU_R01_ORDER_OBSERVATION orderObservation = patientResult.getORDER_OBSERVATION(0);
	fillBlankOBR(orderObservation.getOBR());
	fillNtesWithObservationData(orderObservation, observationData);

	// use ROL for the sending and receiving provider
	DataTypeUtils.fillRol(orderObservation.getROL(0), sendingProvider, clinic, DataTypeUtils.ACTION_ROLE_SENDER);
	DataTypeUtils.fillRol(orderObservation.getROL(1), receivingProfessionalSpecialist, DataTypeUtils.ACTION_ROLE_RECEIVER);

	return (observationMsg);
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:24,代碼來源:OruR01.java

示例4: createHeader

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
/**
 * CREATE HEADER PART OF XPHR
 *
 * @param demoId
 * @param userRole
 * @param user
 */
private static void createHeader(int demographicNo) {

    DemographicDao demographicDao = (DemographicDao) SpringUtils.getBean(DemographicDao.class);
    Demographic demographic = demographicDao.getDemographic(String.valueOf(demographicNo));

    Provider provider = ProviderUtil.createProvider(demographic, providerNo);

    ClinicDAO clinicDao = (ClinicDAO) SpringUtils.getBean(ClinicDAO.class);
    Clinic clinic = clinicDao.getClinic();

    setProviderInfo(phrExtractDocument.addAuthor(), provider);
    setCustodianInfo(clinic);

    LegalAuthenticatorTemplate legalAuthenticator = phrExtractDocument.setLegalAuthenticator();
    FuncUtil.copy(setRecordTargetInfo(demographic), legalAuthenticator);
    HashSet<Provider> providers = new HashSet<Provider>();
    providers.add(provider);
    providers.addAll(CaseManagementUtil.getAllCaseManagementNoteProviders(demographicNo));
    DocumentationOfTemplate docTemplate = phrExtractDocument.addDocumentationOf();
    for (Provider prov : providers) {

        setProviderInfo(docTemplate.addPerformer(), prov);
    }
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:32,代碼來源:CDADocumentUtil.java

示例5: getFax

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
/**
 *Retrieve fax number for current provider first by querying property table then clinic table
 */
public String getFax() {
    String faxNum = "";
    
    List<Property> props =  dao.findByNameAndProvider(faxColName, provider);
    for(Property p:props) {
 	   faxNum = p.getValue();
    }
    
    if( faxNum.equals("") ) {
 	   List<Clinic> clinics = clinicDao.findAll();
 	   for(Clinic c:clinics) {
 		   faxNum = c.getClinicFax();
 	   }
    }
    
    return faxNum;
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:21,代碼來源:ProviderFaxUpdater.java

示例6: getLocalClinicAddr

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public Properties getLocalClinicAddr() {
	Properties retval = new Properties();

	Clinic clinic = clinicDao.getClinic();
	if (clinic != null) {
		retval.setProperty("clinic_name", clinic.getClinicName());
		retval.setProperty("clinic_address", clinic.getClinicAddress());
		retval.setProperty("clinic_city", clinic.getClinicCity());
		retval.setProperty("clinic_province", clinic.getClinicProvince());
		retval.setProperty("clinic_postal", clinic.getClinicPostal());
		retval.setProperty("clinic_fax", clinic.getClinicFax());
		retval.setProperty("clinic_phone", clinic.getClinicPhone());
		retval.setProperty("clinic_fax", clinic.getClinicFax());
	}

	return retval;
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:18,代碼來源:JdbcBilling3rdPartImpl.java

示例7: fillClinicData

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
void fillClinicData() {
	if (!filled) {
		ClinicDAO dao = SpringUtils.getBean(ClinicDAO.class);
		Clinic clinic = dao.getClinic();

		if (clinic != null) {
			clinic_no = clinic.getId().toString();
			clinic_name = clinic.getClinicName();
			clinic_address = clinic.getClinicAddress();
			clinic_city = clinic.getClinicCity();
			clinic_postal = clinic.getClinicPostal();
			clinic_phone = clinic.getClinicPhone();
			clinic_fax = clinic.getClinicFax();
			clinic_location_code = clinic.getClinicLocationCode();
			clinic_province = clinic.getClinicProvince();
			clinic_delim_phone = clinic.getClinicDelimPhone();
			clinic_delim_fax = clinic.getClinicDelimFax();
		}

		filled = true;
	}
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:23,代碼來源:ClinicData.java

示例8: testGetClinic

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
@Test
public void testGetClinic() throws Exception {
	
	Clinic clinic1 = new Clinic();
	EntityDataGenerator.generateTestDataForModelClass(clinic1);
	dao.persist(clinic1);
	
	Clinic clinic2 = new Clinic();
	EntityDataGenerator.generateTestDataForModelClass(clinic2);
	dao.persist(clinic2);
	
	Clinic clinic3 = new Clinic();
	EntityDataGenerator.generateTestDataForModelClass(clinic3);
	dao.persist(clinic3);
	
	Clinic expectedResult = clinic1;
	Clinic result = dao.getClinic();
	
	assertEquals(expectedResult, result);
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:21,代碼來源:ClinicDAOTest.java

示例9: custodianIdLensGetTest

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
@Test
public void custodianIdLensGetTest() {
	CustodianIdLens lens = new CustodianIdLens();
	assertNotNull(lens);

	Pair<Clinic, Custodian> pair = lens.get(getPair);
	assertNotNull(pair);
	assertNotNull(pair.getLeft());
	assertNotNull(pair.getRight());

	SET<II> ids = pair.getRight().getAssignedCustodian().getRepresentedCustodianOrganization().getId();
	assertNotNull(ids);
	assertEquals(Constants.EMR.EMR_OID, ids.get(0).getRoot());
	assertEquals(Constants.EMR.EMR_VERSION, ids.get(0).getAssigningAuthorityName());
	assertEquals(clinic.getId().toString(), ids.get(0).getExtension());
}
 
開發者ID:jujaga,項目名稱:bxe2e,代碼行數:17,代碼來源:CustodianLensesTest.java

示例10: custodianIdLensPutTest

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
@Test
public void custodianIdLensPutTest() {
	CustodianIdLens lens = new CustodianIdLens();
	assertNotNull(lens);

	SET<II> ids = new SET<>(new II(Constants.EMR.EMR_OID, clinic.getId().toString()));
	putPair.getRight().getAssignedCustodian().getRepresentedCustodianOrganization().setId(ids);

	Pair<Clinic, Custodian> pair = lens.put(putPair, putPair);
	assertNotNull(pair);
	assertNotNull(pair.getLeft());
	assertNotNull(pair.getRight());
	assertEquals(clinic.getId(), pair.getLeft().getId());

	ids = new SET<>(new II(Constants.EMR.EMR_OID, "garbage"));
	putPair.getRight().getAssignedCustodian().getRepresentedCustodianOrganization().setId(ids);
	putPair.getLeft().setId(null);

	pair = lens.put(putPair, putPair);
	assertNull(pair.getLeft().getId());
}
 
開發者ID:jujaga,項目名稱:bxe2e,代碼行數:22,代碼來源:CustodianLensesTest.java

示例11: getLocalClinicAddr

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public Properties getLocalClinicAddr() {
	Properties retval = new Properties();

	Clinic clinic = clinicDao.getClinic();
	if(clinic != null) {
		retval.setProperty("clinic_name", clinic.getClinicName());
		retval.setProperty("clinic_address", clinic.getClinicAddress());
		retval.setProperty("clinic_city", clinic.getClinicCity());
		retval.setProperty("clinic_province", clinic.getClinicProvince());
           retval.setProperty("clinic_postal", clinic.getClinicPostal());
		retval.setProperty("clinic_fax", clinic.getClinicFax());
		retval.setProperty("clinic_phone", clinic.getClinicPhone());
		retval.setProperty("clinic_fax", clinic.getClinicFax());
	}

	return retval;
}
 
開發者ID:oscarservice,項目名稱:oscar-old,代碼行數:18,代碼來源:JdbcBilling3rdPartImpl.java

示例12: CustodianModel

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public CustodianModel(Clinic clinic) {
	if(clinic == null) {
		this.clinic = new Clinic();
	} else {
		this.clinic = clinic;
	}

	setIds();
	setName();
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:11,代碼來源:CustodianModel.java

示例13: view

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public ActionForward view(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
    Clinic clinic = clinicDAO.getClinic();
    DynaActionForm frm = (DynaActionForm)form;
    frm.set("clinic",clinic);
    request.setAttribute("clinicForm",form);
    return mapping.findForward("success");
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:8,代碼來源:ClinicManageAction.java

示例14: update

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
    DynaActionForm frm = (DynaActionForm)form;
    Clinic clinic = (Clinic) frm.get("clinic");
    //weird hack, but not sure why struts isn't filling in the id.
    if(request.getParameter("clinic.id") != null && request.getParameter("clinic.id").length()>0 && clinic.getId()==null) {
    	clinic.setId(Integer.parseInt(request.getParameter("clinic.id")));
    }
    clinicDAO.save(clinic);

    return mapping.findForward("success");
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:12,代碼來源:ClinicManageAction.java

示例15: getClinic

import org.oscarehr.common.model.Clinic; //導入依賴的package包/類
public Clinic getClinic(){
	Query query = entityManager.createQuery("select c from Clinic c");
    @SuppressWarnings("unchecked")
    List<Clinic> codeList = query.getResultList();
    if(codeList.size()>0) {
    	return codeList.get(0);
    }
    return null;
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:10,代碼來源:ClinicDAO.java


注:本文中的org.oscarehr.common.model.Clinic類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。