<commit_before>import {
<<<<<<< dbc80250cdb466fd2c4c43c183a1186c695b7b8e
  PATIENT_FETCH_PHYSICIANS, PATIENT_FETCH_PHYSICIANS_FAILURE, PHYSICIAN_FETCH_PATIENTS, PHYSICIAN_FETCH_PATIENTS_FAILURE
=======
  PATIENT_FETCH_PHYSICIANS, PATIENT_FETCH_PHYSICIANS_FAILURE,
  PHYSICIAN_FETCH_PATIENTS, PHYSICIAN_FETCH_PATIENTS_FAILURE,
  MAKE_MY_PHYSICIAN_REQUEST, MAKE_MY_PHYSICIAN_SUCCESS, MAKE_MY_PHYSICIAN_FAILURE,
  REMOVE_RELATIONSHIP_REQUEST, REMOVE_RELATIONSHIP_SUCCESS, REMOVE_RELATIONSHIP_FAILURE
>>>>>>> final updates
} from '../../patients/actions/action-constants.js';


const initialState = {
  isFetching: false,
  loaded: false,
  contacts: [],
  fetchHistory: []
};

export default function contactsReducer(state = initialState, action) {
  switch (action.type) {
    case PATIENT_FETCH_PHYSICIANS:
        console.log("PATIENT_FETCH_PHYSICIANS");
        return { ...state, loaded: true, contacts: action.payload }
    case PATIENT_FETCH_PHYSICIANS_FAILURE:
        console.log("PATIENT_FETCH_PHYSICIANS_FAILURE");
        return { ...state, loaded: false }
    case PHYSICIAN_FETCH_PATIENTS:
        console.log("PHYSICIAN_FETCH_PATIENTS");
        return { ...state, loaded: true, contacts: action.payload }
    case PHYSICIAN_FETCH_PATIENTS_FAILURE:
        console.log("PHYSICIAN_FETCH_PATIENTS_FAILURE");
        return { ...state, loaded: false }
    default:
      return state;
  }
};<commit_msg>contacts reducer<commit_after>import {
  PATIENT_FETCH_PHYSICIANS, PATIENT_FETCH_PHYSICIANS_FAILURE,
  PHYSICIAN_FETCH_PATIENTS, PHYSICIAN_FETCH_PATIENTS_FAILURE,
  MAKE_MY_PHYSICIAN_REQUEST, MAKE_MY_PHYSICIAN_SUCCESS, MAKE_MY_PHYSICIAN_FAILURE,
  REMOVE_RELATIONSHIP_REQUEST, REMOVE_RELATIONSHIP_SUCCESS, REMOVE_RELATIONSHIP_FAILURE
} from '../../patients/actions/action-constants.js';


const initialState = {
  isFetching: false,
  loaded: false,
  contacts: [],
  fetchHistory: [],
  relationMade: false,
  relationRemoved: false
};

export default function contactsReducer(state = initialState, action) {
  switch (action.type) {
    
    case PATIENT_FETCH_PHYSICIANS:
        console.log("PATIENT_FETCH_PHYSICIANS");
        return { ...state, loaded: true, contacts: action.payload }
    case PATIENT_FETCH_PHYSICIANS_FAILURE:
        console.log("PATIENT_FETCH_PHYSICIANS_FAILURE");
        return { ...state, loaded: false }
    case PHYSICIAN_FETCH_PATIENTS:
        console.log("PHYSICIAN_FETCH_PATIENTS");
        return { ...state, loaded: true, contacts: action.payload }
    case PHYSICIAN_FETCH_PATIENTS_FAILURE:
        console.log("PHYSICIAN_FETCH_PATIENTS_FAILURE");
        return { ...state, loaded: false }

    case MAKE_MY_PHYSICIAN_REQUEST:
        console.log("MAKE_MY_PHYSICIAN_REQUEST");
        return { ...state, relationMade: action.relation }
    case MAKE_MY_PHYSICIAN_SUCCESS:
        console.log("MAKE_MY_PHYSICIAN_SUCCESS");
        return { ...state, relationMade: action.relation }
    case MAKE_MY_PHYSICIAN_FAILURE:
        console.log("MAKE_MY_PHYSICIAN_FAILURE");
        return { ...state, relationMade: action.relation }
    
    case REMOVE_RELATIONSHIP_REQUEST:
        console.log("REMOVE_RELATIONSHIP_REQUEST");
        return { ...state, relationRemoved: action.relation }
    case REMOVE_RELATIONSHIP_SUCCESS:
        console.log("REMOVE_RELATIONSHIP_SUCCESS");
        return { ...state, relationRemoved: action.relation }
    case REMOVE_RELATIONSHIP_FAILURE:
        console.log("REMOVE_RELATIONSHIP_FAILURE");
        return { ...state, relationRemoved: action.relation }

    default:
      return state;
  }
};
{'fraction_non_alphanumeric': 0.0989103101424979, 'fraction_numerical': 0.006705783738474434, 'mean_word_length': 4.203488372093023, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391745', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1240, 'n_words': 182}