Skip to content

Commit

Permalink
Merge pull request #1272 from mild-blue/improve-austrian-ntb
Browse files Browse the repository at this point in the history
Obohatit cpra endpoint o data ktery byly poslany do kalklatoru
  • Loading branch information
kubantjan authored Jan 19, 2024
2 parents 1a3f4d3 + cfb9801 commit fd6f6fe
Show file tree
Hide file tree
Showing 15 changed files with 896 additions and 24 deletions.
18 changes: 10 additions & 8 deletions local_testing_utilities/notebooks/export_austrian_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
"source": [
"path = \"\"\n",
"donor_blood_group_file = \"\"\n",
"txm_event_name = \"\"\n",
"txm_event_name = \"44-TXM-2024-01\"\n",
"# starting_pattern = \"W-\"\n",
"starting_pattern = \"KPPD_\""
"starting_pattern = \"KPPD_\"\n",
"delimiter=\";\""
]
},
{
Expand All @@ -29,8 +30,9 @@
"metadata": {},
"outputs": [],
"source": [
"donor_blood_groups = (pd.read_csv(os.path.join(path, donor_blood_group_file), delimiter=\";\")\n",
".set_index(\"FamilyID\").BloodType)"
"#historically they were sending us also donor blood groups in a separate file, they no longer do that\n",
"# donor_blood_groups = (pd.read_csv(os.path.join(path, donor_blood_group_file), delimiter=\";\")\n",
"# .set_index(\"FamilyID\").BloodType)"
]
},
{
Expand All @@ -46,7 +48,7 @@
"infos = []\n",
"for i in os.listdir(path):\n",
" if i.startswith(starting_pattern) and i.endswith(\".csv\"):\n",
" df = pd.read_csv(os.path.join(path, i), delimiter=\"\\t\")\n",
" df = pd.read_csv(os.path.join(path, i), delimiter=delimiter)\n",
"\n",
"\n",
" new = df[[\"FamilyID\",\"BloodType\",\"PatientTyping\",\"DonorID\",\"DonorTyping\", \"Gender\", \"DOB\"]].iloc[0]\n",
Expand Down Expand Up @@ -187,9 +189,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python (isletnet)",
"language": "python",
"name": "python3"
"name": "isletnet"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -201,7 +203,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.10.5"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit fd6f6fe

Please sign in to comment.