eCTDv4のXMLメッセージのDocument要素部分の作成v

173 Views

March 26, 24

スライド概要

[第9回大阪SAS勉強会] 関根 暁史

profile-image

SAS言語を中心として,解析業務担当者・プログラマなのコミュニティを活性化したいです

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

大阪 SAS勉強会 2024 eCTDv4のXMLメッセージの Document要素部分の作成 関根 暁史 (藤本製薬株式会社) The document element is used for the purposes of transmitting the information about each document related to an application. Satoshi Sekine Fujimoto Pharmaceutical Corp.

2.

大阪 SAS勉強会 2024 UUID(汎用一意識別子) ➢ eCTD v4では、提出される様々な情報がそれぞれ一意のID (=UUID) をもっており、 それらがデータベースに登録されマスタ化される 「eCTD v4.0運用開始に伴う情報提供(PMDA)より」 ➢ UUIDは、8-4-4-4-12形式の文字列(32桁の英数字と4つのハイフンを含むテキスト 値)で記述した16進数のテキストである。UUIDは、ISO/IEC 11578:1996およびITUT Rec X.667 | ISO/IEC 9834-8:2005によって正式に定義されている。UUIDの表 記を以下に示す: • ハイフンで区切られた一連の文字列:25635f23-a3a4-4ce0-9994-99c5f074960 「ICH IG 4.5.2章」 ➢ UUIDにはバージョン1~5まである。 「Wikipediaより」 2

3.

大阪 SAS勉強会 2024 「Q&A v1.6」より # 質問 回答 7 UUIDのバージョンについて、 ICHバリデーションルールはある か? ICH実装ガイドはバリデーションルールを 含んでおり、UUIDの衝突は却下の対象と なる。ICH地域において、UUIDのバージョ ンはチェックされていない。 本発表では、ファイル 名から取得できる UUIDバージョン5を採 用するものとする。 3

4.

大阪 SAS勉強会 2024 構成管理表の準備 Current C:\20240322001\1 C:\20240322001\1 C:\20240322001\1 C:\20240322001\1 Title ADSL define.xml define2-0-0.xsl ADRG Href m5/datasets/study m5/datasets/study m5/datasets/study m5/datasets/study id/analysis/adam/datasets/adsl. id/analysis/adam/datasets/defin id/analysis/adam/datasets/defin id/analysis/adam/datasets/adrg 「Structure1.xlsx」 この情報をSASで読み込ん でXMLを作成する。 UUIDを生成する関数は SASにはないので、Python の力を借りる。 4

5.

大阪 SAS勉強会 2024 UUIDの発生 このファイル名を元にUUID を発生させる。 20240322001/1/m5/datasets/study id/analysis/adam/datasets/adsl.xpt eCTD受付番号 提出連続番号 5

6.

大阪 SAS勉強会 2024 UUIDの発生プログラム このファイル名を元にUUID proc fcmp outlib=work.fcmp2.pyfuncs; を発生させる。 function MyFunc2(arg0 $) $200; length Result $200; declare object py(python); submit into py; def PyProduct(infile): """Output: MyKey""" import uuid id=str(uuid.uuid5(uuid.NAMESPACE_DNS,infile)) return id endsubmit; rc=py.publish(); rc=py.call('PyProduct',arg0); Result=py.results['MyKey']; return(Result); endfunc; run; 6

7.

大阪 SAS勉強会 2024 別途チェックサムを獲得 C:/20240322001/1/m5/datasets/study id/analysis/adam/datasets/adsl.xpt 実在のファイルからチェック サム値を獲得してくる。 7

8.

大阪 SAS勉強会 2024 Document要素のイメージ(submissionunit.xml) <component> <document> UUID <id root="18f98b3a-ac10-5076-8f45-ae4e9af376df"> <title value="ADSL"> ハイパーリンク <text integrityCheckAlgorithm="SHA256"> <reference value="m5/datasets/study id/analysis/adam/datasets/adsl.xpt"> <integrityCheck>0fa3b0b9634e7b97bb76ad5db3c5684056eecb5ec4d1964d8e8d5a1 d0e0735ee</integrityCheck> </text> チェッ クサム </documet> </component> 8

9.

大阪 SAS勉強会 2024 プログラム(1/4) /* 構成管理表があるフォルダー指定 */ %let _inpath=.; proc delete data=_all_; run; /* エクセルシートの読み込み */ proc import out=doc datafile="&_inpath.\Structure1.xlsx" dbms=EXCELcs replace; sheet="Leaf"; scantext=yes; usedate=yes; scantime=yes; run; data sha; set doc; length sha $1000; current=tranwrd(current,"\","/"); sha=strip(current)||"/"||strip(href); rev1=kreverse(scan(kreverse(current),1,"/")); rev2=kreverse(scan(kreverse(current),2,"/")); rev=strip(rev2)||"/"||strip(rev1)||"/"||strip(href); call symputx("current",current); run; 構成管理表 (Structure1.xlsx)から 情報を読み込む。 9

10.

大阪 SAS勉強会 2024 プログラム(2/4) proc fcmp outlib=work.fcmp1.pyfuncs; function MyFunc1(arg0 $) $200; length Result $200; declare object py(python); submit into py; def PyProduct(infile): """Output: MyKey""" import hashlib with open(infile,'rb') as f: id=hashlib.sha256(f.read()).hexdigest() return id endsubmit; rc=py.publish(); rc=py.call('PyProduct',arg0); Result=py.results['MyKey']; return(Result); endfunc; run; SHA256アルゴリズムで チェックサム値を獲得。 10

11.

大阪 SAS勉強会 2024 プログラム(3/4) proc fcmp outlib=work.fcmp2.pyfuncs; function MyFunc2(arg0 $) $200; length Result $200; declare object py(python); submit into py; def PyProduct(infile): """Output: MyKey""" import uuid id=str(uuid.uuid5(uuid.NAMESPACE_DNS,infile)) return id endsubmit; rc=py.publish(); rc=py.call('PyProduct',arg0); Result=py.results['MyKey']; return(Result); endfunc; run; options cmplib=work.fcmp1; data checksum; set sha; checksum=MyFunc1(unicodec(sha,'utf8')); run; options cmplib=work.fcmp2; data uuid; set checksum; uuid=MyFunc2(unicodec(rev,'utf8')); run; UUIDバージョン5の発生。 11

12.
[beta]
大阪
SAS勉強会

2024

プログラム(4/4)
data leaf;
set uuid;
Document要素の作成。
length text $1000;
text='<component>';output;
text='
<document>';output;
text='
<id root="'||strip(uuid)||'">';output;
text='
<title value="'||strip(title)||'">';output;
text='
<text integrityCheckAlgorithm="SHA256">';output;
text='
<reference value="'||strip(href)||'">';output;
text='
<integrityCheck>'||strip(checksum)||'</integrityCheck>';output;
text='
</text>';output;
text='
</documet>';output;
text='</component>';output;
run;
/* XMLメッセージ作成 */
filename def "&current.\submissionunit.xml" encoding="utf8" nobom;
data _null_;
set leaf;
if text^="";
file def;
put +(kverify(text," ")-1 ) text;
XMLファイル出力。
run;

12

13.

大阪 SAS勉強会 2024 ご清聴有難うございました 13