Note!

All data is sourced from the Japanese government website. The DPC-to-ICD-10 mapping includes only a limited set of ICD-10 codes, which is why the Japanese dataset contains fewer rows compared to other countries, such as Germany.


This paper tries to explain the weird Japanese coding system:

https://pmc.ncbi.nlm.nih.gov/articles/PMC7738645/


Japan uses it's own coding system for surgery (K codes).


Gathering Japanese Data Checklist

Overview of Japanese Years:

https://www.oist.jp/resource-center/year-converter

Begin by Navigating to the URL:

https://www.mhlw.go.jp/stf/shingi/shingi-chuo_128164.html


Translate the webpage.


In the table look for the column heading “Issues, etc.” something like:

Regarding the report on the results of the “Discharged Patient Survey”, a survey related to the impact evaluation of the introduction of DPC in FY2021

In short: Codes 08, 09, and 10 are not diagnoses - they’re accounting buckets for aggregation. They ensure that hospitals and the Ministry can clearly track how much care falls outside bundled DPC reimbursement, preserving fairness, benchmarking, and policy oversight. And the hospital gets paid.

In the “Information, etc.” column click on the link “material” and up comes all the reports for the selected year.

Look for subheading called “Reference material 2” 


We are interested in downloading the MDC files starting with the following numbers:

8 refers to Group 08

9 refers to Group 09

10 refers to Group 10

Start by downloading


we need all three groups to capture all DPCs


Basic URLs for MDC files:

2017

https://www.mhlw.go.jp/stf/shingi2/0000196043_00001.html

2018

https://www.mhlw.go.jp/stf/shingi2/0000196043_00003.html

2019

https://www.mhlw.go.jp/stf/shingi2/0000196043_00004.html

2020

https://www.mhlw.go.jp/stf/shingi2/0000196043_00005.html

2021

https://www.mhlw.go.jp/stf/shingi2/0000196043_00006.html

2022 (Note! Japanese website displays year as 2020)

https://www.mhlw.go.jp/stf/shingi2/newpage_39119.html

2023

https://www.mhlw.go.jp/stf/shingi2/newpage_00137.html


Start by downloading Facility overview table spreadsheet which is the very first available spreadsheet:

This spreadsheet contains key information from which we can gather  the Japanese serial for both current year and last year, the city number, the prefecture and finally the hospital name. 


Case Logic Methodology

Stuff to consider

Every hospital is present in each group, but not all DPCs are present in every group. Additionally, when DPCs appear multiple times, the cases will vary.

Our model considers hospitals, DPCs, and cases. In cases where the same DPC appears multiple times across groups, we prioritize the highest number of cases associated with that DPC.

 The PHP Workings

Instead, it checks all step_2 tables for the year. Identify all step_2 tables for the given year.

Priority is not given to groups 8, 9, and 10.

Processes a px_serial and its associated codes

Compare the case counts across all groups for the same code.

For each code, it finds the group with the greatest number of cases and assigns that one.

Insert/update into your step_3 table accordingly.

Validation checks

Compares distinct px_serials between all step_2 tables and the final step_3 px_serial.

Everything else (database connection $conn, validation, final table build, messages) will stay intact.

•  px_serial preservation (already there).

•  Batch code totals validation (fast).

•  Missing codes detection → ensures every code in sources exists in final.

•  Zero-only columns check → flags codes that are entirely zeros in final.

•  Priority spot-check → confirms that for some sample codes the highest group’s value wins.


See section: Batch Process Excel Files to CSV

See section: Batch Import CSV Files to MySQL Database

See section: Batch Renaming Files


Note!

1.At the end of the PHP run, step_5 and step_6 will also check for any PX serials that do not meet the required 6-digit length and will list them along with the total number of affected records.

2.The mapping of Japanese serials to our serials can be found in the database named purple66_purplextra, table hospital_japan, running on Hostinger.



Topic last reviewed: 16/02/26