{"id":21840318,"url":"https://github.com/shiro46mt/jp-medicine-master","last_synced_at":"2025-10-08T08:31:25.470Z","repository":{"id":260727290,"uuid":"881891645","full_name":"shiro46mt/jp-medicine-master","owner":"shiro46mt","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-08T04:47:30.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T05:26:40.077Z","etag":null,"topics":["python-package"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiro46mt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T12:58:53.000Z","updated_at":"2025-01-08T04:47:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"63e9eff3-9805-4bf6-a06a-69c67125234d","html_url":"https://github.com/shiro46mt/jp-medicine-master","commit_stats":null,"previous_names":["shiro46mt/jp-medicine-master"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiro46mt%2Fjp-medicine-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiro46mt%2Fjp-medicine-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiro46mt%2Fjp-medicine-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiro46mt%2Fjp-medicine-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiro46mt","download_url":"https://codeload.github.com/shiro46mt/jp-medicine-master/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235694194,"owners_count":19030772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-package"],"created_at":"2024-11-27T21:25:37.708Z","updated_at":"2025-10-08T08:31:25.464Z","avatar_url":"https://github.com/shiro46mt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pytest](https://github.com/shiro46mt/jp-medicine-master/actions/workflows/pytest.yml/badge.svg)](https://github.com/shiro46mt/jp-medicine-master/actions/workflows/pytest.yml)\n![GitHub License](https://img.shields.io/github/license/shiro46mt/jp-medicine-master)\n[![PyPI - Version](https://img.shields.io/pypi/v/jp-medicine-master)](https://pypi.org/project/jp-medicine-master/)\n[![PyPI Downloads](https://static.pepy.tech/badge/jp-medicine-master)](https://pepy.tech/projects/jp-medicine-master)\n\n# jp-medicine-master\n日本で使用される医薬品マスターを簡単に取得・利用するためのライブラリ\n\n## 利用可能な医薬品マスター\n- **レセプト電算処理システム 医薬品マスター** : 2012年度薬価改定～\n\n- **薬価基準収載医薬品** : 2014年度薬価改定～\n- **後発医薬品に関する情報** : 2014年度薬価改定～\n\n- **HOTコードマスター（HOT13 / HOT9）** : 2001年～\n\n# インストール方法\n```\npip install jp-medicine-master\n```\n\n# 使用方法\n```python\nimport jp_medicine_master as jpmed\n```\n\n## マスター読み込み\n医薬品マスターをpandasのDataFrameとして読み込みます。引数の仕様は共通です。\n\n```python\n# レセプト電算処理システム 医薬品マスター\n### 引数`date`を指定した場合は、指定日の時点のマスターを取得します。\ndf = jpmed.read_y(date='20161231')\n\n# 薬価基準収載医薬品\n### 引数`year`を指定した場合は、指定年度の末日の時点のマスターを取得します。\ndf = jpmed.read_price(year='2016')  # 2017年3月31日時点。\n\n# 後発医薬品に関する情報\n### 引数`kaitei`を指定した場合は、指定年度の薬価改定の有効期間の末日の時点のマスターを取得します。※HOTコードマスターは非対応。\ndf = jpmed.read_ge(kaitei='2016')  # 2018年3月31日時点。\ndf = jpmed.read_ge(kaitei='2018')  # 2019年9月30日時点。※2019年10月に消費税増税に伴う薬価改定があったため。\n\n# HOTコードマスター（HOT13 / HOT9）\n### 引数を指定しない場合は、現時点での最新マスターを取得します。\ndf = jpmed.read_hot13()\ndf = jpmed.read_hot9()\n```\n\n## マスターの応用例\n1つ以上の医薬品マスターを加工する使用例を実装しています。引数の仕様はマスター読み込みと同様です。\n\n```python\n# レセプト電算処理システム 医薬品マスターを取得します。\n# read_y() との違いとして、年度途中で経過措置期限切れとなった医薬品の情報を含みます。※引数はyearのみ対応。\ndf = jpmed.get_y_all(year='2016')\n\n# レセプト電算処理システム 医薬品マスターに、HOTコードマスターを突合してYJコードを付与します。\ndf = jpmed.get_y_with_yj()\n\n# レセプト電算処理システム 医薬品マスターに、バイオシミラーに関する情報（BS区分、BS成分名）を付与して該当医薬品のみを抽出します。\n# BSに関する情報は後発医薬品に関する情報から加工しています。\ndf = jpmed.get_biosimilar()\n```\n\n# データソース\n[jp-medicine-master-data](https://github.com/shiro46mt/jp-medicine-master-data)を参照。\n\n# License\nThis software is released under the MIT License, see LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiro46mt%2Fjp-medicine-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiro46mt%2Fjp-medicine-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiro46mt%2Fjp-medicine-master/lists"}