電子カルテ

Text Blazeで電子カルテの「疑い病名」を自動判定し、一括処理するためのコードを作成しました

はじめに

診療をしていると「疑い」病名の転記は時間がかかる作業です。3連休の時間を利用して電子カルテ(当院はメドレー社のクリニクスを使用しています)の「疑い」病名を一括で転記するプログラムを作成しました。本記事では、Text Blaze を使ってこの作業を完全自動化する方法を、実際に動作確認が取れたコードをもとに、Text Blaze利用者向けに分解解説してみます。


ゴール(この記事でできること)

  • 病名が何個あるか分からなくても安全に処理
  • 各病名の「2列目」をチェック
  • 「疑」という文字が含まれている行だけをクリック
  • 疑い病名が1つでもあれば、最後に一括処理を自動実行

つまり
「疑い病名が1つ以上あるか?」を自動判定して処理を分岐します。


基本方針(設計の考え方)

Text Blaze には次の制約があります。

  • 変数の自己加算(score = score + 1)は不可
  • ループ(repeat)はDOM取得系と相性が悪い(病名の取得、処理をrepeat関数で回して処理することができない)

そこで本記事では、最も安定する設計として次を採用します。

スコア方式(boolean型の疑似スコア)

  • score0 / 1 のフラグとして使う
  • 疑い病名を見つけたら score=1 にする
  • 最後に score=1 かどうかで一括処理を実行(病名の一括転記のボタンが動作します)

これは実質的に
score ≥ 1 なら発動と同じ意味になります。


コード全体(改行なし・完成版)

以下は実運用で動作確認済みのコードです。このままコピペで動作します。電子カルテはクリニクスを使用しています。

{score=0}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(1) > :nth-child(2)}, "ERR") <> "ERR"}{row1={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(1) > :nth-child(2)}}{if: testregex(row1, "疑")}{click: selector=tbody > :nth-child(1) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(2) > :nth-child(2)}, "ERR") <> "ERR"}{row2={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(2) > :nth-child(2)}}{if: testregex(row2, "疑")}{click: selector=tbody > :nth-child(2) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(3) > :nth-child(2)}, "ERR") <> "ERR"}{row3={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(3) > :nth-child(2)}}{if: testregex(row3, "疑")}{click: selector=tbody > :nth-child(3) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(4) > :nth-child(2)}, "ERR") <> "ERR"}{row4={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(4) > :nth-child(2)}}{if: testregex(row4, "疑")}{click: selector=tbody > :nth-child(4) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(5) > :nth-child(2)}, "ERR") <> "ERR"}{row5={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(5) > :nth-child(2)}}{if: testregex(row5, "疑")}{click: selector=tbody > :nth-child(5) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(6) > :nth-child(2)}, "ERR") <> "ERR"}{row6={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(6) > :nth-child(2)}}{if: testregex(row6, "疑")}{click: selector=tbody > :nth-child(6) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(7) > :nth-child(2)}, "ERR") <> "ERR"}{row7={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(7) > :nth-child(2)}}{if: testregex(row7, "疑")}{click: selector=tbody > :nth-child(7) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(8) > :nth-child(2)}, "ERR") <> "ERR"}{row8={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(8) > :nth-child(2)}}{if: testregex(row8, "疑")}{click: selector=tbody > :nth-child(8) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(9) > :nth-child(2)}, "ERR") <> "ERR"}{row9={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(9) > :nth-child(2)}}{if: testregex(row9, "疑")}{click: selector=tbody > :nth-child(9) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(10) > :nth-child(2)}, "ERR") <> "ERR"}{row10={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(10) > :nth-child(2)}}{if: testregex(row10, "疑")}{click: selector=tbody > :nth-child(10) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(11) > :nth-child(2)}, "ERR") <> "ERR"}{row11={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(11) > :nth-child(2)}}{if: testregex(row11, "疑")}{click: selector=tbody > :nth-child(11) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(12) > :nth-child(2)}, "ERR") <> "ERR"}{row12={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(12) > :nth-child(2)}}{if: testregex(row12, "疑")}{click: selector=tbody > :nth-child(12) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(13) > :nth-child(2)}, "ERR") <> "ERR"}{row13={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(13) > :nth-child(2)}}{if: testregex(row13, "疑")}{click: selector=tbody > :nth-child(13) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(14) > :nth-child(2)}, "ERR") <> "ERR"}{row14={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(14) > :nth-child(2)}}{if: testregex(row14, "疑")}{click: selector=tbody > :nth-child(14) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(15) > :nth-child(2)}, "ERR") <> "ERR"}{row15={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(15) > :nth-child(2)}}{if: testregex(row15, "疑")}{click: selector=tbody > :nth-child(15) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(16) > :nth-child(2)}, "ERR") <> "ERR"}{row16={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(16) > :nth-child(2)}}{if: testregex(row16, "疑")}{click: selector=tbody > :nth-child(16) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(17) > :nth-child(2)}, "ERR") <> "ERR"}{row17={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(17) > :nth-child(2)}}{if: testregex(row17, "疑")}{click: selector=tbody > :nth-child(17) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(18) > :nth-child(2)}, "ERR") <> "ERR"}{row18={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(18) > :nth-child(2)}}{if: testregex(row18, "疑")}{click: selector=tbody > :nth-child(18) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(19) > :nth-child(2)}, "ERR") <> "ERR"}{row19={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(19) > :nth-child(2)}}{if: testregex(row19, "疑")}{click: selector=tbody > :nth-child(19) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(20) > :nth-child(2)}, "ERR") <> "ERR"}{row20={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(20) > :nth-child(2)}}{if: testregex(row20, "疑")}{click: selector=tbody > :nth-child(20) .css-kp29zf}{score=1}{endif}{endif}{if: testregex(score, "1")}{click: selector=[data-testid="disease-bulk-edit-button"]}{click: selector=#outcome}{key: downarrow}{key: downarrow}{key: downarrow}{click: selector=#endDate}{endif}

どのように動作するか?

電子カルテ上で下記のような病名になっていることはよくあります。

この状態で今回作成したプログラムを実行するとまず疑い病名のみチェックが入ります

その後自動で転記するためのボタンがクリックされ下記画面が立ち上がります。

この後は転記日を自分で選択し、”更新”ボタンを押すと病名の一括転記ができます。コードの解説をChat GPT 5.2にお願いしてみました。


コード解説(重要ポイント)

① score の初期化

{score=0}
  • ここで 疑い病名が見つかっていない状態を作ります

② 各行の安全な取得(catch の役割)

{if: catch({site: text; selector=tbody > :nth-child(1) > :nth-child(2)}, "ERR") <> "ERR"}
  • 病名が 20個未満でもエラーで止まらないようにする保険
  • 行が存在しない場合は、その行を丸ごとスキップ

③ 病名テキストを変数に格納

{row1={site: text; selector=tbody > :nth-child(1) > :nth-child(2)}}
  • row1n行目・2列目の病名テキストを格納
  • DOM構造変更に強い指定方法

④ 「疑」を含むかどうかを判定

{if: testregex(row1, "疑")}
  • 「疑い」「疑問」「○○疑」など 1文字マッチで十分

⑤ 疑い病名があった場合の処理

{click: selector=tbody > :nth-child(1) .css-kp29zf}
{score=1}
  • 該当行をクリック
  • score を 1 に変更(すでに1でも問題なし)

⑥ 最後に一括処理を実行する条件判定

{if: testregex(score, "1")}
  • score=1 → 疑い病名が1つ以上存在
  • ここで初めて bulk edit を実行
{click: selector=[data-testid="disease-bulk-edit-button"]}
{click: selector=#outcome}
{key: downarrow}{key: downarrow}{key: downarrow}
{click: selector=#endDate}

この設計のメリット

  • 病名数が可変でも壊れない
  • Text Blazeの制約を回避
  • ロジックが直感的で保守しやすい
  • 実診療フローにそのまま組み込める

まとめ

Text Blaze は

「変数の扱い方」と「考え方」

さえ押さえれば、
電子カルテ操作を“ほぼプログラム”として自動化できます。

本記事のコードは、

  • 実運用
  • 保守性
  • 安定性

を重視した完成形です。同じような業務で悩んでいる方の参考になれば幸いです。


補足:すでに「中止」してある「疑い」病名を除外する判定ロジックを追加しました

病名転記を自動化する際に、最も注意すべきポイントのひとつが「すでに中止された病名を、再度処理してしまわないこと」です。つまり下記の病名2の”マイコプラズマ感染症 疑い”というすでに中止済みの病名でも上記のコードでは疑い病名として再転記してしまいます。

今回の補足では、この問題を避けるために「中止」という文字を含む病名を、あらかじめ除外する判定を組み込みました。


なぜ「中止」病名を除外する必要があるのか

電子カルテ上では、病名の状態として

  • 疑い
  • 確定
  • 中止
  • 終了

などが併記されることがあります。

このうち 「中止」 は、

  • 診断が否定された
  • 一時的に立てたが不要と判断された
  • 転記・集計の対象外とすべき

病名です。

にもかかわらず、
文字列として病名が存在するだけで機械的に処理してしまうと

  • すでに無効な病名を再転記する
  • 意図しない一括編集が走る
  • 記録の整合性が崩れる

といったリスクが生じます。


判定の基本方針

今回採用した判定は、非常にシンプルです。

「疑い病名」であっても、
その行に『中止』という文字が含まれていたら処理しない

つまり、

  • 疑い + 中止 → ❌ 対象外
  • 疑い + 中止なし → ✅ 対象

という明確なルールです。


実装上のポイント:判定用データを分ける

判定に使っているのは、病名そのもの(2列目)ではありません

rowN        → 病名(疑い判定用)
rowN_tenki → 転記・状態情報(中止判定用)

と、役割を分けて別変数にしています

これは、

  • 病名の表記ゆれ
  • 状態表示の位置変更
  • 将来の条件追加

に強くするための設計です。


実際の判定ロジック

ロジックは次のようになっています。

testregex(rowN, "疑") 
and not testregex(rowN_tenki, "中止")

意味を日本語で言うと

「病名に『疑』が含まれていて、
かつ、転記情報に『中止』が含まれていない場合のみ処理する」


「not testregex」を使う理由

単純に

testregex(rowN_tenki, "中止") = false

と書かず、
not testregex(...) を使っている理由は、

  • 空文字(データなし)でも安全に true/false を返す
  • catch(...,"") と組み合わせやすい
  • 条件式として読みやすい

という実務上のメリットがあるためです。


この設計のメリット

① 誤転記を防げる

  • 中止病名が一切クリック対象にならない

② 人の判断に近い

  • 医師が画面を見て判断するロジックを再現している

③ 将来の拡張が容易

たとえば今後、

not testregex(rowN_tenki, "中止|終了|削除")

のように拡張することも簡単です。


まとめ

最終的なコードは下記になります。

{score=0}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(1) > :nth-child(2)}, "ERR") <> "ERR"}{row1={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(1) > :nth-child(2)}}{row1_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(1) > :nth-child(5)}, "")}}{if: testregex(row1, "疑") and not testregex(row1_tenki, "中止")}{click: selector=tbody > :nth-child(1) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(2) > :nth-child(2)}, "ERR") <> "ERR"}{row2={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(2) > :nth-child(2)}}{row2_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(2) > :nth-child(5)}, "")}}{if: testregex(row2, "疑") and not testregex(row2_tenki, "中止")}{click: selector=tbody > :nth-child(2) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(3) > :nth-child(2)}, "ERR") <> "ERR"}{row3={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(3) > :nth-child(2)}}{row3_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(3) > :nth-child(5)}, "")}}{if: testregex(row3, "疑") and not testregex(row3_tenki, "中止")}{click: selector=tbody > :nth-child(3) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(4) > :nth-child(2)}, "ERR") <> "ERR"}{row4={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(4) > :nth-child(2)}}{row4_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(4) > :nth-child(5)}, "")}}{if: testregex(row4, "疑") and not testregex(row4_tenki, "中止")}{click: selector=tbody > :nth-child(4) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(5) > :nth-child(2)}, "ERR") <> "ERR"}{row5={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(5) > :nth-child(2)}}{row5_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(5) > :nth-child(5)}, "")}}{if: testregex(row5, "疑") and not testregex(row5_tenki, "中止")}{click: selector=tbody > :nth-child(5) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(6) > :nth-child(2)}, "ERR") <> "ERR"}{row6={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(6) > :nth-child(2)}}{row6_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(6) > :nth-child(5)}, "")}}{if: testregex(row6, "疑") and not testregex(row6_tenki, "中止")}{click: selector=tbody > :nth-child(6) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(7) > :nth-child(2)}, "ERR") <> "ERR"}{row7={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(7) > :nth-child(2)}}{row7_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(7) > :nth-child(5)}, "")}}{if: testregex(row7, "疑") and not testregex(row7_tenki, "中止")}{click: selector=tbody > :nth-child(7) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(8) > :nth-child(2)}, "ERR") <> "ERR"}{row8={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(8) > :nth-child(2)}}{row8_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(8) > :nth-child(5)}, "")}}{if: testregex(row8, "疑") and not testregex(row8_tenki, "中止")}{click: selector=tbody > :nth-child(8) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(9) > :nth-child(2)}, "ERR") <> "ERR"}{row9={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(9) > :nth-child(2)}}{row9_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(9) > :nth-child(5)}, "")}}{if: testregex(row9, "疑") and not testregex(row9_tenki, "中止")}{click: selector=tbody > :nth-child(9) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(10) > :nth-child(2)}, "ERR") <> "ERR"}{row10={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(10) > :nth-child(2)}}{row10_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(10) > :nth-child(5)}, "")}}{if: testregex(row10, "疑") and not testregex(row10_tenki, "中止")}{click: selector=tbody > :nth-child(10) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(11) > :nth-child(2)}, "ERR") <> "ERR"}{row11={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(11) > :nth-child(2)}}{row11_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(11) > :nth-child(5)}, "")}}{if: testregex(row11, "疑") and not testregex(row11_tenki, "中止")}{click: selector=tbody > :nth-child(11) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(12) > :nth-child(2)}, "ERR") <> "ERR"}{row12={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(12) > :nth-child(2)}}{row12_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(12) > :nth-child(5)}, "")}}{if: testregex(row12, "疑") and not testregex(row12_tenki, "中止")}{click: selector=tbody > :nth-child(12) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(13) > :nth-child(2)}, "ERR") <> "ERR"}{row13={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(13) > :nth-child(2)}}{row13_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(13) > :nth-child(5)}, "")}}{if: testregex(row13, "疑") and not testregex(row13_tenki, "中止")}{click: selector=tbody > :nth-child(13) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(14) > :nth-child(2)}, "ERR") <> "ERR"}{row14={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(14) > :nth-child(2)}}{row14_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(14) > :nth-child(5)}, "")}}{if: testregex(row14, "疑") and not testregex(row14_tenki, "中止")}{click: selector=tbody > :nth-child(14) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(15) > :nth-child(2)}, "ERR") <> "ERR"}{row15={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(15) > :nth-child(2)}}{row15_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(15) > :nth-child(5)}, "")}}{if: testregex(row15, "疑") and not testregex(row15_tenki, "中止")}{click: selector=tbody > :nth-child(15) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(16) > :nth-child(2)}, "ERR") <> "ERR"}{row16={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(16) > :nth-child(2)}}{row16_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(16) > :nth-child(5)}, "")}}{if: testregex(row16, "疑") and not testregex(row16_tenki, "中止")}{click: selector=tbody > :nth-child(16) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(17) > :nth-child(2)}, "ERR") <> "ERR"}{row17={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(17) > :nth-child(2)}}{row17_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(17) > :nth-child(5)}, "")}}{if: testregex(row17, "疑") and not testregex(row17_tenki, "中止")}{click: selector=tbody > :nth-child(17) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(18) > :nth-child(2)}, "ERR") <> "ERR"}{row18={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(18) > :nth-child(2)}}{row18_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(18) > :nth-child(5)}, "")}}{if: testregex(row18, "疑") and not testregex(row18_tenki, "中止")}{click: selector=tbody > :nth-child(18) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(19) > :nth-child(2)}, "ERR") <> "ERR"}{row19={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(19) > :nth-child(2)}}{row19_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(19) > :nth-child(5)}, "")}}{if: testregex(row19, "疑") and not testregex(row19_tenki, "中止")}{click: selector=tbody > :nth-child(19) .css-kp29zf}{score=1}{endif}{endif}{if: catch({site: text; page=https://karte.medley.life/*; select=ifneeded; selector=tbody > :nth-child(20) > :nth-child(2)}, "ERR") <> "ERR"}{row20={site: text; page=https://karte.medley.life/*; selector=tbody > :nth-child(20) > :nth-child(2)}}{row20_tenki={=catch({site: text; page=https://karte.medley.life/*; selector=.css-1f7ju3d tbody > :nth-child(20) > :nth-child(5)}, "")}}{if: testregex(row20, "疑") and not testregex(row20_tenki, "中止")}{click: selector=tbody > :nth-child(20) .css-kp29zf}{score=1}{endif}{endif}
{if: testregex(score, "1")}{click: selector=[data-testid="disease-bulk-edit-button"]}{click: selector=#outcome}{key: downarrow}{key: downarrow}{key: downarrow}{click: selector=#endDate}{endif}

関連記事

コメント

この記事へのコメントはありません。