<commit_before>/**
 * Created by ahuffman on 8/17/15.
 */
let patientDemographicData = require('./patientDemographics.json');
let patientAddressData = require('./patientAddresses.json');
let patientMedicalStatusesData = require('./patientMedicalStatuses.json');
let financePrograms = require('./patientFinancePrograms.json')

export const getPatientFromFile = (patientId)=> patientDemographicData.filter((patient)=> patient.id == patientId)[0]

export const getPatientsFromFile = (limit)=> limit == null || limit > patientDemographicData.length ? patientDemographicData : patientDemographicData.slice(0, limit)

//export const getPatientAddressFromFile = (patientId)=> patientAddressData.filter((address) => address.patientId == patientId)[0]

export const getPatientAddressesFromFile = (patientIds)=> patientAddressData.filter((address) => patientIds.indexOf(address.patientId) != -1)

export const getPatientMedicalStatusFromFile = (patientId)=> patientMedicalStatusesData.filter((medStatus)=> medStatus.patientId == patientId)[0]

export const getPatientMedicalStatusesFromFile = (patientIds)=> patientMedicalStatusesData.filter((medStatus)=> patientIds.indexOf(medStatus.patientId) != -1 )

export const getPatientFinanceProgramFromFile = (patientId)=> financePrograms.filter((financeProgram)=> financeProgram.patientId==patientId )

export const getPatientFinanceProgramsFromFile = (patientIds)=> financePrograms.filter((finances)=> patientIds.indexOf(finances.patientId) != -1 )
<commit_msg>updated the stubFunctions to get data from the json files<commit_after> /**
 * Created by <NAME> on 11/05/15.
 */
let playerData = require('./player.json');
let matchData = require('./match.json');
let scoreData = require('./score.json')
let tryData = require('./try.json');

 export const getAllPlayerDataFromFile = () => playerData;
 export const getPlayerDataFromFile = (playerId)=> playerData.filter(function(player) {
  console.log(player);
  console.log(playerId);
  return player.playerId === playerId;
 })

// export const getPatientsFromFile = (limit)=> limit == null || limit > patientDemographicData.length ? patientDemographicData : patientDemographicData.slice(0, limit)

// export const getPatientAddressFromFile = (patientId)=> patientAddressData.filter((address) => address.patientId == patientId)[0]

// export const getPatientAddressesFromFile = (patientIds)=> patientAddressData.filter((address) => patientIds.indexOf(address.patientId) != -1)

// export const getPatientMedicalStatusFromFile = (patientId)=> patientMedicalStatusesData.filter((medStatus)=> medStatus.patientId == patientId)[0]

// export const getPatientMedicalStatusesFromFile = (patientIds)=> patientMedicalStatusesData.filter((medStatus)=> patientIds.indexOf(medStatus.patientId) != -1 )

// export const getPatientFinanceProgramFromFile = (patientId)=> financePrograms.filter((financeProgram)=> financeProgram.patientId==patientId )

// export const getPatientFinanceProgramsFromFile = (patientIds)=> financePrograms.filter((finances)=> patientIds.indexOf(finances.patientId) != -1 )
{'fraction_non_alphanumeric': 0.13224755700325733, 'fraction_numerical': 0.007817589576547232, 'mean_word_length': 7.345108695652174, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 36, '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': '6161404', 'n_tokens_mistral': 868, 'n_tokens_neox': 833, 'n_words': 170}