package org.mitre.synthea.world.concepts;

import org.mitre.synthea.world.concepts.HealthRecord.Entry;

public class Costs {

  /**
   * Load all cost data needed by the system.
   */
  public static void loadCostData() {
    // TODO: stub. fill this in once we have meaningful cost data to load
  }

  /**
   * Calculate the cost of this Procedure, Encounter, Medication, etc.
   * 
   * @param entry Entry to calculate cost of.
   * @param isFacility Whether to use facility-based cost factors.
   * @return Cost, in USD.
   */
  public static double calculateCost(Entry entry, boolean isFacility) {
    // TODO: stub. fill this in once we have meaningful cost data
    return 0.0;
  }
}

@@ -669,19 +669,1095 @@
     
+%0A    if (entry instanceof HealthRecord.Procedure) %7B%0A      
 return 
+50
 0.0;
+ // TODO: completely invented%0A    %7D else if (entry instanceof HealthRecord.Medication) %7B%0A      return 255.0;%0A    %7D else if (entry instanceof HealthRecord.Encounter) %7B%0A      %0A      // Encounters billed using avg prices from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3096340/%0A      // Adjustments for initial or subsequent hospital visit and level/complexity/time of encounter%0A      // not included. Assume initial, low complexity encounter (Tables 4 & 6)%0A      %0A      String code = entry.codes.get(0).code;%0A      if (code.equals(%22183452005%22)) %7B%0A        // Encounter for 'checkup', Encounter for symptom, Encounter for problem, etc%0A        return 75.0;%0A      %7D else %7B%0A        return 125.0;%0A      %7D%0A    %7D else %7B%0A      // Immunizations, Conditions, and Allergies are all just Entries,%0A      // but this should only be called for Immunizations%0A      %0A      // https://www.nytimes.com/2014/07/03/health/Vaccine-Costs-Soaring-Paying-Till-It-Hurts.html%0A      // currently all vaccines cost $136.%0A      return 136.0;%0A    %7D
 %0A  %7D

add default costs, based on ruby defaults