Dashboard


Healthix App dashboard provides users a way of selleting different services. Users can reach to the dashboard by just logging in.

If not a warning alert dialog will pop up to show error. Users are also able to now access insurecheck,authorizationletters, and Eprescription services.

You can acknowledge your request by tapping on an option, then a dialog will popup asking you if you are sure of acknowledging all of your alerts .

public class HospitalActivity extends AppCompatActivity {

    private final List<Hospital> hospitalList = new ArrayList<>();
    private List<Payer> listPayer = new ArrayList<>();

    private Hospital hospital;
    private HospitalAdapter adapter;
    private final Gson gson = new Gson();
    Toolbar toolbar;
    private NavigationView navigationView;
    SharedPreferences sp;


    @BindView(R.id.drawer_layout)
    DrawerLayout drawerLayout;
    @BindView(R.id.rv)
    RecyclerView rv;
    @BindView(R.id.text_name)
    TextView textName;
    private Perm internetPermission;
    private static final int PERMISSION_INTERNET_REQUEST = 1;
    AlertDialog alertAuth ;
    SessionManager sessionManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                .setDefaultFontPath("fonts/aller/Aller_Rg.ttf")
                .setFontAttrId(R.attr.fontPath)
                .build()
        );
        sp = PreferenceManager.getDefaultSharedPreferences(HospitalActivity.this);
        sessionManager =  new SessionManager(HospitalActivity.this);

        setContentView(R.layout.activity_hospital);
        navigationView = (NavigationView) findViewById(R.id.navigation);

        ButterKnife.bind(this);
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        setupNavigationView();



         internetPermission = new Perm(this, Manifest.permission.INTERNET);
        setupPermissions();
        rv = (RecyclerView)findViewById(R.id.rv);
        rv.setItemAnimator(new DefaultItemAnimator());
        rv.setHasFixedSize(true);
       rv.setLayoutManager(new LinearLayoutManager(this));
        startIntroAnimation(rv,HospitalActivity.this);

      // rv.setLayoutManager(new GridLayoutManager(this, 3));
      //  rv.addItemDecoration(new GridSpacingItemDecoration(2, 10, true,this));
        setupOnClick();

        adapter = new HospitalAdapter(getApplicationContext(),hospitalList);
        rv.setAdapter(adapter);
        setUpNavigationView();
        hospitalData();
        if(sessionManager.isLoggedIn()){
            textName.setText("Dr " + sessionManager.getUserDetails().get(sessionManager.KEY_NAME).toUpperCase());
            updatePayers();


        }else {
            textName.setText("Guest");
        }

    }
    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
    }
    private void setupOnClick(){

        rv.addOnItemTouchListener(
                new RecyclerItemClickListener(getApplicationContext(), new RecyclerItemClickListener.OnItemClickListener() {
                    @Override
                    public void onItemClick(View view, int position) {
                        switch (position){

                            case 0:
                                if(sessionManager.isLoggedIn()) {
                                    Intent intent = new Intent(getApplicationContext(), SearchedInsureCheckActivity.class);
                                    startActivity(intent);
                                }else{
                                    new AlertPopup().alertError(HospitalActivity.this,"Log in to Access","You have limited access");
                                }
                                break;
                            case 1:
                                if(sessionManager.isLoggedIn()) {
                                    showAuthAlert();
                                }else{
                                    new AlertPopup().alertError(HospitalActivity.this,"Log in to Access","You have limited access");
                                }
                                break;
                            case 2:
                                if(sessionManager.isLoggedIn()) {
                                    new AlertPopup().alertSuccess(HospitalActivity.this, "Coming Soon", "");
                                }else{
                                    new AlertPopup().alertError(HospitalActivity.this,"Log in to Access","You have limited access");
                                }
                                break;
                            case 3:
                                Intent intent2 = new Intent(getApplicationContext(), ProvidersActivity.class);
                                startActivity(intent2);
                                break;

                            case 4:
                                Intent intent4 = new Intent(getApplicationContext(), NewsActivity.class);
                                startActivity(intent4);
                                break;
                            case 5:
                                if(sessionManager.isLoggedIn()) {
                                    Intent intent5 = new Intent(getApplicationContext(), FingerprintActivity.class);
                                    startActivity(intent5);
                                }else{
                                    new AlertPopup().alertError(HospitalActivity.this,"Log in to Access","You have limited access");
                                }
                                break;
                        }
                    }
                })
        );


    }

results matching ""

    No results matching ""