// Path: app/src/main/java/org/epstudios/epcoding/Constants.java
// public final static String SEDATION_TIME = "SEDATION_TIME";


import android.widget.EditText;
import java.util.List;
import java.util.Locale;
import static org.epstudios.epcoding.Constants.SEDATION_TIME;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
        Intent returnIntent = new Intent();
        setResult(Activity.RESULT_CANCELED, returnIntent);
        final int id = v.getId();
        if (id == R.id.calculate_sedation_button) {
            calculateSedationTime();
        }
        else if (id == R.id.no_sedation_button) {
            noSedation(returnIntent);
        }
        else if (id == R.id.add_sedation_button) {
            addCodes(returnIntent);
        }
        else if (id == R.id.cancel_button) {
            finish();
        }
        else {
            finish();
        }
    }

    private void calculateSedationTime() {
        Intent intent = new Intent(this, SedationTimeCalculator.class);
        startActivityForResult(intent, SEDATION_CALCULATOR_REQUEST_CODE);
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == SEDATION_CALCULATOR_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
// Path: app/src/main/java/org/epstudios/epcoding/Constants.java
// public final static String SEDATION_TIME = "SEDATION_TIME";


// Path: app/src/main/java/org/epstudios/epcoding/SedationActivity.java
import android.widget.EditText;
import java.util.List;
import java.util.Locale;
import static org.epstudios.epcoding.Constants.SEDATION_TIME;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;

        Intent returnIntent = new Intent();
        setResult(Activity.RESULT_CANCELED, returnIntent);
        final int id = v.getId();
        if (id == R.id.calculate_sedation_button) {
            calculateSedationTime();
        }
        else if (id == R.id.no_sedation_button) {
            noSedation(returnIntent);
        }
        else if (id == R.id.add_sedation_button) {
            addCodes(returnIntent);
        }
        else if (id == R.id.cancel_button) {
            finish();
        }
        else {
            finish();
        }
    }

    private void calculateSedationTime() {
        Intent intent = new Intent(this, SedationTimeCalculator.class);
        startActivityForResult(intent, SEDATION_CALCULATOR_REQUEST_CODE);
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == SEDATION_CALCULATOR_REQUEST_CODE) {
            if (resultCode == Activity.RESULT_OK) {
                int result = data.getIntExtra(SEDATION_TIME, 0);