本文整理汇总了Java中org.oscarehr.common.model.Provider类的典型用法代码示例。如果您正苦于以下问题:Java Provider类的具体用法?Java Provider怎么用?Java Provider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Provider类属于org.oscarehr.common.model包,在下文中一共展示了Provider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove_team
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public ActionForward remove_team(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
DynaActionForm providerForm = (DynaActionForm)form;
Provider provider = (Provider)providerForm.get("provider");
ProgramProvider pp = (ProgramProvider)providerForm.get("program_provider");
ProgramProvider existingPP = null;
existingPP = programManager.getProgramProvider(provider.getProviderNo(),String.valueOf(pp.getProgramId()));
String teamId = request.getParameter("teamId");
if (existingPP != null && teamId != null && teamId.length() > 0) {
long team_id = Long.valueOf(teamId);
for (Iterator iter = existingPP.getTeams().iterator(); iter.hasNext();) {
ProgramTeam temp = (ProgramTeam) iter.next();
if (temp.getId() == team_id) {
existingPP.getTeams().remove(temp);
break;
}
}
programManager.saveProgramProvider(existingPP);
}
setEditAttributes(request,providerManager.getProvider(provider.getProviderNo()));
providerForm.set("program_provider",new ProgramProvider());
return mapping.findForward("edit");
}
示例2: getCurTeamProviderStr
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public List<String> getCurTeamProviderStr(String provider_no) {
List<String> retval = new ArrayList<String>();
String proid = "";
String proFirst = "";
String proLast = "";
String proOHIP = "";
String specialty_code;
String billinggroup_no;
List<Provider> ps = providerDao.getCurrentTeamProviders(provider_no);
for(Provider p:ps) {
proid = p.getProviderNo();
proLast = p.getLastName();
proFirst = p.getFirstName();
proOHIP = p.getOhipNo();
billinggroup_no = getXMLStringWithDefault(p.getComments(), "xml_p_billinggroup_no", "0000");
specialty_code = getXMLStringWithDefault(p.getComments(), "xml_p_specialty_code", "00");
retval.add(proid + "|" + proLast + "|" + proFirst + "|" + proOHIP + "|" + billinggroup_no + "|" + specialty_code);
}
return retval;
}
示例3: getMeasurementObjectByType
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public static List<EctMeasurementsDataBean> getMeasurementObjectByType(String type, Integer demographicNo) {
List<EctMeasurementsDataBean> measurements = new ArrayList<EctMeasurementsDataBean>();
MeasurementDao dao = SpringUtils.getBean(MeasurementDao.class);
for(Object[] i : dao.findMeasurementsAndProvidersByType(type, demographicNo)) {
Measurement m = (Measurement) i[0];
Provider p = (Provider) i[2];
EctMeasurementsDataBean measurement = new EctMeasurementsDataBean();
measurement.setId(m.getId());
measurement.setMeasuringInstrc(m.getMeasuringInstruction());
measurement.setType(m.getType());
measurement.setProviderFirstName(p.getFirstName());
measurement.setProviderLastName(p.getLastName());
measurement.setDataField(m.getDataField());
measurement.setComments(m.getComments());
measurement.setDateObservedAsDate(m.getDateObserved());
measurement.setDateEnteredAsDate(m.getCreateDate());
measurements.add(measurement);
}
return measurements;
}
示例4: run
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public void run() throws Exception {
//get a list of providers
ProviderManager providerManager = (ProviderManager)ctx.getBean("providerManager");
List providers = providerManager.getProviders();
for(Iterator iter=providers.iterator();iter.hasNext();) {
Provider provider = (Provider)iter.next();
Set roles = getRoles(provider.getProviderNo());
if(roles.size() > 1) {
continue;
}
int x=0;
StringBuilder buf = new StringBuilder();
for(Iterator iter2=roles.iterator();iter2.hasNext();) {
String roleName= (String)iter2.next();
if(x!=0) {
buf.append(",");
}
buf.append(roleName);
x++;
}
buf.append("\n");
}
}
示例5: getProvidersByPrograms
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<Provider> getProvidersByPrograms(List<Integer> programNos) {
List<Long> lProgramNos = new ArrayList<Long>();
for(Integer i:programNos) {
lProgramNos.add(i.longValue());
}
List<Provider> results = new ArrayList<Provider>();
String queryString = "select distinct p from ProgramProvider pp, Provider p WHERE pp.ProgramId IN (:domain) and pp.ProviderNo = p.ProviderNo order by p.LastName, p.FirstName";
Session session = this.getSession();
try {
Query q = session.createQuery(queryString);
q.setParameterList("domain", lProgramNos);
results = q.list();
} finally {
this.releaseSession(session);
}
return results;
}
示例6: toHashTable
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
private static Hashtable<String,Object> toHashTable(Measurement m, MeasurementType mt, Provider p){
Hashtable<String,Object> data = new Hashtable<String,Object>();
data.put("type", mt.getTypeDisplayName());
data.put("typeDisplayName", mt.getTypeDisplayName());
data.put("typeDescription", mt.getTypeDescription());
data.put("value", m.getDataField());
data.put("measuringInstruction", m.getMeasuringInstruction());
data.put("comments", m.getComments());
data.put("dateObserved", ConversionUtils.toTimestampString(m.getDateObserved()));
data.put("dateObserved_date", m.getDateObserved());
data.put("dateEntered", ConversionUtils.toTimestampString(m.getCreateDate()));
data.put("dateEntered_date", m.getCreateDate());
data.put("provider_first", p.getFirstName());
data.put("provider_last", p.getLastName());
return data;
}
示例7: testConversion
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
@Test
public void testConversion() throws Exception {
Demographic demo = new Demographic();
EntityDataGenerator.generateTestDataForModelClass(demo);
demo.setDateOfBirth("01");
demo.setMonthOfBirth("01");
demo.setYearOfBirth("01");
Provider provider = new Provider();
EntityDataGenerator.generateTestDataForModelClass(provider);
demo.setProvider(provider);
DemographicExt demoExt = new DemographicExt();
EntityDataGenerator.generateTestDataForModelClass(demoExt);
demo.setExtras(new DemographicExt[] { demoExt });
DemographicTo1 demoTo = demoConverter.getAsTransferObject(getLoggedInInfo(),demo);
Demographic demoCheck = demoConverter.getAsDomainObject(getLoggedInInfo(),demoTo);
assertEquals(demo, demoCheck);
}
示例8: setUpBeforeClass
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() {
LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoAsCurrentClassAndMethod();
Provider provider = new Provider();
provider.setProviderNo("100");
loggedInInfo.setLoggedInProvider( provider );
ticklerHandler = new TicklerHandler( loggedInInfo, new TicklerManager() );
Map<String, Object[]> parameterMap = new HashMap<String, Object[]>();
parameterMap.put("message", new String[]{"This is a message."} );
parameterMap.put("messageAppend", new String[]{"This is an appended message."} );
parameterMap.put("priority", new String[]{"High"} );
parameterMap.put("serviceDate", new String[]{"06-18-2017"} );
parameterMap.put("serviceTime", new String[]{"04:08 PM"});
parameterMap.put("taskAssignedTo", new String[]{"100"} );
parameterMap.put("creator", new String[]{"100"} );
parameterMap.put("ticklerCategoryId", new String[]{"1"} );
ticklerHandler.createMasterTickler( parameterMap );
ticklerHandler.addTickler( json );
}
示例9: getLoggedInInfo
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
private LoggedInInfo getLoggedInInfo() {
String providerNo = OscarProperties.getInstance().getProperty("mymeds_job_run_as_provider");
if(providerNo == null) {
return null;
}
ProviderDAO providerDao = SpringUtils.getBean(ProviderDao.class);
Provider provider = providerDao.getProvider(providerNo);
if(provider == null) {
return null;
}
SecurityDao securityDao = SpringUtils.getBean(SecurityDao.class);
List<Security> securityList = securityDao.findByProviderNo(providerNo);
if(securityList.isEmpty()) {
return null;
}
LoggedInInfo x = new LoggedInInfo();
x.setLoggedInProvider(provider);
x.setLoggedInSecurity(securityList.get(0));
return x;
}
示例10: getProviderList
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static ArrayList<ArrayList<String>> getProviderList() {
try {
ArrayList<ArrayList<String>> result = new ArrayList<ArrayList<String>>();
ProviderDao dao = SpringUtils.getBean(ProviderDao.class);
List<Provider> providers = dao.getProvidersByType(ProviderDao.PR_TYPE_DOCTOR);
Collections.sort(providers, new BeanComparator("formattedName"));
for (Provider p : providers) {
ArrayList<String> provider = new ArrayList<String>();
provider.add(p.getProviderNo());
provider.add(p.getFirstName());
provider.add(p.getLastName());
result.add(provider);
}
return result;
} catch (Exception e) {
MiscUtils.getLogger().debug("exception in ProviderData:" + e);
return null;
}
}
示例11: search
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
@POST
@Path("/providers/search")
@Produces("application/json")
@Consumes("application/json")
public AbstractSearchResponse<ProviderTo1> search(JSONObject json,@QueryParam("startIndex") Integer startIndex,@QueryParam("itemsToReturn") Integer itemsToReturn ) {
AbstractSearchResponse<ProviderTo1> response = new AbstractSearchResponse<ProviderTo1>();
int startIndexVal = startIndex==null?0:startIndex.intValue();
int itemsToReturnVal = itemsToReturn==null?5000:startIndex.intValue();
boolean active = Boolean.valueOf(json.getString("active"));
String term = null;
if(json.containsKey("searchTerm")) {
term = json.getString("searchTerm");
}
List<Provider> results = providerManager.search(getLoggedInInfo(),term, active,startIndexVal, itemsToReturnVal);
ProviderConverter converter = new ProviderConverter();
response.setContent(converter.getAllAsTransferObjects(getLoggedInInfo(),results));
response.setTotal(response.getContent().size());
return response;
}
示例12: getActiveTeamProviders
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public List<Provider> getActiveTeamProviders(String providerNo) {
List<Provider> ret = new ArrayList<Provider>();
String sql = "from Provider "
+ "where Status= '1' and OhipNo!='' and (ProviderNo= ? or " +
"Team=(select p1.Team from Provider p1 where ProviderNo= ?)) order by LastName, FirstName";
ArrayList<String> paramList = new ArrayList<String>();
paramList.add(providerNo);
paramList.add(providerNo);
Object params[] = paramList.toArray(new Object[paramList.size()]);
List<Object> rs = getHibernateTemplate().find(sql,params);
for(Object p : rs) {
ret.add((Provider)p);
}
return ret;
}
示例13: parsePrdAsProvider
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
/**
* @return a detached and non-persisted Provider model object with data filed in from the PRD.
* @throws HL7Exception
*/
public static Provider parsePrdAsProvider(PRD prd) throws HL7Exception {
Provider provider = new Provider();
XPN xpn = prd.getProviderName(0);
provider.setLastName(StringUtils.trimToNull(xpn.getFamilyName().getSurname().getValue()));
provider.setFirstName(StringUtils.trimToNull(xpn.getGivenName().getValue()));
provider.setTitle(StringUtils.trimToNull(xpn.getPrefixEgDR().getValue()));
XAD xad = prd.getProviderAddress(0);
provider.setAddress(StringUtils.trimToNull(xad.getStreetAddress().getStreetOrMailingAddress().getValue()));
XTN xtn = prd.getProviderCommunicationInformation(0);
provider.setWorkPhone(StringUtils.trimToNull(xtn.getUnformattedTelephoneNumber().getValue()));
provider.setEmail(StringUtils.trimToNull(xtn.getCommunicationAddress().getValue()));
PLN pln = prd.getProviderIdentifiers(0);
provider.setProviderNo(StringUtils.trimToNull(pln.getIDNumber().getValue()));
return (provider);
}
示例14: getCurSoloProvider
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public List<BillingProviderData> getCurSoloProvider() {
List<BillingProviderData> retval = new ArrayList<BillingProviderData>();
String specialty_code;
String billinggroup_no;
List<Provider> ps = providerDao.getBillableProviders();
for(Provider p:ps) {
billinggroup_no = getXMLStringWithDefault(p.getComments(), "xml_p_billinggroup_no", "0000");
specialty_code = getXMLStringWithDefault(p.getComments(), "xml_p_specialty_code", "00");
if (!"0000".equals(billinggroup_no))
continue;
BillingProviderData pObj = new BillingProviderData();
pObj.setProviderNo(p.getProviderNo());
pObj.setLastName(p.getLastName());
pObj.setFirstName(p.getFirstName());
pObj.setOhipNo(p.getOhipNo());
pObj.setSpecialtyCode(specialty_code);
pObj.setBillingGroupNo(billinggroup_no);
retval.add(pObj);
}
return retval;
}
示例15: createBill
import org.oscarehr.common.model.Provider; //导入依赖的package包/类
public String createBill(LoggedInInfo loggedInInfo, String provider, Integer demographic, String code, String dxCode, String clinicRefCode, Date serviceDate, String curUser) {
BillingONCHeader1 header1 = null;
Provider prov = providerDao.getProvider(provider);
OscarProperties properties = OscarProperties.getInstance();
ArrayList<String>codes = new ArrayList<String>();
ArrayList<String>dxCodes = new ArrayList<String>();
codes.add(code);
dxCodes.add(dxCode);
String total = this.calcTotal(codes,serviceDate);
header1 = this.assembleHeader1(prov, demographic, clinicRefCode, serviceDate, total, curUser, properties);
if(header1 == null)
return null;
this.addItems(header1, codes, dxCodes, serviceDate);
this.persist(header1);
return total;
}