the hira data tables were composed of five main tables ( general specification , healthcare services , diagnosis information , prescriptions , and general information about the medical institutions ) . the disease codes were based on the korean standard classification of disease ( kcd ) . specifications of the computer that was used to analyze the data were as follows : central processing unit ( cpu ) , i3 - 2120 3.30 ghz ( intel , santa clara , ca , usa ) ; 32 gb main memory ; operating system ( os ) , ubuntu 14.04.3 long - term support ( lts ) ; and r 3.2.2 analysis software . the sample data contained 22,344,536 claims in 1,361,717 patients ( selection probability , 0.03 ; sampling weight , 33.3 ) . in the year 2013 , 163,372 pathologic examinations were performed in 103,528 patients ( 45,897 men and 57,631 women ) . the mean and median ages of the patients were 51.8 and 53 years , respectively . the pathologic examination data and medical institutions according to administrative district are summarized in table 2 . the total numbers of medical institutions according to administrative district are summarized in appendix 1 . in total , 43.5% of the tertiary hospitals ( 10/23 ) , 15.6% of the general hospitals ( 48/307 ) , and 23.8% of the other institutions ( 12,090/50,868 ) were located in seoul . in addition , 32.9% of the surgical pathologic examinations ( 53,711/163,372 ) were requested in medical institutions located in seoul . almost all medical and dental departments requested pathologic examinations ( table 3 ) . internal medicine ( 74,232 , 45.4% ) , general surgery ( 34,808 , 21.3% ) , obstetrics and gynecology ( 19,382 , 11.9% ) , and urology ( 9,951 , 6.1% ) were the most common medical departments ( 84.7% ) requesting pathology examinations . a small subset ( 38/17,892 , 0.2% ) of immunohistochemical ( ihc ) stains were not interpreted by qualified doctors ( not claimed as  c5575006  ) ( data not shown ) . claims for acetylcholinesterase ( c5564 ) and chloroacetate esterase ( c5565 ) examinations were not found in our data . among pathologic examination - associated claims , 162,002 examinations ( 99.2% ) had proper claim codes ( examination codes 09 and sub - code 01 ( performed in their own institutions ) or 02 ( performed in outside institutions ) . among pathologic examinations , 65.8% were performed in tertiary or general hospitals ( 39,385 and 67,225 cases , respectively ) ( table 4 ) . almost all examinations claimed by tertiary hospitals were performed in their institute ( 39,349/39,385 , 99.9% ) , and 85% of examinations claimed by general hospitals were performed ( 57,163/67,225 ) in their institute . the other medical institutions claimed considerable pathologic examinations performed by outside services ( 52,214/55,392 , 94.3% ) . according to the claims , 76,016 pathologic examinations ( 44.7% ) were performed due to malignancy ( disease code  c  ) or non - malignant tumorous conditions ( disease code  d00-d48  ) ( table 5 ) . pathologic examination of biopsy specimens was performed more frequently in non - tumorous conditions ( 42,661/61,875 , 68.9% ) . in total , 509 esds were performed in 490 patients ( 341 males and 149 females ) in 109 medical institutions . the median age of the patients was 66 years ( age , 29 to 89 years ; 1st quantile , 58 years ; 3rd quantile , 71.75 years ) . the majority of patients ( n=472 ) underwent one esd ; 17 patients underwent two esds ( 10 patients underwent simultaneous esd , while seven patients underwent esds at different times ) , and one patient underwent three esds ( two esds at the same time ) . the disease codes noted when patients underwent esd were as follows : c16 ( malignant neoplasm of stomach ) , 213 patients ( 43.5% ) ; non - c16 , 277 patients ( 56.5% ) ; d00.2 ( carcinoma in situ of stomach ) , 17 patients ; d13.1 ( benign neoplasm of stomach ) , 226 patients ; d13.9 ( benign neoplasm of ill - defined site within the digestive system ) , one patient ; and other , 33 patients . disease codes changed after the esd in 10.5% of the non - c16 patients ( 29/277 ) : d00.2 to c16 , seven patients ; d13.1 to d00.2 , three patients ; d13.1 to c16 , 18 patients ; and d13.9 to c16 , one patient ( table 6 ) . twenty - one patients ( 21/490 , 4.3% ) underwent gastrectomy following esd , and all of these patients underwent esd for only once . fifteen patients received surgery at the same medical institution where esd was performed , and six patients received surgery at different medical institutions . the mean time between esd and surgery was 44 days . for further analysis , 472 patients who underwent esd for only once were selected ( table 7 ) ( c16 , 202 patients ; d00.2 , 17 patients ; d13.1 , 220 patients ; d13.9 , one patient ; other , 32 patients ) . in total , 70.0% of these pathologic examinations ( 329/472 ) were requested for histologic mapping ( c5508 ) . ihc studies were performed in 22.5% of esds ( 106/472 ) . approximately one - third of the gastric cancer specimens ( 66/202 , 32.7% ) and 15.0% of the gastric benign neoplasm specimens ( 33/220 ) were subject to ihc studies . in the year 2013 , 163,372 pathologic examinations were performed in 103,528 patients ( 45,897 men and 57,631 women ) . the mean and median ages of the patients were 51.8 and 53 years , respectively . the pathologic examination data and medical institutions according to administrative district are summarized in table 2 . the total numbers of medical institutions according to administrative district are summarized in appendix 1 . in total , 43.5% of the tertiary hospitals ( 10/23 ) , 15.6% of the general hospitals ( 48/307 ) , and 23.8% of the other institutions ( 12,090/50,868 ) were located in seoul . in addition , 32.9% of the surgical pathologic examinations ( 53,711/163,372 ) were requested in medical institutions located in seoul . almost all medical and dental departments requested pathologic examinations ( table 3 ) . internal medicine ( 74,232 , 45.4% ) , general surgery ( 34,808 , 21.3% ) , obstetrics and gynecology ( 19,382 , 11.9% ) , and urology ( 9,951 , 6.1% ) were the most common medical departments ( 84.7% ) requesting pathology examinations . a small subset ( 38/17,892 , 0.2% ) of immunohistochemical ( ihc ) stains were not interpreted by qualified doctors ( not claimed as  c5575006  ) ( data not shown ) . claims for acetylcholinesterase ( c5564 ) and chloroacetate esterase ( c5565 ) examinations were not found in our data . among pathologic examination - associated claims , 162,002 examinations ( 99.2% ) had proper claim codes ( examination codes 09 and sub - code 01 ( performed in their own institutions ) or 02 ( performed in outside institutions ) . among pathologic examinations , 65.8% were performed in tertiary or general hospitals ( 39,385 and 67,225 cases , respectively ) ( table 4 ) . almost all examinations claimed by tertiary hospitals were performed in their institute ( 39,349/39,385 , 99.9% ) , and 85% of examinations claimed by general hospitals were performed ( 57,163/67,225 ) in their institute . the other medical institutions claimed considerable pathologic examinations performed by outside services ( 52,214/55,392 , 94.3% ) . according to the claims , 76,016 pathologic examinations ( 44.7% ) were performed due to malignancy ( disease code  c  ) or non - malignant tumorous conditions ( disease code  d00-d48  ) ( table 5 ) . pathologic examination of biopsy specimens was performed more frequently in non - tumorous conditions ( 42,661/61,875 , 68.9% ) . in total , 509 esds were performed in 490 patients ( 341 males and 149 females ) in 109 medical institutions . the median age of the patients was 66 years ( age , 29 to 89 years ; 1st quantile , 58 years ; 3rd quantile , 71.75 years ) . the majority of patients ( n=472 ) underwent one esd ; 17 patients underwent two esds ( 10 patients underwent simultaneous esd , while seven patients underwent esds at different times ) , and one patient underwent three esds ( two esds at the same time ) . the disease codes noted when patients underwent esd were as follows : c16 ( malignant neoplasm of stomach ) , 213 patients ( 43.5% ) ; non - c16 , 277 patients ( 56.5% ) ; d00.2 ( carcinoma in situ of stomach ) , 17 patients ; d13.1 ( benign neoplasm of stomach ) , 226 patients ; d13.9 ( benign neoplasm of ill - defined site within the digestive system ) , one patient ; and other , 33 patients . disease codes changed after the esd in 10.5% of the non - c16 patients ( 29/277 ) : d00.2 to c16 , seven patients ; d13.1 to d00.2 , three patients ; d13.1 to c16 , 18 patients ; and d13.9 to c16 , one patient ( table 6 ) . twenty - one patients ( 21/490 , 4.3% ) underwent gastrectomy following esd , and all of these patients underwent esd for only once . fifteen patients received surgery at the same medical institution where esd was performed , and six patients received surgery at different medical institutions . for further analysis , 472 patients who underwent esd for only once were selected ( table 7 ) ( c16 , 202 patients ; d00.2 , 17 patients ; d13.1 , 220 patients ; d13.9 , one patient ; other , 32 patients ) . in total , 70.0% of these pathologic examinations ( 329/472 ) were requested for histologic mapping ( c5508 ) . ihc studies were performed in 22.5% of esds ( 106/472 ) . approximately one - third of the gastric cancer specimens ( 66/202 , 32.7% ) and 15.0% of the gastric benign neoplasm specimens ( 33/220 ) were subject to ihc studies . in this study , we examined nation - wide statistics regarding surgical pathologic examination . considering sampling weight , we estimate that 5,440,288 ( 163,37233.3 ) pathologic examinations were performed in korea in 2013 . we also surveyed pathologic examinations according to administrative district , requesting department , type of medical institutions , and patient conditions . these data will be useful for future planning and allocation of resources in the field of pathology and for the korean society of pathologists . there have been several reports regarding diagnostic discrepancies between endoscopic forceps biopsy and esd , as well as between esd and surgery . recently , two large , single - center , retrospective studies revealed that 22.8% ( 465/2,041 ) and 31.7% ( 587/1,850 ) of cases changed diagnosis after endoscopic resection in asan medical center ( seoul , korea ) and samsung medical center ( seoul , korea ) , respectively . our hira - nps data revealed that only 10.9% of nation - wide cases experienced a change of diagnosis after esd . hira - nps data does not include detailed pathologic diagnosis information such as tumor size , tumor differentiations , dysplastic degrees , etc . shin et al .   reported that complete resection rates were not different according to absolute or expanded esd indications , though their data were not hira data . although hira - nps data was not available for a sufficient number of esd patients ( 509 esds in 490 patients ) to allow for an accurate assessment , and only limited clinicopathological information was available , the problems associated with the relatively few number of patients can be overcome through further research using the raw hira data . histologic mapping of esd specimens is recommended by the gastrointestinal pathology study group of the korean society of pathologists . however , 30.2% ( 143/472 ) of esd specimens were not claimed as  c5508 because precise histologic diagnosis of the esd specimen is essential to treat patients , we suggest that nationwide surveys be conducted in order to assure quality of pathologic examination of esd specimens . ihc staining was performed in 22.5% ( 106/472 ) of esd cases . unlike tissue immunofluorescent microscopic examinations or enzyme histochemistries further analysis using hira raw data will be needed to decrease the statistical errors and bias and to evaluate changes over time . during our analysis , we experienced many challenges ; therefore , we provide advice and guidance for other researchers who would like to analyze the hira database . ( 1 ) it is essential to understand the framework of the hira database . the hira data is intended for insurance claims and not for research . ( 2 ) sample data are not appropriate for analyses requiring long - term follow - up . ( 3 ) some claim codes have sub - codes ( in most cases , additional charges by experts ) . ( 4 ) disease codes and claims are not always accurate . ( 5 ) the analysis system should have at least 32 gb of main memory . ( 6 ) it is helpful to create relatively small data tables to decrease operation time . in the usual setting , r should use only one cpu core during calculation .
background : in korea , medical institutions make claims for insurance reimbursement to the health insurance review and assessment service ( hira ) . thus , hira databases reflect the general medical services that are provided in korea . 
 we conducted two pathology - related studies using a hira national patient sample ( nps ) data ( selection probability , 0.03 ) . 
 first , we evaluated the current status of general pathologic examination in korea . 
 second , we evaluated pathologic issues associated with endoscopic submucosal dissection ( esd).methods : the sample data used in this study was hira-nps-2013-0094.results:in the nps dataset , 163,372 pathologic examinations were performed in 103,528 patients during the year 2013 . considering sampling weight ( 33.3 ) , 
 it is estimated that 5,440,288 ( 163,372  33.3 ) pathologic examinations were performed . internal medicine and general surgery were the most common departments requesting pathologic examinations . 
 the region performing pathologic examinations were different according to type of medical institution . in total , 490 patients underwent esd , and 43.4% ( 213/490 ) underwent esd due to gastric carcinoma . 
 the results of the esd led to a change in disease code for 10.5% ( 29/277 ) of non - gastric carcinoma patients . 
 in addition , 21 patients ( 4.3% ) underwent surgery following the esd . 
 the average period between esd and surgery was 44 days.conclusions:hira sample data provide the nation - wide landscape of specific procedure . 
 however , in order to reduce the statistical error , further studies using entire hira data are needed .