Closed yijutseng closed 5 years ago
E538/E53.8 把icd convert function重寫後解決了 commit 2700c03c014219cf542b1b96ac7bd456da1dce08 模糊比較....討論暫不更新
新版出現以下警告訊息
warning ICD: 659.71
warning ICD: 648.91
warning ICD: 654.21
warning ICD: 660.11
warning ICD: 660.01
warning ICD: 652.21
warning ICD: 645.11
warning ICD: 659.13
warning ICD: 669.71
warning ICD: 648.81
warning ICD: 664.11
warning ICD: 660.61
warning ICD: 654.23
warning ICD: 642.51
warning ICD: 651.01
warning ICD: 663.31
warning ICD: 664.01
warning ICD: 656.51
warning ICD: 641.01
warning ICD: 652.51
warning ICD: V22.1
warning ICD: V22.2
warning ICD: 669.70
warning ICD: 661.11
warning ICD: 647.61
warning ICD: 646.81
warning ICD: 653.51
warning ICD: 669.51
warning ICD: 660.41
warning ICD: 656.41
warning ICD: 642.31
warning ICD: 656.61
warning ICD: 644.21
warning ICD: 661.01
warning ICD: 642.93
warning ICD: 642.41
warning ICD: 651.03
warning ICD: 652.13
warning ICD: 762.9
warning ICD: 645.13
warning ICD: 659.61
warning ICD: 654.53
warning ICD: V27.0
warning ICD: 642.71
warning ICD: 661.21
warning ICD: 648.92
warning ICD: 642.91
warning ICD: 659.81
warning ICD: 655.81
warning ICD: 664.21
warning ICD: 646.83
warning ICD: 659.50
warning ICD: 654.20
warning ICD: 649.31
warning ICD: 660.31
warning ICD: 659.51
warning ICD: 624.1
warning ICD: 661.31
warning ICD: 653.81
warning ICD: 656.70
warning ICD: 663.11
warning ICD: 652.23
warning ICD: 641.21
warning ICD: V23.9
warning ICD: V22.0
warning ICD: 648.01
warning ICD: 401.9
warning ICD: 664.41
warning ICD: 653.11
warning ICD: 653.41
warning ICD: V23.49
warning ICD: 642.01
warning ICD: 652.61
warning ICD: 663.21
warning ICD: 658.11
warning ICD: 655.11
warning ICD: 642.33
warning ICD: 641.11
warning ICD: 658.01
warning ICD: 652.20
warning ICD: 653.00
warning ICD: 645.10
warning ICD: 663.51
warning ICD: 648.8
warning ICD: 642.50
warning ICD: 662.21
warning ICD: 669.81
warning ICD: 658.41
warning ICD: V25.2
warning ICD: 622.10
warning ICD: 654.91
warning ICD: 656.31
warning ICD: 665.41
warning ICD: 659.11
warning ICD: 662.10
warning ICD: 669.50
warning ICD: V23.89
warning ICD: 656.53
warning ICD: 662.11
warning ICD: 674.82
warning ICD: V31.01
warning ICD: 652.41
warning ICD: 655.71
warning ICD: 654.11
warning ICD: 644.03
warning ICD: 642.21
warning ICD: V24.2
warning ICD: 644.13
warning ICD: 656.33
warning ICD: 653.43
warning ICD: 642.02
warning ICD: 653.31
warning ICD: 660.91
warning ICD: 666.14
warning ICD: 664.10
warning ICD: 666.02
warning ICD: 652.81
warning ICD: 655.83
warning ICD: 665.51
warning ICD: 648.62
warning ICD: 669.61
warning ICD: V23.0
warning ICD: 642.53
warning ICD: 660.60
warning ICD: 661.13
warning ICD: 429.2
warning ICD: 661.10
warning ICD: 656.71
warning ICD: 652.91
warning ICD: 656.11
warning ICD: 664.81
warning ICD: 278.01
warning ICD: 656.81
warning ICD: 216.9
warning ICD: 664.31
warning ICD: 642.61
warning ICD: 648.03
warning ICD: V30.01
warning ICD: 647.81
warning ICD: 648.11
warning ICD: 657.01
warning ICD: 649.33
warning ICD: 654.51
warning ICD: 657.03
warning ICD: 648.21
warning ICD: 646.51
warning ICD: V23.81
warning ICD: V23.7
warning ICD: 648.00
warning ICD: 656.21
warning ICD: V27.1
warning ICD: 642.13
warning ICD: V59.09
warning ICD: 789.00
warning ICD: 659.21
warning ICD: 658.21
warning ICD: 649.01
warning ICD: 667.12
warning ICD: 659.91
warning ICD: 648.41
warning ICD: 648.51
warning ICD: 667.02
warning ICD: 666.12
warning ICD: 658.91
warning ICD: 641.91
warning ICD: 652.71
warning ICD: 654.81
warning ICD: 660.71
warning ICD: 659.41
warning ICD: 669.5
warning ICD: 647.91
warning ICD: 763.82
warning ICD: 659.70
warning ICD: 652.53
warning ICD: 642.43
warning ICD: 669.22
warning ICD: 652.31
warning ICD: 659.10
warning ICD: 658.03
warning ICD: 645.21
warning ICD: 646.61
warning ICD: 626.2
warning ICD: 660.90
warning ICD: 663.81
warning ICD: 646.91
warning ICD: 658.13
warning ICD: 761.2
warning ICD: 662.01
warning ICD: 651.00
warning ICD: V23.3
warning ICD: 648.83
warning ICD: 661.00
warning ICD: 658.10
warning ICD: 763.0
warning ICD: V28.3
warning ICD: 669.41
warning ICD: 763.84
warning ICD: V24.1
warning ICD: V70.0
warning ICD: 653.40
warning ICD: 667.10
warning ICD: 663.01
warning ICD: 518.4
warning ICD: 659.73
warning ICD: 663.2
warning ICD: 656.10
warning ICD: 652.1
warning ICD: 656.93
warning ICD: 665.81
warning ICD: 744.83
warning ICD: 648.93
warning ICD: 665.61
warning ICD: 648.61
warning ICD: 642.23
warning ICD: 289.9
warning ICD: 656.30
warning ICD: 660.63
warning ICD: 642.03
warning ICD: 652.01
warning ICD: 762.1
warning ICD: 626.0
warning ICD: 648.71
warning ICD: 660.40
warning ICD: 620.8
warning ICD: 796.5
warning ICD: 763.3
warning ICD: 662.20
warning ICD: 633.01
warning ICD: 766.1
warning ICD: 661.03
warning ICD: V50.2
warning ICD: 654.41
warning ICD: 663.40
warning ICD: 244.9
warning ICD: 655.73
warning ICD: 763.4
warning ICD: V27.2
warning ICD: 641.93
warning ICD: 649.13
warning ICD: 652.30
warning ICD: 666.22
warning ICD: 646.12
warning ICD: 648.22
warning ICD: 646.62
warning ICD: 663.41
warning ICD: 641.23
warning ICD: 655.91
warning ICD: 285.1
warning ICD: V23.82
warning ICD: 659.1
warning ICD: 646.21
warning ICD: 661.1
warning ICD: 659.63
warning ICD: 649.41
warning ICD: 642.42
warning ICD: 655.70
warning ICD: 652.40
warning ICD: 660.6
warning ICD: 756.79
warning ICD: 656.63
warning ICD: V23.84
warning ICD: 645.23
warning ICD: 661.20
warning ICD: 658.00
warning ICD: 671.31
warning ICD: V27.4
warning ICD: 653.01
warning ICD: 669.40
warning ICD: 660.03
warning ICD: 642.00
warning ICD: V23.2
warning ICD: 659.60
warning ICD: 654.31
warning ICD: 765.28
warning ICD: 592.0
warning ICD: 661.41
warning ICD: 653.53
warning ICD: 641.81
warning ICD: 659.01
warning ICD: 647.21
warning ICD: 649.51
warning ICD: 453.0
warning ICD: 656.83
warning ICD: V23.1
warning ICD: 671.81
warning ICD: 641.20
warning ICD: 661.91
warning ICD: 658.23
warning ICD: 655.51
warning ICD: V72.31
warning ICD: 635.51
warning ICD: 654.61
warning ICD: 660.30
warning ICD: 658.31
warning ICD: 218.0
warning ICD: 564.2
warning ICD: 792.3
warning ICD: 761.7
warning ICD: 626.8
warning ICD: 665.31
warning ICD: 646.11
warning ICD: 672.02
warning ICD: 660.21
warning ICD: 669.21
warning ICD: 644.0
warning ICD: 646.31
warning ICD: V30.2
warning ICD: 652.11
warning ICD: 653.13
warning ICD: 665.11
warning ICD: 674.32
warning ICD: 285.9
warning ICD: V25.42
warning ICD: 651.11
warning ICD: 665.50
warning ICD: 654.01
warning ICD: 635.92
warning ICD: 669.83
warning ICD: 649.11
warning ICD: 768.3
warning ICD: 250.00
warning ICD: 644.2
warning ICD: 664.14
warning ICD: 634.91
warning ICD: 054.10
warning ICD: 652.50
warning ICD: 674.01
warning ICD: 666.04
warning ICD: 642.40
warning ICD: 654.63
warning ICD: 656.80
warning ICD: 676.14
warning ICD: 641.03
warning ICD: 663.13
warning ICD: 644.20
warning ICD: V27.3
warning ICD: 714.0
warning ICD: 765.01
warning ICD: 671.91
warning ICD: 653.61
warning ICD: 565.0
warning ICD: 651.90
warning ICD: 666.00
warning ICD: 648.04
warning ICD: 661.23
warning ICD: 765.26
warning ICD: V02.51
warning ICD: 653.23
warning ICD: 661.40
warning ICD: V24.0
warning ICD: 642.30
warning ICD: 286.3
warning ICD: 658.40
warning ICD: 671.82
warning ICD: V23.41
warning ICD: 764.90
warning ICD: 642.72
warning ICD: 664.61
warning ICD: 664.04
warning ICD: 763.83
warning ICD: 623.8
warning ICD: 789.07
warning ICD: 654.90
warning ICD: 788.41
warning ICD: 658.1
warning ICD: 656.91
warning ICD: V15.2
warning ICD: 112.1
warning ICD: 641.13
warning ICD: 660.10
warning ICD: 661
warning ICD: 003.0
warning ICD: 656.40
warning ICD: 642.90
warning ICD: 654.2
warning ICD: 635.91
warning ICD: 653.91
warning ICD: 642.52
warning ICD: V45.89
warning ICD: 653.80
warning ICD: 669.7
warning ICD: 555.9
warning ICD: 658.81
warning ICD: 493.90
warning ICD: 659.83
warning ICD: 642.04
warning ICD: 647.60
warning ICD: 660.00
warning ICD: 655.23
warning ICD: 799.9
warning ICD: 646.03
warning ICD: 642.92
warning ICD: 654.70
warning ICD:Warning message:
'NA' means the data does not match the format
但是我查了654.70 642.92等code,都有CCS可以對應。
DeliveryCCSDataLong$CCSCate<- groupIcdToCCS(DeliveryCCSDataLong,FinalID, ICD,DateServiceStarted,"2015/10/01")
改好了 commit 616dead9dc065dee353f895c4083e72759fd376c 原因是我之前預設丟進去的資料ICD是short格式 (因為一致轉成short) 但範例資料一開始是Decimal, 最後為了跟原始資料排序一樣"重新join"的時候才會出錯 例如: 642.92 認不到 64292 現在多加新的判斷式, 一併更改了其他function避免遇到一樣的問題~
整理最新的判斷邏輯進說明文件,用投影片化成流程圖來說明比較快
DxDataFile <- data.frame(ID=c("A","A","A"), ICD=c("692.9","V43.3","E53.8"), Date=as.Date(c("2013-03-31","2013-01-29","2016-03-10")), stringsAsFactors = FALSE) groupIcdToCCS (DxDataFile, ID, ICD, Date, "2016-01-01", TRUE)
輸入E538沒問題,但是E53.8會出問題
我的資料中,所有會產生NA的icd https://drive.google.com/file/d/1KuM7l-IaJW8RDqTJ5Wh3IhGJ5BI8NXXy/view 有些ccs清單中沒有的,看看是否能用模糊比較 (有時只是少了後面一碼), 有些是CCS清單中有,如E53.8,但轉換出問題的,要解決