How to create scalar function of SQL Server in order to define nPNA?

The Japanese Society for Dialysis Therapy (JSDT) recommends PCR as an indicator of protein intake. Otherwise K/DOQQI recommends nPNA. If you calculate Kt/V with Daugirdas’ method, you can also define nPNA.

\displaystyle \mathrm{nPNA} = \frac{C_0}{36.3 + 5.48\times\mathrm{Kt/V} + 53.5/\mathrm{Kt/V}} + 0.168 \\  = \frac{\mathrm{preBUN}}{36.3 + 5.48\times\mathrm{Kt/V} + 53.5 / \mathrm{Kt/V}} + 0.168 \cdots(4)

Execute the following procedure.

CREATE FUNCTION Function_nPNA 
(		@preBUN		DEC(4, 1)
	,	@postBUN	DEC(4, 1)
	,	@preWeight	DEC(4, 1)
	,	@postWeight	DEC(4, 1)
	,	@DialysisDuration	int
)
RETURNS DEC(3, 2)
AS
BEGIN
	DECLARE @nPNA	DEC(3, 2)
	SELECT	@nPNA = @preBUN
	/	(36.3 + 5.48 * (dbo.Function_KtV(@preBUN, @postBUN, @preWeight, @postWeight, @DialysisDuration))
	+			53.5 / (dbo.Function_KtV(@preBUN, @postBUN, @preWeight, @postWeight, @DialysisDuration)))
	+	0.168
	RETURN	@nPNA
END

Reference: Simplified nutritional screening tools for patients on maintenance hemodialysis

SQL Serverのスカラー値関数としてnPNAを定義するには

 たんぱく質摂取量の指標として日本透析医学会では PCR を採用しています.一方 K/DOQQI では nPNA を採用しています.Daugirdas の方法で Kt/V を計算すると nPNA も計算できます.

\displaystyle \mathrm{nPNA} = \frac{C_0}{36.3 + 5.48\times\mathrm{Kt/V} + 53.5/\mathrm{Kt/V}} + 0.168 \\  = \frac{\mathrm{preBUN}}{36.3 + 5.48\times\mathrm{Kt/V} + 53.5 / \mathrm{Kt/V}} + 0.168 \cdots(4)

 下記プロシージャを実行して関数を作成します.

CREATE FUNCTION Function_nPNA 
(		@preBUN		DEC(4, 1)
	,	@postBUN	DEC(4, 1)
	,	@preWeight	DEC(4, 1)
	,	@postWeight	DEC(4, 1)
	,	@DialysisDuration	int
)
RETURNS DEC(3, 2)
AS
BEGIN
	DECLARE @nPNA	DEC(3, 2)
	SELECT	@nPNA = @preBUN
	/	(36.3 + 5.48 * (dbo.Function_KtV(@preBUN, @postBUN, @preWeight, @postWeight, @DialysisDuration))
	+			53.5 / (dbo.Function_KtV(@preBUN, @postBUN, @preWeight, @postWeight, @DialysisDuration)))
	+	0.168
	RETURN	@nPNA
END

参照:維持透析患者のための簡易栄養スクリーニングツール

TRIPLE INTEGRALS

Fig6-x

The above results are easily generalized to closed regions in three dimensions. For example, consider a function F(x, y, z) defined in a closed three dimensional region \cal R. Subdivided the region into n subregions of volume \Delta V_k,\ k = 1,\ 2,\ \dots,\ n. Letting  (\xi_k, \eta_k, \zeta_k) be some point in each subregion, we form

\displaystyle \lim\limits_{n\rightarrow\infty}\sum_{k=1}^{n}F(\xi_k, \eta_k, \zeta_k)\Delta V_k\cdots(6)

where the number n of subdivisions approaches infinity in such a way that the largest linear dimension of each subregion approaches zero. If this limit exists we denote it by

\displaystyle \underset{\cal R}{\iiint}F(x, y, z)dV\cdots(7)

called the triple integral of F(x, y, z) over \cal R. The limit dose exist if F(x, y, z) is continuous (or piecewise continuous) in \cal R.

If we construct a grid consisting of planes parallel to the xy, yz and xz planes, the region \cal R is subdivided into subregions which are rectangular parallelepipeds. In such case we can express the triple integral over \cal R given by (7) as an iterated integral of the form

\displaystyle  \int_{x=a}^{b}\int_{y=g_1(x)}^{g_2(x)}\int_{z=f_1(x,y)}^{f_2(x,y)}F(x, y, z)dxdydz = \\  \int_{x=a}^{b} \left [ \int_{y=g_1(x)}^{g_2(x)} \left \{ \int_{z=f_1(x,y)}^{f_2(x,y)} F(x, y, z)dz \right \} dy \right ] dx\cdots(8)

(where the innermost integral is to be evaluated first) or the sum of such integrals. The integration can also be performed in any other order to give an equivalent result.

Extensions to higher dimensions are also possible.

三重積分

Fig6-x

 上述の結果は3次元での閉じた領域に容易に拡張できます.例えば,3次元の閉領域 \cal R において定義される関数 F(x, y, z) について考えてみましょう.その領域を体積 \Delta V_k,\ k = 1,\ 2,\ \dots,\ nn 個の小領域に細分化します.  (\xi_k, \eta_k, \zeta_k) を各々の小領域内のある点とすると,以下を形成します.

\displaystyle \lim\limits_{n\rightarrow\infty}\sum_{k=1}^{n}F(\xi_k, \eta_k, \zeta_k)\Delta V_k\cdots(6)

ここで細分化の個数 n は無限大に増大し,各々の小領域の最大線長はゼロに近づきます.仮にこの極限が存在するなら次のように記述します.

\displaystyle \underset{\cal R}{\iiint}F(x, y, z)dV\cdots(7)

これを \cal R における F(x, y, z)三重積分 と呼びます. F(x, y, z)\cal R において連続または区間的に連続ならその極限は存在します.

 xy, yz および xz 平面に平行な平面でグリッドを形成するなら,領域 \cal R は直方体の小領域に細分化されます.そのような場合,(7) で与えられる \cal R における三重積分を 逐次積分 と表現します.

\displaystyle  \int_{x=a}^{b}\int_{y=g_1(x)}^{g_2(x)}\int_{z=f_1(x,y)}^{f_2(x,y)}F(x, y, z)dxdydz = \\  \int_{x=a}^{b} \left [ \int_{y=g_1(x)}^{g_2(x)} \left \{ \int_{z=f_1(x,y)}^{f_2(x,y)} F(x, y, z)dz \right \} dy \right ] dx\cdots(8)

ここで最内側の積分を最初に評価し,またそのような積分の和として表現します.その積分は同等の結果を与える任意の他の順序で行うことができます.

 より高次への一般化も容易です.

How to define Kt/V, an indicator of the efficiency of dialysis, as scalar function of SQL Server?

In Japan, Shinzato’s fomula for calculating Kt/V, an indicator of efficiency of dialysis, is recommended by JSDT. Since integral equation is used to solve Shinzato’s method, you couldn’t solve algebraically. In K/DOQQI, it is usual to solve Kt/V with Daugirdas’ method. Shinzato has described that Daugirdas’ Kt/V is similar to Shinzato’s Kt/V.

\displaystyle \mathrm{Kt/V} = - LN( R - 0.08 \times t ) + \left[ 4 - \left( 3.5 \times R \right) \right] \times\frac{\mathrm{UF}}{\mathrm{W}}\\  = - LN \left( \frac{\mathrm{postBUN}}{\mathrm{preBUN}} - 0.008 \times t \right) + \left[ 4 - \left( 3.5 \times \frac{\mathrm{postBUN}}{\mathrm{preBUN}} \right) \right] \times \frac{\mathrm{preWeight} - \mathrm{postWeight}}{\mathrm{postWeight}} \cdots(1)
\displaystyle \mathrm{Gw} = \mathrm{G}\cdot\mathrm{Tw} = \mathrm{Kd}\int_{0}^{Td}C_1dt + \mathrm{Kd}\int_{0}^{Td}C_2dt + \mathrm{Kd}\int_{0}^{Td}C_3dt \cdots(2)
\displaystyle \mathrm{Ce} = \mathrm{Cs} Exp\left( - \frac{\mathrm{Kt}}{\mathrm{V}} \right) + \frac{\mathrm{G}}{\mathrm{K}}\left[ 1 - Exp\left( - \frac{\mathrm{Kt}}{\mathrm{V}} \right) \right] \cdots(3)

Execute the procedure as following;

CREATE FUNCTION Function_KtV 
(		@preBUN DEC(4, 1)
	,	@postBUN DEC(4, 1)
	,	@preWeight	DEC(4, 1)
	,	@postWeight DEC(4, 1)
	,	@DialysisDuration	int
)
RETURNS DEC(3,2)
AS
BEGIN
	DECLARE	@KtV DEC(3, 2)
	SELECT	@KtV = - LOG(@postBUN / @preBUN - 0.008 * @DialysisDuration / 60) 
					+ (4 - (3.5 * @postBUN / @preBUN))
					* ((@preWeight - @postWeight) / @postWeight)
	RETURN	@KtV
END
GO

References: JSDT 29 (12): 1511-1516, 1996

Second Generation Logarithmic Estimates of Single-Pool Variable Volume

SQL Serverのスカラー値関数としてKt/Vを定義するには

 透析患者の透析効率を計算するには日本透析医学会の推奨する新里式があります.原著論文を見ると積分方程式を解く必要があり,一般的な数学の知識では歯が立ちません.ここでは Daugirdas による Kt/V をデータベース内で計算する方法を述べます.新里自身も Daugirdas による Kt/V と新里式による Kt/V とはかなり一致していると述べており,ほぼ代用可能ではないかと思われます.(1) が Daugirdas の方法で (2) と (3) を解くと新里式になります.

\displaystyle \mathrm{Kt/V} = - LN( R - 0.008 \times t ) + \left[ 4 - \left( 3.5 \times R \right) \right] \times\frac{\mathrm{UF}}{\mathrm{W}}\\  = - LN \left( \frac{\mathrm{postBUN}}{\mathrm{preBUN}} - 0.008 \times t \right) + \left[ 4 - \left( 3.5 \times \frac{\mathrm{postBUN}}{\mathrm{preBUN}} \right) \right] \times \frac{\mathrm{preWeight} - \mathrm{postWeight}}{\mathrm{postWeight}} \cdots(1)
\displaystyle \mathrm{Gw} = \mathrm{G}\cdot\mathrm{Tw} = \mathrm{Kd}\int_{0}^{Td}C_1dt + \mathrm{Kd}\int_{0}^{Td}C_2dt + \mathrm{Kd}\int_{0}^{Td}C_3dt \cdots(2)
\displaystyle \mathrm{Ce} = \mathrm{Cs} Exp\left( - \frac{\mathrm{Kt}}{\mathrm{V}} \right) + \frac{\mathrm{G}}{\mathrm{K}}\left[ 1 - Exp\left( - \frac{\mathrm{Kt}}{\mathrm{V}} \right) \right] \cdots(3)

 下記プロシージャを実行して関数を作成します.

CREATE FUNCTION Function_KtV 
(		@preBUN DEC(4, 1)
	,	@postBUN DEC(4, 1)
	,	@preWeight	DEC(4, 1)
	,	@postWeight DEC(4, 1)
	,	@DialysisDuration	int
)
RETURNS DEC(3,2)
AS
BEGIN
	DECLARE	@KtV DEC(3, 2)
	SELECT	@KtV = - LOG(@postBUN / @preBUN - 0.008 * @DialysisDuration / 60) 
					+ (4 - (3.5 * @postBUN / @preBUN))
					* ((@preWeight - @postWeight) / @postWeight)
	RETURN	@KtV
END
GO

参照:透析会誌 29 (12): 1511-1516, 1996

Second Generation Logarithmic Estimates of Single-Pool Variable Volume

ITERATED INTEGRALS

Fig. 6-1

If \cal R is such that any lines parallel to the y axis meet the boundary of \cal R in at most two points, then we can write the equation of the curves ACB and ADB bounding \cal R as  y = f_1(x) and  y = f_2(x) respectively, where f_1(x) and f_2(x) are single-valued and continuous in a \le x \le b. In this case we can evaluate the double integral (3) by choosing the regions \Delta \cal R as rectangles formed by constracting a grid of lines parallel to the x and y axes and \Delta A_k as the corresponding areas. Then (3) can be written

\displaystyle \iint_{\cal R} F(x, y)dxdy = \int_{x=a}^{b}\int_{y=f_1(x)}^{f_2(x)}F(x, y)dydx = \int_{x=a}^{b}\left\{\int_{y=f_1(x)}^{f_2(x)}F(x, y)dy\right\}dx\cdots(4)

where the integral in braces is to be evaluated first (keeping x constant) and finally integrating with respect to x from a to b. The result (4) indicates how a double integral can be evaluated by expressing it in terms of two single integrals called iterated integrals.

If \cal R is such that any lines parallel to the x axis meet the boundary of \cal R in at most two points, then the equations of curves CAD and CBD can be written x = g_1(y) and x = g_2(y) respectively and we find similarly

\displaystyle \iint_{\cal R}F(x,y)dxdy = \int_{y=c}^{d}\int_{x=g_1(y)}^{g_2(y)}F(x,y)dxdy = \int_{y=c}^{d}\left\{\int_{x=g_1(y)}^{g_2(y)}F(x,y)dx\right\}dy\cdots(5)

If the double integral exists, (4) and (5) will in general yield the same value. In writing a double integral, either of the forms (4) or (5), whichever is appropriate, may be used. We call one form an interchange of the order of integration with respect to the other form.

In case \cal R is not of the type shown in the above figure, it can generally be subdivided into regions {\cal R}_1,\ {\cal R}_2,\ \dots which are of this type. Then the double integral over \cal R is found by taking the sum of the double integrals over {\cal R}_1,\ {\cal R}_2,\ \dots.

逐次積分

Fig. 6-1

仮に \cal Ry 軸に平行なあらゆる線が,せいぜい2点における \cal R の境界に接するなら, \cal R に接する曲線 ACB および ADB の等式をそれぞれ  y = f_1(x) および  y = f_2(x) と記述できます.ここで f_1(x) および f_2(x)a \le x \le b において単一値で連続です.この場合,二重積分 (3) を評価できます.領域 \Delta \cal Rx 軸及び y 軸に平行な直線でグリッドを形成し, \Delta A_k をそれに対応する面積とする長方形として選択します.ゆえに (3) は次のように記述できます.

\displaystyle \iint_{\cal R} F(x, y)dxdy = \int_{x=a}^{b}\int_{y=f_1(x)}^{f_2(x)}F(x, y)dydx = \int_{x=a}^{b}\left\{\int_{y=f_1(x)}^{f_2(x)}F(x, y)dy\right\}dx\cdots(4)

ここで( x を定数として扱い)括弧内の積分を最初に評価し,最後に x について a から b まで積分します.その結果 (4) は二重積分がどう評価されるかを示しています.それを2つの単独の積分という面で表現すると 逐次積分 と呼びます.

仮に \cal R において,2点で \cal R の境界に接する x 軸に平行ないかなる直線でも曲線 CAD および CBD の式は x = g_1(y) および x = g_2(y) と記述でき,同様に以下のことが分かります.

\displaystyle \iint_{\cal R}F(x,y)dxdy = \int_{y=c}^{d}\int_{x=g_1(y)}^{g_2(y)}F(x,y)dxdy = \int_{y=c}^{d}\left\{\int_{x=g_1(y)}^{g_2(y)}F(x,y)dx\right\}dy\cdots(5)

仮に二重積分が存在するなら (4) および (5) からは一般に同じ値が得られる筈です.二重積分を記述する際, (4) または (5) のいずれの形でも適切な方が用いられます.これを他には 積分順序の交換 とも呼びます.

\cal R が上図で表現した形でない場合は,この形 {\cal R}_1,\ {\cal R}_2,\ \dots に細分化します.ゆえに \cal R の二重積分は {\cal R}_1,\ {\cal R}_2,\ \dots の二重積分の和として見つかります.

How to create scalar function of SQL Server in order to calculate GNRI?

Malnutrition in elder people increases the risk of death. Geriatric Nutrition Risk Index (GNRI) is the tool to detect malnutrition easily in hemodialysis patients, too. The definition is as following;

\displaystyle \mathrm{GNRI} = 14.89\times\mathrm{Albumin (g/dL)} + 41.7\times\frac{\mathrm{Body Weight}}{\mathrm{Ideal Body Weight}}

where ideal body weight is given by multiplying 22 the square of height. But body weight should be replaced with ideal body weight if body weight is greater than ideal body weight. Then the second term is equal to 1.

Table is defined as following procedure. It is based on the survey list of the Japanese Society for Dialysis Therapy in 2013.

CREATE TABLE dbo.T_JSDT(
	ID nchar(8) NOT NULL,
	DATE_Survey date NOT NULL,
	Diabetes nchar(1) NOT NULL,
	Myocardial_Infarction nchar(1) NOT NULL,
	Cerebral_Hemorrhage nchar(1) NOT NULL,
	Cerebral_Infarction nchar(1) NOT NULL,
	Amputation nchar(1) NOT NULL,
	Femoral_Fracture nchar(1) NOT NULL,
	EPS nchar(1) NOT NULL,
	Hypertensive_Agents nchar(1) NOT NULL,
	Smoke nchar(1) NOT NULL,
	Therapy_Mode nchar(10) NOT NULL,
	Combination_PD nchar(1) NOT NULL,
	History_PD nchar(1) NOT NULL,
	Transplantation_COUNT nchar(1) NOT NULL,
	DIalysis_COUNT int NULL,
	Dialysis_Duration int NULL,
	QB int NULL,
	Height decimal(4, 1) NOT NULL,
	preWeight decimal(4, 1) NOT NULL,
	postWeight decimal(4, 1) NULL,
	preBUN decimal(4, 1) NOT NULL,
	postBUN decimal(4, 1) NULL,
	preCre decimal(5, 2) NOT NULL,
	postCre decimal(5, 2) NULL,
	Albumin decimal(3, 1) NOT NULL,
	CRP decimal(4, 2) NOT NULL,
	Ca decimal(3, 1) NOT NULL,
	IP decimal(3, 1) NOT NULL,
	Hemoglobin decimal(3, 1) NOT NULL,
	TIBC decimal(3, 0) NULL,
	Fe decimal(3, 0) NULL,
	Ferritin decimal(5, 1) NULL,
	TCHO decimal(3, 0) NOT NULL,
	HDLC decimal(3, 0) NOT NULL,
	PTH_mode nchar(1) NOT NULL,
	PTH decimal(4, 0) NULL,
	HbA1c decimal(3, 1) NULL,
	GA decimal(3, 1) NULL,
	SBP decimal(3, 0) NOT NULL,
	DBP decimal(3, 0) NOT NULL,
	HR decimal(3, 0) NOT NULL,
	KtV_JSDT decimal(3, 2) NULL,
	nPCR_JSDT decimal(3, 2) NULL,
	[%CRE] decimal(4, 1) NULL,
 CONSTRAINT PK_T_JSDT PRIMARY KEY (ID, DATE_Survey)

We need height, body weight and albumin in the table. Execute following procedure to create function.

CREATE FUNCTION Function_GNRI 
(@Albumin dec(3, 1), @Height dec(4, 1), @Weight dec(4, 1))
RETURNS DEC(5, 2)
AS
BEGIN
	DECLARE @GNRI DEC(5,2)
	SELECT @GNRI = 14.89 * @Albumin + 41.7 * CASE WHEN @Weight > ( 22 * POWER(@Height/100, 2)) THEN ( 22 * POWER(@Height/100, 2)) ELSE @Weight END / ( 22 * POWER(@Height/100, 2))
	RETURN @GNRI
END

Execute following query to calculate GNRI.

WITH	CTE	AS
(SELECT	J.ID		AS ID
	,	J.DATE_Survey	AS DATE_Survey
	,	J.Albumin	AS ALB
	,	J.Height	AS Height
	,	CASE WHEN J.postWeight IS NULL THEN J.preWeight ELSE J.postWeight END	AS Weight
   FROM	dbo.T_JSDT AS J
),	CTE_GNRI AS
(SELECT	CTE.ID		AS ID
	,	CTE.DATE_Survey	AS DATE_Survey
	,	dbo.Function_GNRI(CTE.ALB, CTE.Height, CTE.Weight)	AS GNRI
FROM	CTE)
SELECT	*	FROM	CTE_GNRI;

Reference: Simplified nutritional screening tools for patients on maintenance hemodialysis

SQL Serverのスカラー値関数としてGNRIを定義するには

 高齢者における低栄養は死亡のリスクを高めることが知られています.Geriatric Nutrition Risk Index (GNRI) は低栄養を簡易に検出できるツールです.単に高齢者だけではなく,維持透析患者においても有用です.その定義は以下です.

\displaystyle \mathrm{GNRI} = 14.89\times\mathrm{Albumin (g/dL)} + 41.7\times\frac{\mathrm{Body Weight}}{\mathrm{Ideal Body Weight}}

ここで理想体重 (kg) は身長 (m) の二乗に 22 を乗じて得られます.ただし実体重が理想体重を上回る場合には,実体重を理想体重に置き換えます.つまり第 2 項の分数は 1 に等しくなります.

 データベースのテーブル定義は以下の通りであるとします.日本透析医学会統計調査票の 2013 年版に基いています.

CREATE TABLE dbo.T_JSDT(
	ID nchar(8) NOT NULL,
	DATE_Survey date NOT NULL,
	Diabetes nchar(1) NOT NULL,
	Myocardial_Infarction nchar(1) NOT NULL,
	Cerebral_Hemorrhage nchar(1) NOT NULL,
	Cerebral_Infarction nchar(1) NOT NULL,
	Amputation nchar(1) NOT NULL,
	Femoral_Fracture nchar(1) NOT NULL,
	EPS nchar(1) NOT NULL,
	Hypertensive_Agents nchar(1) NOT NULL,
	Smoke nchar(1) NOT NULL,
	Therapy_Mode nchar(10) NOT NULL,
	Combination_PD nchar(1) NOT NULL,
	History_PD nchar(1) NOT NULL,
	Transplantation_COUNT nchar(1) NOT NULL,
	DIalysis_COUNT int NULL,
	Dialysis_Duration int NULL,
	QB int NULL,
	Height decimal(4, 1) NOT NULL,
	preWeight decimal(4, 1) NOT NULL,
	postWeight decimal(4, 1) NULL,
	preBUN decimal(4, 1) NOT NULL,
	postBUN decimal(4, 1) NULL,
	preCre decimal(5, 2) NOT NULL,
	postCre decimal(5, 2) NULL,
	Albumin decimal(3, 1) NOT NULL,
	CRP decimal(4, 2) NOT NULL,
	Ca decimal(3, 1) NOT NULL,
	IP decimal(3, 1) NOT NULL,
	Hemoglobin decimal(3, 1) NOT NULL,
	TIBC decimal(3, 0) NULL,
	Fe decimal(3, 0) NULL,
	Ferritin decimal(5, 1) NULL,
	TCHO decimal(3, 0) NOT NULL,
	HDLC decimal(3, 0) NOT NULL,
	PTH_mode nchar(1) NOT NULL,
	PTH decimal(4, 0) NULL,
	HbA1c decimal(3, 1) NULL,
	GA decimal(3, 1) NULL,
	SBP decimal(3, 0) NOT NULL,
	DBP decimal(3, 0) NOT NULL,
	HR decimal(3, 0) NOT NULL,
	KtV_JSDT decimal(3, 2) NULL,
	nPCR_JSDT decimal(3, 2) NULL,
	[%CRE] decimal(4, 1) NULL,
 CONSTRAINT PK_T_JSDT PRIMARY KEY (ID, DATE_Survey)

 上記テーブルの中で必要な項目は身長,体重,アルブミン値です.下記プロシージャを実行して関数を作成します.実体重が理想体重を上回る場合には実体重を理想体重に置き換えるという条件は CASE 式の中で評価します.

CREATE FUNCTION Function_GNRI 
(@Albumin dec(3, 1), @Height dec(4, 1), @Weight dec(4, 1))
RETURNS DEC(5, 2)
AS
BEGIN
	DECLARE @GNRI DEC(5,2)
	SELECT @GNRI = 14.89 * @Albumin + 41.7 * CASE WHEN @Weight > ( 22 * POWER(@Height/100, 2)) THEN ( 22 * POWER(@Height/100, 2)) ELSE @Weight END / ( 22 * POWER(@Height/100, 2))
	RETURN @GNRI
END

 下記のクエリを実行して GNRI を求めます.CASE 式の中身は透析後体重が空欄の場合は透析前体重で代用するという意味です.

WITH	CTE	AS
(SELECT	J.ID		AS ID
	,	J.DATE_Survey	AS DATE_Survey
	,	J.Albumin	AS ALB
	,	J.Height	AS Height
	,	CASE WHEN J.postWeight IS NULL THEN J.preWeight ELSE J.postWeight END	AS Weight
   FROM	dbo.T_JSDT AS J
),	CTE_GNRI AS
(SELECT	CTE.ID		AS ID
	,	CTE.DATE_Survey	AS DATE_Survey
	,	dbo.Function_GNRI(CTE.ALB, CTE.Height, CTE.Weight)	AS GNRI
FROM	CTE)
SELECT	*	FROM	CTE_GNRI;

参照:維持透析患者のための簡易栄養スクリーニングツール

DOUBLE INTEGRALS

Fig. 6-1

Let F(x, y) be defined in a closed region \cal R of the xy plane. Subdivided \cal R into n subregions \Delta\cal R of area \Delta A_k,\ k = 1,\ 2,\ \dots,\ n. Let (\xi_k, \eta_k) be some point of \Delta\cal R. Form the sum

\displaystyle \sum_{k=1}^{n}F(\xi_k, \eta_k)\Delta A_k\cdots(1)

Consider

\displaystyle \lim\limits_{n\rightarrow\infty}\sum^{n}_{k=1}F(\xi_k, \eta_k)\Delta A_k\cdots(2)

where the limit is taken so that the number n of subdivisions increases without limit and such that the largest linear dimension of each \Delta \cal R approaches zero. If this limit exists it is denoted by

\displaystyle \iint_{\cal R}F(x, y)dA\cdots(3)

and is called the double integral of F(x, y) over the region \cal R.

It can be proved that the limit dose exist if F(x, y) is continuous (or piecewise continuous) in \cal R.

二重積分

Fig. 6-1

F(x, y)xy 平面の閉領域 \cal R 内に定義します. \cal R を面積が \Delta A_k,\ k = 1,\ 2,\ \dots,\ nn 個の小領域 \Delta\cal R に細分化します. (\xi_k, \eta_k)\Delta\cal R のある点とします.次のように和を形成します.

\displaystyle \sum_{k=1}^{n}F(\xi_k, \eta_k)\Delta A_k\cdots(1)

以下を考えてみましょう.

\displaystyle \lim\limits_{n\rightarrow\infty}\sum^{n}_{k=1}F(\xi_k, \eta_k)\Delta A_k\cdots(2)

ここで極限は細分化された n の数が無限に増大し,またそれぞれの \Delta \cal R の最大長の次元はゼロに近づいていくものとします.このような極限が存在する時,次のように記述します.

\displaystyle \iint_{\cal R}F(x, y)dA\cdots(3)

そしてこれを領域 \cal R における F(x, y)二重積分 と呼びます.

仮に \cal R において F(x, y) が連続,または区間的に連続なら極限は存在すると証明できます.

Multiple, Line and Surface Integrals and Integral Theorems

  • DOUBLE INTEGRALS
  • ITERATED INTEGRALS
  • TRIPLE INTEGRALS
  • TRANSFORMATIONS OF MULTIPLE INTEGRALS
  • LINE INTEGRALS
  • VECTOR NOTATION FOR LINE INTEGRALS
  • EVALUATION OF LINE INTEGRALS
  • PROPERTIES OF LINE INTEGRALS
  • SIMPLE CLOSED CURVES. SIMPLY AND MULTIPLY-CONNECTED REGIONS
  • GREEN’S THEOREM IN THE PLANE
  • CONDITIONS FOR A LINE INTEGRAL TO BE INDEPENDENT OF THE PATH
  • SURFACE INTEGRALS
  • THE DIVERGENCE THEOREM
  • STOKE’S THEOREM

多重積分,線積分と面積分および積分定理

  • 二重積分
  • 逐次積分
  • 三重積分
  • 多重積分の変数変換
  • 線積分
  • 線積分のベクトル表記
  • 線積分の評価/li>
  • 線積分の属性
  • 単純閉曲線.単連結領域および多重連結領域
  • 平面におけるグリーンの定理
  • 線積分が経路独立であるための条件
  • 面積分
  • 発散定理
  • ストークスの定理