update master icd
This commit is contained in:
@@ -13,27 +13,25 @@ class IcdService
|
||||
{
|
||||
protected function validateDiagnosisExclusionRow($row)
|
||||
{
|
||||
if (empty($row['code'])) {
|
||||
throw new ImportRowException(__('code.REQUIRED'), 0, null, $row);
|
||||
}
|
||||
if (empty($row['description_en'])) {
|
||||
throw new ImportRowException(__('name.REQUIRED'), 0, null, $row);
|
||||
if (empty($row['ICD_Code'])) {
|
||||
throw new ImportRowException(__('ICD_Code is REQUIRED'), 0, null, $row);
|
||||
}
|
||||
}
|
||||
|
||||
public function handleIcdRow($row)
|
||||
public function handleIcdRow($row, $id)
|
||||
{
|
||||
try {
|
||||
$this->validateDiagnosisExclusionRow($row);
|
||||
$icd = Icd::updateOrCreate([
|
||||
'code' => $row['code']
|
||||
'code' => $row['ICD_Code']
|
||||
], [
|
||||
"code" => $row['code'],
|
||||
"parent_code" => $row['parent_code'] ?? null,
|
||||
"rev" => $row['reff_exc'],
|
||||
"name" => $row['description_en'],
|
||||
"version" => $row["version"] ?? null,
|
||||
"active" => $row["active"] ?? 0
|
||||
"code" => $row['ICD_Code'],
|
||||
"parent_code" => null,
|
||||
"rev" => '',
|
||||
"name" => $row['Description'] ?? null,
|
||||
"version" => null,
|
||||
"active" => 1,
|
||||
"icd_template_id" => $id,
|
||||
]);
|
||||
|
||||
return true;
|
||||
@@ -43,13 +41,13 @@ class IcdService
|
||||
}
|
||||
|
||||
public $listing_doc_headers = [
|
||||
"Rev",
|
||||
"Version",
|
||||
// "Rev",
|
||||
// "Version",
|
||||
"Code",
|
||||
"Parent Code",
|
||||
"Name",
|
||||
// "Parent Code",
|
||||
// "Name",
|
||||
"Description",
|
||||
"Status",
|
||||
"Type"
|
||||
// "Status",
|
||||
// "Type"
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user