hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b36930ba12e291d3cd3c3433bbd662ce404f316b
| 7,582
|
py
|
Python
|
code/generate_mask_weights.py
|
bhuvi3/data590_capstone_project
|
0a0a33b75bb17c8f95ac5c597cb6b465dc4f375d
|
[
"MIT"
] | 4
|
2020-04-27T19:00:14.000Z
|
2021-08-04T20:56:34.000Z
|
code/generate_mask_weights.py
|
bhuvi3/data590_capstone_project
|
0a0a33b75bb17c8f95ac5c597cb6b465dc4f375d
|
[
"MIT"
] | null | null | null |
code/generate_mask_weights.py
|
bhuvi3/data590_capstone_project
|
0a0a33b75bb17c8f95ac5c597cb6b465dc4f375d
|
[
"MIT"
] | 3
|
2020-01-24T19:56:54.000Z
|
2022-01-28T22:48:17.000Z
|
import os
import numpy as np
import tensorflow as tf
def save_weights_resnet152_10channel():
# Initialize configuration
required_input_shape = (7, 7, 10, 64)
output_file_prefix = "resnet152_10channel"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights
new_weights[:, :, 3:6, :] = input_layer_weights
new_weights[:, :, 6:9, :] = input_layer_weights
weights[0] = new_weights
# Save the new weights
np.save(os.path.join(os.getcwd(), 'data', output_file_prefix + "_mask_weights.npy"), weights)
def save_weights_resnet152_6channel(allpretrained=False):
# Initialize configuration
required_input_shape = (7, 7, 6, 64)
output_file_prefix = "resnet152_6channel"
if allpretrained:
output_file_prefix = output_file_prefix + "_allpretrained"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights
if allpretrained:
new_weights[:, :, 3:6, :] = input_layer_weights
weights[0] = new_weights
# Save the new weights
np.save(os.path.join("..", 'data', output_file_prefix + "_opticalflow_weights.npy"), weights)
def save_weights_resnet152_15channel(allpretrained=False):
# Initialize configuration
required_input_shape = (7, 7, 15, 64)
output_file_prefix = "resnet152_15channel"
if allpretrained:
output_file_prefix = output_file_prefix + "_allpretrained"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights # First image.
if allpretrained:
new_weights[:, :, 3:6, :] = input_layer_weights # OpticalFlow-1_2.
new_weights[:, :, 6:9, :] = input_layer_weights # Second image.
if allpretrained:
new_weights[:, :, 9:12, :] = input_layer_weights # OpticalFlow-2_3.
new_weights[:, :, 12:15, :] = input_layer_weights # Third image.
# Reassign new weights.
weights[0] = new_weights
# Save the new weights
np.save(os.path.join("..", 'data', output_file_prefix + "_opticalflow_weights.npy"), weights)
def save_weights_resnet152_13channel(allpretrained=False):
"""
image_1 (3) + image_2 (3) + image_3 (3) + opticalflow_average (3) + MOG2_mask (1)
"""
# Initialize configuration
required_input_shape = (7, 7, 13, 64)
output_file_prefix = "resnet152_13channel"
if allpretrained:
output_file_prefix = output_file_prefix + "_allpretrained"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights # First image.
new_weights[:, :, 3:6, :] = input_layer_weights # Second image.
new_weights[:, :, 6:9, :] = input_layer_weights # Third image.
if allpretrained:
new_weights[:, :, 9:12, :] = input_layer_weights # OpticalFlow-average.
# Mask always uses newly initialized weights.
# Reassign new weights.
weights[0] = new_weights
# Save the new weights
np.save(os.path.join("..", 'data', output_file_prefix + "_hybrid_weights.npy"), weights)
def save_weights_resnet152_16channel(allpretrained=False):
"""
image_1 (3) + opticalflow_1 (3) + image_2 (3) + opticalflow_2 (3) + image_3 (3) + MOG2_mask (1)
"""
# Initialize configuration
required_input_shape = (7, 7, 16, 64)
output_file_prefix = "resnet152_16channel"
if allpretrained:
output_file_prefix = output_file_prefix + "_allpretrained"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights # First image.
if allpretrained:
new_weights[:, :, 3:6, :] = input_layer_weights # OpticalFlow-1_2.
new_weights[:, :, 6:9, :] = input_layer_weights # Second image.
if allpretrained:
new_weights[:, :, 9:12, :] = input_layer_weights # OpticalFlow-2_3.
new_weights[:, :, 12:15, :] = input_layer_weights # Third image.
# Mask always uses newly initialized weights.
# Reassign new weights.
weights[0] = new_weights
# Save the new weights
np.save(os.path.join("..", 'data', output_file_prefix + "_hybrid_weights.npy"), weights)
def save_weights_resnet152_7channel(allpretrained=False):
# Initialize configuration
required_input_shape = (7, 7, 7, 64)
output_file_prefix = "resnet152_7channel"
if allpretrained:
output_file_prefix = output_file_prefix + "_allpretrained"
# Initialize a model of choice
model_pretrained_conv = tf.keras.applications.ResNet152(weights='imagenet', include_top=False)
# Get the weights of the model
weights = model_pretrained_conv.get_weights()
input_layer_weights = weights[0]
print("Changing weights of the input layer from", input_layer_weights.shape, "to", required_input_shape)
# Change the weights to desired shape
new_weights = np.random.normal(0, 0.001, required_input_shape)
new_weights[:, :, :3, :] = input_layer_weights
if allpretrained:
new_weights[:, :, 3:6, :] = input_layer_weights
# 7th Channel for Mask uses the randomly initialized weights. Therefore, leave it as it is.
weights[0] = new_weights
# Save the new weights
np.save(os.path.join("..", 'data', output_file_prefix + "_maskopticalflow_weights.npy"), weights)
| 36.628019
| 108
| 0.686626
| 965
| 7,582
| 5.11399
| 0.096373
| 0.085106
| 0.113678
| 0.038906
| 0.926444
| 0.873962
| 0.873962
| 0.837082
| 0.837082
| 0.8
| 0
| 0.037179
| 0.208916
| 7,582
| 206
| 109
| 36.805825
| 0.785595
| 0.194012
| 0
| 0.772277
| 0
| 0
| 0.107315
| 0.012606
| 0
| 0
| 0
| 0
| 0
| 1
| 0.059406
| false
| 0
| 0.029703
| 0
| 0.089109
| 0.059406
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
b36f3c14af89d4b0c0cd6b1792eba3aa6f9949d0
| 10,344
|
py
|
Python
|
scripts/vis_layout.py
|
d116626/covid
|
a9189c94b741379b07f3ac25b7f46add26f2ff67
|
[
"MIT"
] | null | null | null |
scripts/vis_layout.py
|
d116626/covid
|
a9189c94b741379b07f3ac25b7f46add26f2ff67
|
[
"MIT"
] | null | null | null |
scripts/vis_layout.py
|
d116626/covid
|
a9189c94b741379b07f3ac25b7f46add26f2ff67
|
[
"MIT"
] | null | null | null |
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot, offline
def get_layout(themes, title="", x_name="", y_name="", tipo=None):
layout = go.Layout(
# automargin=True,
margin=dict(
l=themes["margin"]["l"],
r=themes["margin"]["r"],
t=themes["margin"]["t"],
b=themes["margin"]["b"],
),
barmode=themes["barmode"],
hovermode=themes["hovermode"],
autosize=True,
# automargin=True,
# title=dict(
# text=title,
# x=0.5,
# # y=0.9,
# xanchor='center',
# yanchor='top',
# font = dict(
# size=themes['title']['size'],
# color=themes['title']['color']
# )
# ),
# xaxis_title=x_name,
xaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
# linecolor=themes['axis_legend']['gridcolor'],
# linewidth=2,
# mirror=True,
tickformat=themes["axis_legend"]["tickformat"]["x"],
type=themes["axis_legend"]["type"]["x"],
),
yaxis_title=y_name,
yaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
# linecolor=themes['axis_legend']['gridcolor'],
# linewidth=2,
tickformat=themes["axis_legend"]["tickformat"]["y"],
type=tipo,
),
font=dict(
size=themes["axis_tilte"]["size"], color=themes["axis_tilte"]["color"]
),
legend=go.layout.Legend(
x=themes["legend"]["position"]["x"],
y=themes["legend"]["position"]["y"],
xanchor=themes["legend"]["position"]["xanchor"],
yanchor=themes["legend"]["position"]["yanchor"],
traceorder=themes["legend"]["traceorder"],
orientation=themes["legend"]["orientation"],
font=dict(
family=themes["legend"]["family"],
size=themes["legend"]["size"],
color=themes["legend"]["color"],
),
bgcolor=themes["legend"]["bgcolor"],
bordercolor=themes["legend"]["bordercolor"],
borderwidth=themes["legend"]["borderwidth"],
),
height=themes["altura"],
width=themes["largura"],
paper_bgcolor=themes["paper_bgcolor"],
plot_bgcolor=themes["plot_bgcolor"],
annotations=[
dict(
showarrow=False,
text=f"<b>{themes['source']['text']}<b>",
x=themes["source"]["position"]["x"],
y=themes["source"]["position"]["y"],
xref="paper",
yref="paper",
align="left",
# xanchor='right',
xshift=0,
yshift=0,
font=dict(
family=themes["source"]["family"],
size=themes["source"]["size"],
color=themes["source"]["color"],
),
)
],
)
return layout
def get_layout_new(themes, var, scale):
layout = go.Layout(
hovermode=themes["hovermode"],
margin=dict(
l=themes["margin"]["l"],
r=themes["margin"]["r"],
t=themes["margin"]["t"],
b=themes["margin"]["b"],
),
barmode=themes["barmode"],
autosize=True,
title=dict(
text=themes["vars"][var]["title"],
x=0.5,
y=0.9,
xanchor="center",
yanchor="top",
font=dict(size=themes["title"]["size"], color=themes["title"]["color"]),
),
xaxis_title=themes["vars"][var]["x_title"],
xaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
linecolor=themes["axis_legend"]["gridcolor"],
# linewidth=2,
# mirror=True,
tickformat=themes["axis_legend"]["scale"][scale]["x"]["tickformat"],
type=themes["axis_legend"]["scale"][scale]["x"]["type"],
),
yaxis_title=themes["vars"][var]["y_title"],
yaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
# linecolor=themes['axis_legend']['gridcolor'],
# linewidth=2,
tickformat=themes["axis_legend"]["scale"][scale]["y"]["tickformat"],
type=themes["axis_legend"]["scale"][scale]["y"]["type"],
),
font=dict(
size=themes["axis_tilte"]["size"], color=themes["axis_tilte"]["color"]
),
legend=go.layout.Legend(
x=themes["legend"]["position"]["x"],
y=themes["legend"]["position"]["y"],
xanchor=themes["legend"]["position"]["xanchor"],
yanchor=themes["legend"]["position"]["yanchor"],
traceorder=themes["legend"]["traceorder"],
orientation=themes["legend"]["orientation"],
font=dict(
family=themes["legend"]["family"],
size=themes["legend"]["size"],
color=themes["legend"]["color"],
),
bgcolor=themes["legend"]["bgcolor"],
bordercolor=themes["legend"]["bordercolor"],
borderwidth=themes["legend"]["borderwidth"],
),
height=themes["altura"],
width=themes["largura"],
paper_bgcolor=themes["paper_bgcolor"],
plot_bgcolor=themes["plot_bgcolor"],
annotations=[
dict(
showarrow=False,
text=f"<b>{themes['source']['text']}<b>",
x=themes["source"]["position"]["x"],
y=themes["source"]["position"]["y"],
xref="paper",
yref="paper",
align="left",
# xanchor='right',
xshift=0,
yshift=0,
font=dict(
family=themes["source"]["family"],
size=themes["source"]["size"],
color=themes["source"]["color"],
),
)
],
)
return layout
def get_layout_bar(themes):
layout = go.Layout(
hovermode=themes["hovermode"],
margin=dict(
l=themes["margin"]["l"],
r=themes["margin"]["r"],
t=themes["margin"]["t"],
b=themes["margin"]["b"],
),
barmode=themes["barmode"],
autosize=True,
xaxis_title=themes["axis_legend"]["x"]["title"],
xaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
linecolor=themes["axis_legend"]["gridcolor"],
# linewidth=2,
# mirror=True,
tickformat=themes["axis_legend"]["scale"]["linear"]["x"]["tickformat"],
type=themes["axis_legend"]["scale"]["linear"]["x"]["type"],
),
yaxis_title=themes["axis_legend"]["y"]["title"],
yaxis=dict(
tickfont=dict(
size=themes["axis_legend"]["size"],
color=themes["axis_legend"]["color"],
),
gridcolor=themes["axis_legend"]["gridcolor"],
zerolinecolor=themes["axis_legend"]["gridcolor"],
# linecolor=themes['axis_legend']['gridcolor'],
# linewidth=2,
tickformat=themes["axis_legend"]["scale"]["linear"]["y"]["tickformat"],
type=themes["axis_legend"]["scale"]["linear"]["y"]["type"],
),
font=dict(
size=themes["axis_tilte"]["size"], color=themes["axis_tilte"]["color"]
),
legend=go.layout.Legend(
x=themes["legend"]["position"]["x"],
y=themes["legend"]["position"]["y"],
xanchor=themes["legend"]["position"]["xanchor"],
yanchor=themes["legend"]["position"]["yanchor"],
traceorder=themes["legend"]["traceorder"],
orientation=themes["legend"]["orientation"],
font=dict(
family=themes["legend"]["family"],
size=themes["legend"]["size"],
color=themes["legend"]["color"],
),
bgcolor=themes["legend"]["bgcolor"],
bordercolor=themes["legend"]["bordercolor"],
borderwidth=themes["legend"]["borderwidth"],
),
height=themes["altura"],
width=themes["largura"],
paper_bgcolor=themes["paper_bgcolor"],
plot_bgcolor=themes["plot_bgcolor"],
# annotations=[
# dict(
# showarrow=False,
# text=f"<b>{themes['source']['text']}<b>",
# x=themes["source"]["position"]["x"],
# y=themes["source"]["position"]["y"],
# xref="paper",
# yref="paper",
# align="left",
# # xanchor='right',
# xshift=0,
# yshift=0,
# font=dict(
# family=themes["source"]["family"],
# size=themes["source"]["size"],
# color=themes["source"]["color"],
# ),
# )
# ],
)
return layout
| 36.680851
| 86
| 0.474091
| 900
| 10,344
| 5.357778
| 0.102222
| 0.101618
| 0.142679
| 0.093322
| 0.918913
| 0.90647
| 0.901493
| 0.867068
| 0.867068
| 0.867068
| 0
| 0.002938
| 0.341937
| 10,344
| 281
| 87
| 36.811388
| 0.70545
| 0.108082
| 0
| 0.846154
| 0
| 0
| 0.211553
| 0.006975
| 0
| 0
| 0
| 0
| 0
| 1
| 0.013575
| false
| 0
| 0.00905
| 0
| 0.036199
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
2fa718be5c1c343024c682130079f1fe019ec004
| 48,375
|
py
|
Python
|
pyTMD/model.py
|
tsutterley/pyTMD
|
09e7888d969a26c3b230791d97a5d51504b1b4a4
|
[
"MIT"
] | 47
|
2019-09-29T07:46:39.000Z
|
2022-03-17T08:41:49.000Z
|
pyTMD/model.py
|
tsutterley/pyTMD
|
09e7888d969a26c3b230791d97a5d51504b1b4a4
|
[
"MIT"
] | 54
|
2020-06-11T08:51:34.000Z
|
2022-03-29T01:58:24.000Z
|
pyTMD/model.py
|
tsutterley/pyTMD
|
09e7888d969a26c3b230791d97a5d51504b1b4a4
|
[
"MIT"
] | 13
|
2019-11-03T05:38:01.000Z
|
2022-03-28T07:35:49.000Z
|
#!/usr/bin/env python
u"""
model.py
Written by Tyler Sutterley (09/2021)
Retrieves tide model parameters for named tide models and
from model definition files
UPDATE HISTORY:
Written 09/2021
"""
import os
import re
import io
import copy
class model:
"""Retrieves tide model parameters for named models or
from a model definition file for use in the pyTMD tide
prediction programs
"""
def __init__(self, directory=os.getcwd(), **kwargs):
# set default keyword arguments
kwargs.setdefault('compressed',False)
kwargs.setdefault('format','netcdf')
kwargs.setdefault('verify',True)
# set initial attributes
self.atl03 = None
self.atl06 = None
self.atl07 = None
self.atl11 = None
self.atl12 = None
self.compressed = copy.copy(kwargs['compressed'])
self.constituents = None
self.description = None
self.directory = os.path.expanduser(directory)
self.format = copy.copy(kwargs['format'])
self.gla12 = None
self.grid_file = None
self.long_name = None
self.model_file = None
self.name = None
self.projection = None
self.reference = None
self.scale = None
self.type = None
self.variable = None
self.verify = copy.copy(kwargs['verify'])
self.version = None
def grid(self,m):
"""Create a model object from known tide grid files
"""
# model name
self.name = m
# select between known tide models
if (m == 'CATS0201'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'cats0201_tmd')
self.grid_file = self.pathfinder('grid_CATS')
elif (m == 'CATS2008'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'CATS2008')
self.grid_file = self.pathfinder('grid_CATS2008')
elif (m == 'CATS2008_load'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,
'CATS2008a_SPOTL_Load')
self.grid_file = self.pathfinder('grid_CATS2008a_opt')
elif (m == 'TPXO9-atlas'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas')
self.grid_file = self.pathfinder('grid_tpxo9_atlas')
self.version = 'v1'
elif (m == 'TPXO9-atlas-v2'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v2')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v2')
self.version = 'v2'
elif (m == 'TPXO9-atlas-v3'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v3')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v3')
self.version = 'v3'
elif (m == 'TPXO9-atlas-v4'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v4')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v4')
self.version = 'v4'
elif (m == 'TPXO9.1'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO9.1','DATA')
self.grid_file = self.pathfinder('grid_tpxo9')
self.version = '9.1'
elif (m == 'TPXO8-atlas'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'tpxo8_atlas')
self.grid_file = self.pathfinder('grid_tpxo8atlas_30_v1')
self.version = '8'
elif (m == 'TPXO7.2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO7.2_tmd')
self.grid_file = self.pathfinder('grid_tpxo7.2')
self.version = '7.2'
elif (m == 'TPXO7.2_load'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO7.2_load')
self.grid_file = self.pathfinder('grid_tpxo6.2')
self.version = '7.2'
elif (m == 'AODTM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aodtm5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
elif (m == 'AOTIM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aotim5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
elif (m == 'AOTIM-5-2018'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'Arc5km2018')
self.grid_file = self.pathfinder('grid_Arc5km2018')
self.version = '2018'
elif (m == 'Gr1km-v2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'greenlandTMD_v2')
self.grid_file = self.pathfinder('grid_Greenland8.v2')
self.version = 'v2'
else:
raise Exception("Unlisted tide model")
# return the model parameters
return self
def elevation(self,m):
"""Create a model object from known tidal elevation models
"""
# model name
self.name = m
# model type
self.type = 'z'
# select between known tide models
if (m == 'CATS0201'):
self.model_directory = os.path.join(self.directory,'cats0201_tmd')
self.grid_file = self.pathfinder('grid_CATS')
self.model_file = self.pathfinder('h0_CATS02_01')
self.format = 'OTIS'
self.projection = '4326'
# model description and references
self.reference = ('https://mail.esr.org/polar_tide_models/'
'Model_CATS0201.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'CATS2008'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'CATS2008')
self.grid_file = self.pathfinder('grid_CATS2008')
self.model_file = self.pathfinder('hf.CATS2008.out')
self.projection = 'CATS2008'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/cats2008/')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'CATS2008_load'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,
'CATS2008a_SPOTL_Load')
self.grid_file = self.pathfinder('grid_CATS2008a_opt')
self.model_file = self.pathfinder('h_CATS2008a_SPOTL_load')
self.projection = 'CATS2008'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/cats2008/')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
elif (m == 'TPXO9-atlas'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas')
self.grid_file = self.pathfinder('grid_tpxo9_atlas')
model_files = ['h_q1_tpxo9_atlas_30','h_o1_tpxo9_atlas_30',
'h_p1_tpxo9_atlas_30','h_k1_tpxo9_atlas_30',
'h_n2_tpxo9_atlas_30','h_m2_tpxo9_atlas_30',
'h_s2_tpxo9_atlas_30','h_k2_tpxo9_atlas_30',
'h_m4_tpxo9_atlas_30','h_ms4_tpxo9_atlas_30',
'h_mn4_tpxo9_atlas_30','h_2n2_tpxo9_atlas_30']
self.model_file = self.pathfinder(model_files)
self.projection = '4326'
self.scale = 1.0/1000.0
self.version = 'v1'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/tides/'
'tpxo9_atlas.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO9-atlas-v2'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v2')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v2')
model_files = ['h_q1_tpxo9_atlas_30_v2','h_o1_tpxo9_atlas_30_v2',
'h_p1_tpxo9_atlas_30_v2','h_k1_tpxo9_atlas_30_v2',
'h_n2_tpxo9_atlas_30_v2','h_m2_tpxo9_atlas_30_v2',
'h_s2_tpxo9_atlas_30_v2','h_k2_tpxo9_atlas_30_v2',
'h_m4_tpxo9_atlas_30_v2','h_ms4_tpxo9_atlas_30_v2',
'h_mn4_tpxo9_atlas_30_v2','h_2n2_tpxo9_atlas_30_v2']
self.model_file = self.pathfinder(model_files)
self.projection = '4326'
self.scale = 1.0/1000.0
self.version = 'v2'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO9-atlas-v3'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v3')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v3')
model_files = ['h_q1_tpxo9_atlas_30_v3','h_o1_tpxo9_atlas_30_v3',
'h_p1_tpxo9_atlas_30_v3','h_k1_tpxo9_atlas_30_v3',
'h_n2_tpxo9_atlas_30_v3','h_m2_tpxo9_atlas_30_v3',
'h_s2_tpxo9_atlas_30_v3','h_k2_tpxo9_atlas_30_v3',
'h_m4_tpxo9_atlas_30_v3','h_ms4_tpxo9_atlas_30_v3',
'h_mn4_tpxo9_atlas_30_v3','h_2n2_tpxo9_atlas_30_v3',
'h_mf_tpxo9_atlas_30_v3','h_mm_tpxo9_atlas_30_v3']
self.model_file = self.pathfinder(model_files)
self.projection = '4326'
self.scale = 1.0/1000.0
self.version = 'v3'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO9-atlas-v4'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v4')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v4')
model_files = ['h_q1_tpxo9_atlas_30_v4','h_o1_tpxo9_atlas_30_v4',
'h_p1_tpxo9_atlas_30_v4','h_k1_tpxo9_atlas_30_v4',
'h_n2_tpxo9_atlas_30_v4','h_m2_tpxo9_atlas_30_v4',
'h_s2_tpxo9_atlas_30_v4','h_k2_tpxo9_atlas_30_v4',
'h_m4_tpxo9_atlas_30_v4','h_ms4_tpxo9_atlas_30_v4',
'h_mn4_tpxo9_atlas_30_v4','h_2n2_tpxo9_atlas_30_v4',
'h_mf_tpxo9_atlas_30_v4','h_mm_tpxo9_atlas_30_v4']
self.model_file = self.pathfinder(model_files)
self.projection = '4326'
self.scale = 1.0/1000.0
self.version = 'v4'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO9.1'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO9.1','DATA')
self.grid_file = self.pathfinder('grid_tpxo9')
self.model_file = self.pathfinder('h_tpxo9.v1')
self.projection = '4326'
self.version = '9.1'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/'
'tides/global.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO8-atlas'):
self.format = 'ATLAS'
self.model_directory = os.path.join(self.directory,'tpxo8_atlas')
self.grid_file = self.pathfinder('grid_tpxo8atlas_30_v1')
self.model_file = self.pathfinder('hf.tpxo8_atlas_30_v1')
self.projection = '4326'
self.version = '8'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/'
'tides/tpxo8_atlas.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO7.2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO7.2_tmd')
self.grid_file = self.pathfinder('grid_tpxo7.2')
self.model_file = self.pathfinder('h_tpxo7.2')
self.projection = '4326'
self.version = '7.2'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/'
'tides/global.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'TPXO7.2_load'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO7.2_load')
self.grid_file = self.pathfinder('grid_tpxo6.2')
self.model_file = self.pathfinder('h_tpxo7.2_load')
self.projection = '4326'
self.version = '7.2'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/'
'tides/global.html')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
elif (m == 'AODTM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aodtm5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
self.model_file = self.pathfinder('h0_Arc5km.oce')
self.projection = 'PSNorth'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aodtm-5/')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'AOTIM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aotim5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
self.model_file = self.pathfinder('h_Arc5km.oce')
self.projection = 'PSNorth'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aotim-5/')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'AOTIM-5-2018'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'Arc5km2018')
self.grid_file = self.pathfinder('grid_Arc5km2018')
self.model_file = self.pathfinder('h_Arc5km2018')
self.projection = 'PSNorth'
self.version = '2018'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aotim-5/')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'Gr1km-v2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'greenlandTMD_v2')
self.grid_file = self.pathfinder('grid_Greenland8.v2')
self.model_file = self.pathfinder('h_Greenland8.v2')
self.projection = '3413'
self.version = 'v2'
# model description and references
self.reference = 'https://doi.org/10.1002/2016RG000546'
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'GOT4.7'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'GOT4.7','grids_oceantide')
model_files = ['q1.d','o1.d','p1.d','k1.d','n2.d',
'm2.d','s2.d','k2.d','s1.d','m4.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/100.0
self.version = '4.7'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'GOT4.7_load'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'GOT4.7','grids_loadtide')
model_files = ['q1load.d','o1load.d',
'p1load.d','k1load.d','n2load.d',
'm2load.d','s2load.d','k2load.d',
's1load.d','m4load.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/1000.0
self.version = '4.7'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
elif (m == 'GOT4.8'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'got4.8','grids_oceantide')
model_files = ['q1.d','o1.d','p1.d','k1.d','n2.d',
'm2.d','s2.d','k2.d','s1.d','m4.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/100.0
self.version = '4.8'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'GOT4.8_load'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'got4.8','grids_loadtide')
model_files = ['q1load.d','o1load.d',
'p1load.d','k1load.d','n2load.d',
'm2load.d','s2load.d','k2load.d',
's1load.d','m4load.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/1000.0
self.version = '4.8'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
elif (m == 'GOT4.10'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'GOT4.10c','grids_oceantide')
model_files = ['q1.d','o1.d','p1.d','k1.d','n2.d',
'm2.d','s2.d','k2.d','s1.d','m4.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/100.0
self.version = '4.10'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'GOT4.10_load'):
self.format = 'GOT'
self.model_directory = os.path.join(self.directory,
'GOT4.10c','grids_loadtide')
model_files = ['q1load.d','o1load.d',
'p1load.d','k1load.d','n2load.d',
'm2load.d','s2load.d','k2load.d',
's1load.d','m4load.d']
self.model_file = self.pathfinder(model_files)
self.scale = 1.0/1000.0
self.version = '4.10'
# model description and references
self.reference = ('https://denali.gsfc.nasa.gov/'
'personal_pages/ray/MiscPubs/'
'19990089548_1999150788.pdf')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
elif (m == 'FES2014'):
self.format = 'FES'
self.model_directory = os.path.join(self.directory,
'fes2014','ocean_tide')
model_files = ['2n2.nc','eps2.nc','j1.nc','k1.nc',
'k2.nc','l2.nc','la2.nc','m2.nc','m3.nc','m4.nc',
'm6.nc','m8.nc','mf.nc','mks2.nc','mm.nc',
'mn4.nc','ms4.nc','msf.nc','msqm.nc','mtm.nc',
'mu2.nc','n2.nc','n4.nc','nu2.nc','o1.nc','p1.nc',
'q1.nc','r2.nc','s1.nc','s2.nc','s4.nc','sa.nc',
'ssa.nc','t2.nc']
self.model_file = self.pathfinder(model_files)
self.constituents = ['2n2','eps2','j1','k1','k2','l2',
'lambda2','m2','m3','m4','m6','m8','mf','mks2','mm',
'mn4','ms4','msf','msqm','mtm','mu2','n2','n4','nu2',
'o1','p1','q1','r2','s1','s2','s4','sa','ssa','t2']
self.scale = 1.0/100.0
self.version = 'FES2014'
# model description and references
self.reference = ('https://www.aviso.altimetry.fr/'
'en/data/products/auxiliary-products/'
'global-tide-fes.html')
self.atl03 = 'tide_ocean'
self.atl06 = 'tide_ocean'
self.atl07 = 'height_segment_ocean'
self.atl11 = 'tide_ocean'
self.atl12 = 'tide_ocean_seg'
self.gla12 = 'd_ocElv'
self.variable = 'tide_ocean'
self.long_name = "Ocean Tide"
self.description = ("Ocean Tides including diurnal and "
"semi-diurnal (harmonic analysis), and longer period "
"tides (dynamic and self-consistent equilibrium).")
elif (m == 'FES2014_load'):
self.format = 'FES'
self.model_directory = os.path.join(self.directory,
'fes2014','load_tide')
model_files = ['2n2.nc','eps2.nc','j1.nc','k1.nc',
'k2.nc','l2.nc','la2.nc','m2.nc','m3.nc','m4.nc',
'm6.nc','m8.nc','mf.nc','mks2.nc','mm.nc',
'mn4.nc','ms4.nc','msf.nc','msqm.nc','mtm.nc',
'mu2.nc','n2.nc','n4.nc','nu2.nc','o1.nc','p1.nc',
'q1.nc','r2.nc','s1.nc','s2.nc','s4.nc','sa.nc',
'ssa.nc','t2.nc']
self.model_file = self.pathfinder(model_files)
self.constituents = ['2n2','eps2','j1','k1','k2','l2',
'lambda2','m2','m3','m4','m6','m8','mf','mks2','mm',
'mn4','ms4','msf','msqm','mtm','mu2','n2','n4','nu2',
'o1','p1','q1','r2','s1','s2','s4','sa','ssa','t2']
self.scale = 1.0/100.0
self.version = 'FES2014'
# model description and references
self.reference = ('https://www.aviso.altimetry.fr/'
'en/data/products/auxiliary-products/'
'global-tide-fes.html')
self.atl03 = 'tide_load'
self.atl06 = 'tide_load'
self.atl07 = 'height_segment_load'
self.atl11 = 'tide_load'
self.atl12 = 'tide_load_seg'
self.gla12 = 'd_ldElv'
self.variable = 'tide_load'
self.long_name = "Load Tide"
self.description = ("Local displacement due to Ocean "
"Loading (-6 to 0 cm)")
else:
raise Exception("Unlisted tide model")
# return the model parameters
return self
def current(self,m):
"""Create a model object from known tidal current models
"""
# model name
self.name = m
# model type
self.type = ['u','v']
# select between tide models
if (m == 'CATS0201'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'cats0201_tmd')
self.grid_file = self.pathfinder('grid_CATS')
self.model_file = dict(u=self.pathfinder('UV0_CATS02_01'))
self.projection = '4326'
# model description and references
self.reference = ('https://mail.esr.org/polar_tide_models/'
'Model_CATS0201.html')
elif (m == 'CATS2008'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'CATS2008')
self.grid_file = self.pathfinder('grid_CATS2008')
self.model_file = dict(u=self.pathfinder('uv.CATS2008.out'))
self.projection = 'CATS2008'
elif (m == 'TPXO9-atlas'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas')
self.grid_file = self.pathfinder('grid_tpxo9_atlas')
model_files = {}
model_files['u'] = ['u_q1_tpxo9_atlas_30','u_o1_tpxo9_atlas_30',
'u_p1_tpxo9_atlas_30','u_k1_tpxo9_atlas_30',
'u_n2_tpxo9_atlas_30','u_m2_tpxo9_atlas_30',
'u_s2_tpxo9_atlas_30','u_k2_tpxo9_atlas_30',
'u_m4_tpxo9_atlas_30','u_ms4_tpxo9_atlas_30',
'u_mn4_tpxo9_atlas_30','u_2n2_tpxo9_atlas_30']
model_files['v'] = ['v_q1_tpxo9_atlas_30','v_o1_tpxo9_atlas_30',
'v_p1_tpxo9_atlas_30','v_k1_tpxo9_atlas_30',
'v_n2_tpxo9_atlas_30','v_m2_tpxo9_atlas_30',
'v_s2_tpxo9_atlas_30','v_k2_tpxo9_atlas_30',
'v_m4_tpxo9_atlas_30','v_ms4_tpxo9_atlas_30',
'v_mn4_tpxo9_atlas_30','v_2n2_tpxo9_atlas_30']
self.model_file = {}
for key,val in model_files.items():
self.model_file[key] = self.pathfinder(val)
self.projection = '4326'
self.scale = 1.0/100.0
self.version = 'v1'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/tides/'
'tpxo9_atlas.html')
elif (m == 'TPXO9-atlas-v2'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v2')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v2')
model_files = {}
model_files['u'] = ['u_q1_tpxo9_atlas_30_v2','u_o1_tpxo9_atlas_30_v2',
'u_p1_tpxo9_atlas_30_v2','u_k1_tpxo9_atlas_30_v2',
'u_n2_tpxo9_atlas_30_v2','u_m2_tpxo9_atlas_30_v2',
'u_s2_tpxo9_atlas_30_v2','u_k2_tpxo9_atlas_30_v2',
'u_m4_tpxo9_atlas_30_v2','u_ms4_tpxo9_atlas_30_v2',
'u_mn4_tpxo9_atlas_30_v2','u_2n2_tpxo9_atlas_30_v2']
model_files['v'] = ['v_q1_tpxo9_atlas_30_v2','v_o1_tpxo9_atlas_30_v2',
'v_p1_tpxo9_atlas_30_v2','v_k1_tpxo9_atlas_30_v2',
'v_n2_tpxo9_atlas_30_v2','v_m2_tpxo9_atlas_30_v2',
'v_s2_tpxo9_atlas_30_v2','v_k2_tpxo9_atlas_30_v2',
'v_m4_tpxo9_atlas_30_v2','v_ms4_tpxo9_atlas_30_v2',
'v_mn4_tpxo9_atlas_30_v2','v_2n2_tpxo9_atlas_30_v2']
self.model_file = {}
for key,val in model_files.items():
self.model_file[key] = self.pathfinder(val)
self.projection = '4326'
self.scale = 1.0/100.0
self.version = 'v2'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
elif (m == 'TPXO9-atlas-v3'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v3')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v3')
model_files = {}
model_files['u'] = ['u_q1_tpxo9_atlas_30_v3','u_o1_tpxo9_atlas_30_v3',
'u_p1_tpxo9_atlas_30_v3','u_k1_tpxo9_atlas_30_v3',
'u_n2_tpxo9_atlas_30_v3','u_m2_tpxo9_atlas_30_v3',
'u_s2_tpxo9_atlas_30_v3','u_k2_tpxo9_atlas_30_v3',
'u_m4_tpxo9_atlas_30_v3','u_ms4_tpxo9_atlas_30_v3',
'u_mn4_tpxo9_atlas_30_v3','u_2n2_tpxo9_atlas_30_v3']
model_files['v'] = ['v_q1_tpxo9_atlas_30_v3','v_o1_tpxo9_atlas_30_v3',
'v_p1_tpxo9_atlas_30_v3','v_k1_tpxo9_atlas_30_v3',
'v_n2_tpxo9_atlas_30_v3','v_m2_tpxo9_atlas_30_v3',
'v_s2_tpxo9_atlas_30_v3','v_k2_tpxo9_atlas_30_v3',
'v_m4_tpxo9_atlas_30_v3','v_ms4_tpxo9_atlas_30_v3',
'v_mn4_tpxo9_atlas_30_v3','v_2n2_tpxo9_atlas_30_v3']
self.model_file = {}
for key,val in model_files.items():
self.model_file[key] = self.pathfinder(val)
self.projection = '4326'
self.scale = 1.0/100.0
self.version = 'v3'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
elif (m == 'TPXO9-atlas-v4'):
self.model_directory = os.path.join(self.directory,'TPXO9_atlas_v4')
self.grid_file = self.pathfinder('grid_tpxo9_atlas_30_v4')
model_files = {}
model_files['u'] = ['u_q1_tpxo9_atlas_30_v4','u_o1_tpxo9_atlas_30_v4',
'u_p1_tpxo9_atlas_30_v4','u_k1_tpxo9_atlas_30_v4',
'u_n2_tpxo9_atlas_30_v4','u_m2_tpxo9_atlas_30_v4',
'u_s2_tpxo9_atlas_30_v4','u_k2_tpxo9_atlas_30_v4',
'u_m4_tpxo9_atlas_30_v4','u_ms4_tpxo9_atlas_30_v4',
'u_mn4_tpxo9_atlas_30_v4','u_2n2_tpxo9_atlas_30_v4']
model_files['v'] = ['v_q1_tpxo9_atlas_30_v4','v_o1_tpxo9_atlas_30_v4',
'v_p1_tpxo9_atlas_30_v4','v_k1_tpxo9_atlas_30_v4',
'v_n2_tpxo9_atlas_30_v4','v_m2_tpxo9_atlas_30_v4',
'v_s2_tpxo9_atlas_30_v4','v_k2_tpxo9_atlas_30_v4',
'v_m4_tpxo9_atlas_30_v4','v_ms4_tpxo9_atlas_30_v4',
'v_mn4_tpxo9_atlas_30_v4','v_2n2_tpxo9_atlas_30_v4']
self.model_file = {}
for key,val in model_files.items():
self.model_file[key] = self.pathfinder(val)
self.projection = '4326'
self.scale = 1.0/100.0
self.version = 'v4'
# model description and references
self.reference = 'https://www.tpxo.net/global/tpxo9-atlas'
elif (m == 'TPXO9.1'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO9.1')
self.grid_file = self.pathfinder('grid_tpxo9')
self.model_file = dict(u=self.pathfinder('u_tpxo9.v1'))
self.projection = '4326'
self.version = '9.1'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/tides/'
'global.html')
elif (m == 'TPXO8-atlas'):
self.format = 'ATLAS'
self.model_directory = os.path.join(self.directory,'tpxo8_atlas')
self.grid_file = self.pathfinder('grid_tpxo8atlas_30_v1')
self.model_file = dict(u=self.pathfinder('uv.tpxo8_atlas_30_v1'))
self.projection = '4326'
self.version = '8'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/tides/'
'tpxo8_atlas.html')
elif (m == 'TPXO7.2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'TPXO7.2_tmd')
self.grid_file = self.pathfinder('grid_tpxo7.2')
self.model_file = dict(u=self.pathfinder('u_tpxo7.2'))
self.projection = '4326'
self.version = '7.2'
# model description and references
self.reference = ('http://volkov.oce.orst.edu/tides/'
'global.html')
elif (m == 'AODTM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aodtm5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
self.model_file = dict(u=self.pathfinder('UV0_Arc5km'))
self.projection = 'PSNorth'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aodtm-5/')
elif (m == 'AOTIM-5'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'aotim5_tmd')
self.grid_file = self.pathfinder('grid_Arc5km')
self.model_file = dict(u=self.pathfinder('UV_Arc5km'))
self.projection = 'PSNorth'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aotim-5/')
elif (m == 'AOTIM-5-2018'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'Arc5km2018')
self.grid_file = self.pathfinder('grid_Arc5km2018')
self.model_file = dict(u=self.pathfinder('UV_Arc5km2018'))
self.projection = 'PSNorth'
self.version = '2018'
# model description and references
self.reference = ('https://www.esr.org/research/'
'polar-tide-models/list-of-polar-tide-models/'
'aotim-5/')
elif (m == 'Gr1km-v2'):
self.format = 'OTIS'
self.model_directory = os.path.join(self.directory,'greenlandTMD_v2')
self.grid_file = self.pathfinder('grid_Greenland8.v2')
self.model_file = dict(u=self.pathfinder('u_Greenland8_rot.v2'))
self.projection = '3413'
self.version = 'v2'
# model description and references
self.reference = 'https://doi.org/10.1002/2016RG000546'
elif (m == 'FES2014'):
self.format = 'FES'
model_directory = {}
model_directory['u'] = os.path.join(self.directory,
'fes2014','eastward_velocity')
model_directory['v'] = os.path.join(self.directory,
'fes2014','northward_velocity')
model_files = ['2n2.nc','eps2.nc','j1.nc','k1.nc',
'k2.nc','l2.nc','la2.nc','m2.nc','m3.nc','m4.nc',
'm6.nc','m8.nc','mf.nc','mks2.nc','mm.nc',
'mn4.nc','ms4.nc','msf.nc','msqm.nc','mtm.nc',
'mu2.nc','n2.nc','n4.nc','nu2.nc','o1.nc','p1.nc',
'q1.nc','r2.nc','s1.nc','s2.nc','s4.nc','sa.nc',
'ssa.nc','t2.nc']
self.model_file = {}
for key,val in model_directory.items():
self.model_directory = os.path.expanduser(model_directory)
self.model_file[key] = self.pathfinder(val)
self.constituents = ['2n2','eps2','j1','k1','k2','l2','lambda2',
'm2','m3','m4','m6','m8','mf','mks2','mm','mn4','ms4','msf',
'msqm','mtm','mu2','n2','n4','nu2','o1','p1','q1','r2','s1',
's2','s4','sa','ssa','t2']
self.scale = 1.0
self.version = 'FES2014'
# model description and references
self.reference = ('https://www.aviso.altimetry.fr/en/data/products'
'auxiliary-products/global-tide-fes.html')
else:
raise Exception("Unlisted tide model")
# return the model parameters
return self
@property
def gzip(self):
"""compression flag"""
return '.gz' if self.compressed else ''
@property
def suffix(self):
"""format suffix flag"""
return '.nc' if (self.format == 'netcdf') else ''
def pathfinder(self,model_file):
"""Completes file paths and appends file and gzip suffixes
"""
if isinstance(model_file,list):
output_file = [os.path.join(self.model_directory,
''.join([f,self.suffix,self.gzip])) for f in model_file]
valid = all([os.access(f, os.F_OK) for f in output_file])
elif isinstance(model_file,str):
output_file = os.path.join(self.model_directory,
''.join([model_file,self.suffix,self.gzip]))
valid = os.access(output_file, os.F_OK)
#-- check that (all) output files exist
if self.verify and not valid:
raise FileNotFoundError(output_file)
#-- return the complete output path
return output_file
def from_file(self, definition_file):
"""Create a model object from an input definition file
"""
# variable with parameter definitions
parameters = {}
# Opening definition file and assigning file ID number
if isinstance(definition_file,io.IOBase):
fid = copy.copy(definition_file)
else:
fid = open(os.path.expanduser(definition_file), 'r')
# for each line in the file will extract the parameter (name and value)
for fileline in fid:
# Splitting the input line between parameter name and value
part = fileline.rstrip().split(maxsplit=1)
# filling the parameter definition variable
parameters[part[0]] = part[1]
# close the parameter file
fid.close()
# convert from dictionary to model variable
temp = self.from_dict(parameters)
# verify model name, format and type
assert temp.name
assert temp.format in ('OTIS','ATLAS','netcdf','GOT','FES')
assert temp.type
# verify necessary attributes are with model format
assert temp.model_file
# split model file into list if an ATLAS, GOT or FES file
# model files can be comma, tab or space delimited
# extract full path to tide model files
if re.search(r'[\s\,]+', temp.model_file):
temp.model_file = [os.path.expanduser(f) for f in
re.split(r'[\s\,]+',temp.model_file)]
temp.model_directory = os.path.dirname(temp.model_file[0])
else:
temp.model_file = os.path.expanduser(temp.model_file)
temp.model_directory = os.path.dirname(temp.model_file)
# extract full path to tide grid file
if temp.format in ('OTIS','ATLAS','netcdf'):
assert temp.grid_file
temp.grid_file = os.path.expanduser(temp.grid_file)
if temp.format in ('OTIS','ATLAS'):
assert temp.projection
# convert scale from string to float
if temp.format in ('netcdf','GOT','FES'):
assert temp.scale
temp.scale = float(temp.scale)
if temp.format in ('FES',):
assert temp.version
# split type into list if currents u,v
if re.search(r'[\s\,]+', temp.type):
temp.type = re.split(r'[\s\,]+',temp.type)
# convert boolean strings
if isinstance(temp.compressed,str):
temp.compressed = self.to_bool(temp.compressed)
# return the model parameters
return temp
def from_dict(self,d):
"""Create a model object from a python dictionary
"""
for key,val in d.items():
setattr(self,key,copy.copy(val))
# return the model parameters
return self
def to_bool(self,val):
"""Converts strings of True/False to a boolean values
"""
if val.lower() in ('y','yes','t','true','1'):
return True
elif val.lower() in ('n','no','f','false','0'):
return False
else:
raise ValueError('Invalid boolean string {0}'.format(val))
| 47.89604
| 82
| 0.562026
| 5,890
| 48,375
| 4.385908
| 0.06146
| 0.074324
| 0.07293
| 0.029807
| 0.885573
| 0.791352
| 0.773816
| 0.765029
| 0.748345
| 0.73828
| 0
| 0.064073
| 0.310863
| 48,375
| 1,009
| 83
| 47.943508
| 0.710832
| 0.063483
| 0
| 0.752497
| 0
| 0
| 0.312018
| 0.079732
| 0
| 0
| 0
| 0
| 0.008879
| 1
| 0.011099
| false
| 0
| 0.00444
| 0
| 0.027747
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
ff79206027f99b397e19dd759a8f35169c2a6e08
| 46,513
|
py
|
Python
|
src/swiftlet/azext_swiftlet/vendored_sdks/swiftlet/operations/_virtual_machine_operations.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 207
|
2017-11-29T06:59:41.000Z
|
2022-03-31T10:00:53.000Z
|
src/swiftlet/azext_swiftlet/vendored_sdks/swiftlet/operations/_virtual_machine_operations.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 4,061
|
2017-10-27T23:19:56.000Z
|
2022-03-31T23:18:30.000Z
|
src/swiftlet/azext_swiftlet/vendored_sdks/swiftlet/operations/_virtual_machine_operations.py
|
Mannan2812/azure-cli-extensions
|
e2b34efe23795f6db9c59100534a40f0813c3d95
|
[
"MIT"
] | 802
|
2017-10-11T17:36:26.000Z
|
2022-03-31T22:24:32.000Z
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
import warnings
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
class VirtualMachineOperations(object):
"""VirtualMachineOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~swiftlet_management_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = models
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def _start_initial(
self,
vm_name, # type: str
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
# Construct URL
url = self._start_initial.metadata['url'] # type: ignore
path_format_arguments = {
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}/start'} # type: ignore
def begin_start(
self,
vm_name, # type: str
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Start a specified virtual machine.
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._start_initial(
vm_name=vm_name,
resource_group_name=resource_group_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}/start'} # type: ignore
def _stop_initial(
self,
vm_name, # type: str
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
# Construct URL
url = self._stop_initial.metadata['url'] # type: ignore
path_format_arguments = {
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}/stop'} # type: ignore
def begin_stop(
self,
vm_name, # type: str
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Stop a specified virtual machine.
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._stop_initial(
vm_name=vm_name,
resource_group_name=resource_group_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}/stop'} # type: ignore
def list_image(
self,
location, # type: str
**kwargs # type: Any
):
# type: (...) -> Iterable["models.SwiftletImageListResult"]
"""List all Swiftlet images available for the specified subscription and Azure location.
:param location: The name of a supported Azure region.
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either SwiftletImageListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~swiftlet_management_client.models.SwiftletImageListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SwiftletImageListResult"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
if not next_link:
# Construct URL
url = self.list_image.metadata['url'] # type: ignore
path_format_arguments = {
'location': self._serialize.url("location", location, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('SwiftletImageListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list_image.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Swiftlet/locations/{location}/swiftletImages'} # type: ignore
def list_bundle(
self,
location, # type: str
**kwargs # type: Any
):
# type: (...) -> Iterable["models.SwiftletBundleListResult"]
"""List all Swiftlet bundles available for the specified subscription and Azure location.
:param location: The name of a supported Azure region.
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either SwiftletBundleListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~swiftlet_management_client.models.SwiftletBundleListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SwiftletBundleListResult"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
if not next_link:
# Construct URL
url = self.list_bundle.metadata['url'] # type: ignore
path_format_arguments = {
'location': self._serialize.url("location", location, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('SwiftletBundleListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list_bundle.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Swiftlet/locations/{location}/swiftletBundles'} # type: ignore
def _create_or_update_initial(
self,
resource_group_name, # type: str
vm_name, # type: str
location, # type: str
swiftlet_bundle_sku, # type: str
swiftlet_image_id, # type: str
tags=None, # type: Optional[Dict[str, str]]
username=None, # type: Optional[str]
ssh_public_key=None, # type: Optional[str]
password=None, # type: Optional[str]
ports=None, # type: Optional[List["models.Port"]]
startup_script=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> "models.VirtualMachine"
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachine"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
_parameters = models.VirtualMachine(tags=tags, location=location, swiftlet_bundle_sku=swiftlet_bundle_sku, swiftlet_image_id=swiftlet_image_id, username=username, ssh_public_key=ssh_public_key, password=password, ports=ports, startup_script=startup_script)
api_version = "2020-03-01-preview"
content_type = kwargs.pop("content_type", "application/json")
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_parameters, 'VirtualMachine')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if response.status_code == 201:
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def begin_create_or_update(
self,
resource_group_name, # type: str
vm_name, # type: str
location, # type: str
swiftlet_bundle_sku, # type: str
swiftlet_image_id, # type: str
tags=None, # type: Optional[Dict[str, str]]
username=None, # type: Optional[str]
ssh_public_key=None, # type: Optional[str]
password=None, # type: Optional[str]
ports=None, # type: Optional[List["models.Port"]]
startup_script=None, # type: Optional[str]
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.VirtualMachine"]
"""Create or update a virtual machine.
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param location: The geo-location where the resource lives.
:type location: str
:param swiftlet_bundle_sku: Specifies the Swiftlet bundle of this virtual machine (which
specifies the selected tier of memory, processing, and storage).
:type swiftlet_bundle_sku: str
:param swiftlet_image_id: The image ID to use. The image "platform" must match the
"supportedImagePlatform" of the specified swiftletBundleSku.
:type swiftlet_image_id: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param username: The username for connecting the the virtual machine.
:type username: str
:param ssh_public_key: The SSH public key used to connect to this virtual machine. Only
supported on Linux images. If specified on a Windows image, an error will be returned.
:type ssh_public_key: str
:param password: The password for connecting to this Swiftlet. If the image platform type is
"linux", this is optional if sshPublicKey is set. If the image platform type is "windows", this
is required.
:type password: str
:param ports: The ports on which inbound traffic will be allowed.
:type ports: list[~swiftlet_management_client.models.Port]
:param startup_script: An inline script that will run upon startup of the virtual machine.
:type startup_script: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either VirtualMachine or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~swiftlet_management_client.models.VirtualMachine]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachine"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
vm_name=vm_name,
location=location,
swiftlet_bundle_sku=swiftlet_bundle_sku,
swiftlet_image_id=swiftlet_image_id,
tags=tags,
username=username,
ssh_public_key=ssh_public_key,
password=password,
ports=ports,
startup_script=startup_script,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def _update_initial(
self,
resource_group_name, # type: str
vm_name, # type: str
tags=None, # type: Optional[Dict[str, str]]
ports=None, # type: Optional[List["models.Port"]]
**kwargs # type: Any
):
# type: (...) -> "models.VirtualMachine"
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachine"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
_parameters = models.VirtualMachineUpdate(tags=tags, ports=ports)
api_version = "2020-03-01-preview"
content_type = kwargs.pop("content_type", "application/json")
# Construct URL
url = self._update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_parameters, 'VirtualMachineUpdate')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def begin_update(
self,
resource_group_name, # type: str
vm_name, # type: str
tags=None, # type: Optional[Dict[str, str]]
ports=None, # type: Optional[List["models.Port"]]
**kwargs # type: Any
):
# type: (...) -> LROPoller["models.VirtualMachine"]
"""Update a virtual machine.
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param ports: Specifies the list of ports to be opened.
:type ports: list[~swiftlet_management_client.models.Port]
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either VirtualMachine or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~swiftlet_management_client.models.VirtualMachine]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachine"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._update_initial(
resource_group_name=resource_group_name,
vm_name=vm_name,
tags=tags,
ports=ports,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def _delete_initial(
self,
resource_group_name, # type: str
vm_name, # type: str
**kwargs # type: Any
):
# type: (...) -> None
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def begin_delete(
self,
resource_group_name, # type: str
vm_name, # type: str
**kwargs # type: Any
):
# type: (...) -> LROPoller[None]
"""Delete a virtual machine.
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
vm_name=vm_name,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})
if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def get(
self,
resource_group_name, # type: str
vm_name, # type: str
**kwargs # type: Any
):
# type: (...) -> "models.VirtualMachine"
"""Get information about the virtual machine.
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: VirtualMachine, or the result of cls(response)
:rtype: ~swiftlet_management_client.models.VirtualMachine
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachine"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'vmName': self._serialize.url("vm_name", vm_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize('VirtualMachine', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines/{vmName}'} # type: ignore
def list_by_resource_group(
self,
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> Iterable["models.VirtualMachineListResult"]
"""List all of the virtual machines in the specified resource group. Use the nextLink property in
the response to get the next page of virtual machines.
:param resource_group_name: The name of the resource group within the user’s subscription ID.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either VirtualMachineListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~swiftlet_management_client.models.VirtualMachineListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachineListResult"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('VirtualMachineListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Swiftlet/virtualMachines'} # type: ignore
def list_by_subscription(
self,
**kwargs # type: Any
):
# type: (...) -> Iterable["models.VirtualMachineListResult"]
"""List all of the virtual machines in the specified subscription. Use the nextLink property in
the response to get the next page of virtual machines.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either VirtualMachineListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~swiftlet_management_client.models.VirtualMachineListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualMachineListResult"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-03-01-preview"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
def extract_data(pipeline_response):
deserialized = self._deserialize('VirtualMachineListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(
get_next, extract_data
)
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Swiftlet/virtualMachines'} # type: ignore
| 47.8037
| 264
| 0.650442
| 5,132
| 46,513
| 5.688036
| 0.063523
| 0.027166
| 0.029119
| 0.01247
| 0.894385
| 0.891987
| 0.887568
| 0.881333
| 0.87664
| 0.865575
| 0
| 0.005785
| 0.252962
| 46,513
| 972
| 265
| 47.852881
| 0.834317
| 0.284974
| 0
| 0.816587
| 0
| 0
| 0.126517
| 0.065751
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0.00638
| 0.017544
| 0
| 0.140351
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
ff95fd3a0b7b4a397fe2aa271b7a4e73e5fb94cf
| 30,340
|
py
|
Python
|
Face Reconstruction/Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency/src_common/geometry/render/api_tf_mesh_render.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 302
|
2020-07-15T11:42:08.000Z
|
2022-03-29T15:22:00.000Z
|
Face Reconstruction/Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency/src_common/geometry/render/api_tf_mesh_render.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 704
|
2020-09-30T10:44:13.000Z
|
2022-03-30T07:18:28.000Z
|
Face Reconstruction/Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency/src_common/geometry/render/api_tf_mesh_render.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 342
|
2020-10-02T14:04:49.000Z
|
2022-03-31T10:14:20.000Z
|
# system
from __future__ import print_function
# python lib
import math
from copy import deepcopy
import numpy as np
# tf_render
import tensorflow as tf
# self
from thirdParty.tf_mesh_renderer.mesh_renderer.mesh_renderer import phong_shader, tone_mapper
from thirdParty.tf_mesh_renderer.mesh_renderer.rasterize_triangles import rasterize_triangles
# perspective
def mesh_renderer_camera_light(vertices, triangles, normals, diffuse_colors,
mtx_camera, mtx_perspective_frustrum, camera_position,
image_width, image_height):
"""Renders an input scene using phong shading, and returns an output image.
Args:
vertices: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is an xyz position in world space.
triangles: 2-D int32 tensor with shape [triangle_count, 3]. Each triplet
should contain vertex indices describing a triangle such that the
triangle's normal points toward the viewer if the forward order of the
triplet defines a clockwise winding of the vertices. Gradients with
respect to this tensor are not available.
normals: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is the xyz vertex normal for its corresponding vertex. Each
vector is assumed to be already normalized.
diffuse_colors: 3-D float32 tensor with shape [batch_size,
vertex_count, 3]. The RGB diffuse reflection in the range [0,1] for
each vertex.
mtx_camera: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the camera model view matrix
mtx_perspective_frustrum: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the perspective and frustrum matrix
camera_position: 2-D tensor with shape [batch_size, 3] or 1-D tensor with
shape [3] specifying the XYZ world space camera position.
light_intensities: a 3-D tensor with shape [batch_size, light_count, 3]. The
RGB intensity values for each light. Intensities may be above one.
image_width: int specifying desired output image width in pixels.
image_height: int specifying desired output image height in pixels.
Returns:
A 4-D float32 tensor of shape [batch_size, image_height, image_width, 4]
containing the lit RGBA color values for each image at each pixel. RGB
colors are the intensity values before tonemapping and can be in the range
[0, infinity]. Clipping to the range [0,1] with tf_render.clip_by_value is likely
reasonable for both viewing and training most scenes. More complex scenes
with multiple lights should tone map color values for display only. One
simple tonemapping approach is to rescale color values as x/(1+x); gamma
compression is another common techinque. Alpha values are zero for
background pixels and near one for mesh pixels.
Raises:
ValueError: An invalid argument to the method is detected.
"""
if len(vertices.shape) != 3:
raise ValueError('Vertices must have shape [batch_size, vertex_count, 3].')
batch_size = vertices.shape[0].value
if len(normals.shape) != 3:
raise ValueError('Normals must have shape [batch_size, vertex_count, 3].')
if len(diffuse_colors.shape) != 3:
raise ValueError(
'vertex_diffuse_colors must have shape [batch_size, vertex_count, 3].')
if camera_position.get_shape().as_list() == [3]:
camera_position = tf.tile(
tf.expand_dims(camera_position, axis=0), [batch_size, 1])
elif camera_position.get_shape().as_list() != [batch_size, 3]:
raise ValueError('Camera_position must have shape [batch_size, 3]')
# TODO: Debug Shape
if mtx_camera.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_camera, axis=0), [batch_size, 1, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if mtx_perspective_frustrum.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_perspective_frustrum, axis=0), [batch_size, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
vertex_attributes = tf.concat([normals, vertices, diffuse_colors], axis=2)
clip_space_transforms = tf.matmul(mtx_perspective_frustrum, mtx_camera, name="mtx_clip_space_transforms_batch")
pixel_attributes, alpha, tri_ids = rasterize_triangles(
vertices, vertex_attributes, triangles, clip_space_transforms,
image_width, image_height, [-1] * vertex_attributes.shape[2].value)
# Extract the interpolated vertex attributes from the pixel buffer and
# supply them to the shader:
#pixel_normals = tf.nn.l2_normalize(pixel_attributes[:, :, :, 0:3], dim=3)
#pixel_positions = pixel_attributes[:, :, :, 3:6]
diffuse_colors = pixel_attributes[:, :, :, 6:9]
diffuse_colors = tf.reverse(diffuse_colors, axis=[1])
#return renders, pixel_mask
pixel_mask = alpha > 0.5
pixel_mask = tf.cast(pixel_mask, dtype=tf.float32)
pixel_mask = tf.reverse(pixel_mask, axis=[1])
#
tri_ids = tf.expand_dims(tri_ids, -1)
return diffuse_colors, pixel_mask, tri_ids
def mesh_renderer_camera(vertices, triangles, normals, diffuse_colors,
mtx_camera, mtx_perspective_frustrum, camera_position,
light_positions, light_intensities, image_width, image_height,
specular_colors=None, shininess_coefficients=None, ambient_color=None, background=-1
):
"""Renders an input scene using phong shading, and returns an output image.
Args:
vertices: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is an xyz position in world space.
triangles: 2-D int32 tensor with shape [triangle_count, 3]. Each triplet
should contain vertex indices describing a triangle such that the
triangle's normal points toward the viewer if the forward order of the
triplet defines a clockwise winding of the vertices. Gradients with
respect to this tensor are not available.
normals: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is the xyz vertex normal for its corresponding vertex. Each
vector is assumed to be already normalized.
diffuse_colors: 3-D float32 tensor with shape [batch_size,
vertex_count, 3]. The RGB diffuse reflection in the range [0,1] for
each vertex.
mtx_camera: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the camera model view matrix
mtx_perspective_frustrum: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the perspective and frustrum matrix
camera_position: 2-D tensor with shape [batch_size, 3] or 1-D tensor with
shape [3] specifying the XYZ world space camera position.
light_positions: a 3-D tensor with shape [batch_size, light_count, 3]. The
XYZ position of each light in the scene. In the same coordinate space as
pixel_positions.
light_intensities: a 3-D tensor with shape [batch_size, light_count, 3]. The
RGB intensity values for each light. Intensities may be above one.
image_width: int specifying desired output image width in pixels.
image_height: int specifying desired output image height in pixels.
specular_colors: 3-D float32 tensor with shape [batch_size,
vertex_count, 3]. The RGB specular reflection in the range [0, 1] for
each vertex. If supplied, specular reflections will be computed, and
both specular_colors and shininess_coefficients are expected.
shininess_coefficients: a 0D-2D float32 tensor with maximum shape
[batch_size, vertex_count]. The phong shininess coefficient of each
vertex. A 0D tensor or float gives a constant shininess coefficient
across all batches and images. A 1D tensor must have shape [batch_size],
and a single shininess coefficient per image is used.
ambient_color: a 2D tensor with shape [batch_size, 3]. The RGB ambient
color, which is added to each pixel in the scene. If None, it is
assumed to be black.
Returns:
A 4-D float32 tensor of shape [batch_size, image_height, image_width, 4]
containing the lit RGBA color values for each image at each pixel. RGB
colors are the intensity values before tonemapping and can be in the range
[0, infinity]. Clipping to the range [0,1] with tf_render.clip_by_value is likely
reasonable for both viewing and training most scenes. More complex scenes
with multiple lights should tone map color values for display only. One
simple tonemapping approach is to rescale color values as x/(1+x); gamma
compression is another common techinque. Alpha values are zero for
background pixels and near one for mesh pixels.
Raises:
ValueError: An invalid argument to the method is detected.
"""
if len(vertices.shape) != 3:
raise ValueError('Vertices must have shape [batch_size, vertex_count, 3].')
batch_size = vertices.shape[0].value
if len(normals.shape) != 3:
raise ValueError('Normals must have shape [batch_size, vertex_count, 3].')
if len(light_positions.shape) != 3:
raise ValueError(
'Light_positions must have shape [batch_size, light_count, 3].')
if len(light_intensities.shape) != 3:
raise ValueError(
'Light_intensities must have shape [batch_size, light_count, 3].')
if len(diffuse_colors.shape) != 3:
raise ValueError(
'vertex_diffuse_colors must have shape [batch_size, vertex_count, 3].')
if (ambient_color is not None and
ambient_color.get_shape().as_list() != [batch_size, 3]):
raise ValueError('Ambient_color must have shape [batch_size, 3].')
if camera_position.get_shape().as_list() == [3]:
camera_position = tf.tile(
tf.expand_dims(camera_position, axis=0), [batch_size, 1])
elif camera_position.get_shape().as_list() != [batch_size, 3]:
raise ValueError('Camera_position must have shape [batch_size, 3]')
# TODO: Debug Shape
if mtx_camera.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_camera, axis=0), [batch_size, 1, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if mtx_perspective_frustrum.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_perspective_frustrum, axis=0), [batch_size, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if specular_colors is not None and shininess_coefficients is None:
raise ValueError(
'Specular colors were supplied without shininess coefficients.')
if shininess_coefficients is not None and specular_colors is None:
raise ValueError(
'Shininess coefficients were supplied without specular colors.')
if specular_colors is not None:
# Since a 0-D float32 tensor is accepted, also accept a float.
if isinstance(shininess_coefficients, float):
shininess_coefficients = tf.constant(
shininess_coefficients, dtype=tf.float32)
if len(specular_colors.shape) != 3:
raise ValueError('The specular colors must have shape [batch_size, '
'vertex_count, 3].')
if len(shininess_coefficients.shape) > 2:
raise ValueError('The shininess coefficients must have shape at most'
'[batch_size, vertex_count].')
# If we don't have per-vertex coefficients, we can just reshape the
# input shininess to broadcast later, rather than interpolating an
# additional vertex attribute:
if len(shininess_coefficients.shape) < 2:
vertex_attributes = tf.concat(
[normals, vertices, diffuse_colors, specular_colors], axis=2)
else:
vertex_attributes = tf.concat(
[
normals, vertices, diffuse_colors, specular_colors,
tf.expand_dims(shininess_coefficients, axis=2)
],
axis=2)
else:
vertex_attributes = tf.concat([normals, vertices, diffuse_colors], axis=2)
# camera_matrices = camera_utils.look_at(camera_position, camera_lookat,
# camera_up)
#
# perspective_transforms = camera_utils.perspective(image_width / image_height,
# fov_y, near_clip, far_clip)
clip_space_transforms = tf.matmul(mtx_perspective_frustrum, mtx_camera, name="mtx_clip_space_transforms_batch")
pixel_attributes, alpha, tri_ids = rasterize_triangles(
vertices, vertex_attributes, triangles, clip_space_transforms,
image_width, image_height, [background] * vertex_attributes.shape[2].value)
# Extract the interpolated vertex attributes from the pixel buffer and
# supply them to the shader:
pixel_normals = tf.nn.l2_normalize(pixel_attributes[:, :, :, 0:3], dim=3)
pixel_positions = pixel_attributes[:, :, :, 3:6]
diffuse_colors = pixel_attributes[:, :, :, 6:9]
if specular_colors is not None:
specular_colors = pixel_attributes[:, :, :, 9:12]
# Retrieve the interpolated shininess coefficients if necessary, or just
# reshape our input for broadcasting:
if len(shininess_coefficients.shape) == 2:
shininess_coefficients = pixel_attributes[:, :, :, 12]
else:
shininess_coefficients = tf.reshape(shininess_coefficients, [-1, 1, 1])
pixel_mask = tf.cast(tf.reduce_any(diffuse_colors >= 0, axis=3), tf.float32)
renders = phong_shader(
normals=pixel_normals,
alphas=pixel_mask,
pixel_positions=pixel_positions,
light_positions=light_positions,
light_intensities=light_intensities,
diffuse_colors=diffuse_colors,
camera_position=camera_position if specular_colors is not None else None,
specular_colors=specular_colors,
shininess_coefficients=shininess_coefficients,
ambient_color=ambient_color)
#return renders, pixel_mask
pixel_mask = alpha > 0.5
pixel_mask = tf.cast(pixel_mask, dtype=tf.float32)
pixel_mask = tf.reverse(pixel_mask, axis=[1])
return renders, pixel_mask
def mesh_depthmap_camera(vertices, triangles, mtx_ext,
mtx_camera, mtx_perspective_frustrum,
image_width, image_height
):
"""Renders an input scene using phong shading, and returns an output image.
Args:
vertices: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is an xyz position in world space.
triangles: 2-D int32 tensor with shape [triangle_count, 3]. Each triplet
should contain vertex indices describing a triangle such that the
triangle's normal points toward the viewer if the forward order of the
triplet defines a clockwise winding of the vertices. Gradients with
respect to this tensor are not available.
normals: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is the xyz vertex normal for its corresponding vertex. Each
vector is assumed to be already normalized.
mtx_camera: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the camera model view matrix
mtx_perspective_frustrum: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the perspective and frustrum matrix
camera_position: 2-D tensor with shape [batch_size, 3] or 1-D tensor with
shape [3] specifying the XYZ world space camera position.
image_width: int specifying desired output image width in pixels.
image_height: int specifying desired output image height in pixels.
Returns:
A 4-D float32 tensor of shape [batch_size, image_height, image_width, 4]
containing the lit RGBA color values for each image at each pixel. RGB
colors are the intensity values before tonemapping and can be in the range
[0, infinity]. Clipping to the range [0,1] with tf_render.clip_by_value is likely
reasonable for both viewing and training most scenes. More complex scenes
with multiple lights should tone map color values for display only. One
simple tonemapping approach is to rescale color values as x/(1+x); gamma
compression is another common techinque. Alpha values are zero for
background pixels and near one for mesh pixels.
Raises:
ValueError: An invalid argument to the method is detected.
"""
if len(vertices.shape) != 3:
raise ValueError('Vertices must have shape [batch_size, vertex_count, 3].')
batch_size = vertices.shape[0].value
# TODO: Debug Shape
if mtx_camera.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_camera, axis=0), [batch_size, 1, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if mtx_perspective_frustrum.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_perspective_frustrum, axis=0), [batch_size, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
# vertex attribute of depthmap is only z
vertex_attributes = vertices
#vertex_attributes = tf_render.expand_dims(vertex_attributes, -1)
# camera_matrices = camera_utils.look_at(camera_position, camera_lookat,
# camera_up)
#
# perspective_transforms = camera_utils.perspective(image_width / image_height,
# fov_y, near_clip, far_clip)
clip_space_transforms = tf.matmul(mtx_perspective_frustrum, mtx_camera, name="mtx_clip_space_transforms_batch")
pixel_attributes, alpha, _ = rasterize_triangles(
vertices, vertex_attributes, triangles, clip_space_transforms,
image_width, image_height, [99999999] * vertex_attributes.shape[2].value)
# Extract the interpolated vertex attributes from the pixel buffer and
# supply them to the shader:
filler_homo = tf.ones(shape=[pixel_attributes.shape[0], pixel_attributes.shape[1], pixel_attributes.shape[2], 1])
pixel_attributes = tf.concat([pixel_attributes, filler_homo], axis=3)
pixel_attributes = tf.reshape(pixel_attributes, shape=[batch_size, -1, 4])
pixel_attributes = tf.transpose(pixel_attributes, perm=[0, 2, 1])
pixel_attributes = tf.matmul(mtx_ext, pixel_attributes)
pixel_attributes = tf.transpose(pixel_attributes, perm=[0, 2, 1])
pixel_attributes = tf.reshape(pixel_attributes, shape=[batch_size, image_height, image_width, 4])
depth_map = pixel_attributes[:, :, :, 2]
pixel_mask = alpha > 0.5
pixel_mask = tf.cast(pixel_mask, dtype=tf.float32)
depth_map = tf.reverse(depth_map, axis=[1])
pixel_mask = tf.reverse(pixel_mask, axis=[1])
return depth_map, pixel_mask
# ortho
def mesh_rendererOrtho_camera(vertices, triangles, normals, diffuse_colors,
mtx_camera, mtx_perspective_frustrum, light_positions, light_intensities,
image_width, image_height, ambient_color=None, background=-1
):
"""Renders an input scene using phong shading, and returns an output image.
Args:
vertices: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is an xyz position in world space.
triangles: 2-D int32 tensor with shape [triangle_count, 3]. Each triplet
should contain vertex indices describing a triangle such that the
triangle's normal points toward the viewer if the forward order of the
triplet defines a clockwise winding of the vertices. Gradients with
respect to this tensor are not available.
normals: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is the xyz vertex normal for its corresponding vertex. Each
vector is assumed to be already normalized.
diffuse_colors: 3-D float32 tensor with shape [batch_size,
vertex_count, 3]. The RGB diffuse reflection in the range [0,1] for
each vertex.
mtx_camera: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the camera model view matrix
mtx_perspective_frustrum: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the perspective and frustrum matrix
camera_position: 2-D tensor with shape [batch_size, 3] or 1-D tensor with
shape [3] specifying the XYZ world space camera position.
light_positions: a 3-D tensor with shape [batch_size, light_count, 3]. The
XYZ position of each light in the scene. In the same coordinate space as
pixel_positions.
light_intensities: a 3-D tensor with shape [batch_size, light_count, 3]. The
RGB intensity values for each light. Intensities may be above one.
image_width: int specifying desired output image width in pixels.
image_height: int specifying desired output image height in pixels.
specular_colors: 3-D float32 tensor with shape [batch_size,
vertex_count, 3]. The RGB specular reflection in the range [0, 1] for
each vertex. If supplied, specular reflections will be computed, and
both specular_colors and shininess_coefficients are expected.
shininess_coefficients: a 0D-2D float32 tensor with maximum shape
[batch_size, vertex_count]. The phong shininess coefficient of each
vertex. A 0D tensor or float gives a constant shininess coefficient
across all batches and images. A 1D tensor must have shape [batch_size],
and a single shininess coefficient per image is used.
ambient_color: a 2D tensor with shape [batch_size, 3]. The RGB ambient
color, which is added to each pixel in the scene. If None, it is
assumed to be black.
Returns:
A 4-D float32 tensor of shape [batch_size, image_height, image_width, 4]
containing the lit RGBA color values for each image at each pixel. RGB
colors are the intensity values before tonemapping and can be in the range
[0, infinity]. Clipping to the range [0,1] with tf_render.clip_by_value is likely
reasonable for both viewing and training most scenes. More complex scenes
with multiple lights should tone map color values for display only. One
simple tonemapping approach is to rescale color values as x/(1+x); gamma
compression is another common techinque. Alpha values are zero for
background pixels and near one for mesh pixels.
Raises:
ValueError: An invalid argument to the method is detected.
"""
if len(vertices.shape) != 3:
raise ValueError('Vertices must have shape [batch_size, vertex_count, 3].')
batch_size = vertices.shape[0].value
if len(normals.shape) != 3:
raise ValueError('Normals must have shape [batch_size, vertex_count, 3].')
if len(light_positions.shape) != 3:
raise ValueError(
'Light_positions must have shape [batch_size, light_count, 3].')
if len(light_intensities.shape) != 3:
raise ValueError(
'Light_intensities must have shape [batch_size, light_count, 3].')
if len(diffuse_colors.shape) != 3:
raise ValueError(
'vertex_diffuse_colors must have shape [batch_size, vertex_count, 3].')
if (ambient_color is not None and
ambient_color.get_shape().as_list() != [batch_size, 3]):
raise ValueError('Ambient_color must have shape [batch_size, 3].')
# TODO: Debug Shape
if mtx_camera.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_camera, axis=0), [batch_size, 1, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if mtx_perspective_frustrum.get_shape().as_list() == [4, 4]:
mtx_camera = tf.tile(
tf.expand_dims(mtx_perspective_frustrum, axis=0), [batch_size, 1])
elif mtx_camera.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
vertex_attributes = tf.concat([normals, vertices, diffuse_colors], axis=2)
clip_space_transforms = tf.matmul(mtx_perspective_frustrum, mtx_camera, name="mtx_clip_space_transforms_batch")
pixel_attributes, alpha, tri_ids = rasterize_triangles(
vertices, vertex_attributes, triangles, clip_space_transforms,
image_width, image_height, [background] * vertex_attributes.shape[2].value)
# Extract the interpolated vertex attributes from the pixel buffer and
# supply them to the shader:
pixel_normals = tf.nn.l2_normalize(pixel_attributes[:, :, :, 0:3], dim=3)
pixel_positions = pixel_attributes[:, :, :, 3:6]
diffuse_colors = pixel_attributes[:, :, :, 6:9]
pixel_mask = tf.cast(tf.reduce_any(diffuse_colors >= 0, axis=3), tf.float32)
renders = phong_shader(
normals=pixel_normals,
alphas=pixel_mask,
pixel_positions=pixel_positions,
light_positions=light_positions,
light_intensities=light_intensities,
diffuse_colors=diffuse_colors,
camera_position=None,
specular_colors=None,
shininess_coefficients=None,
ambient_color=ambient_color)
#return renders, pixel_mask
pixel_mask = alpha > 0.5
pixel_mask = tf.cast(pixel_mask, dtype=tf.float32)
pixel_mask = tf.reverse(pixel_mask, axis=[1])
return renders, pixel_mask
def mesh_depthmapOrtho_camera(vertices, triangles,
mtx_ext, mtx_perspective_frustrum, image_width, image_height
):
"""Renders an input scene using phong shading, and returns an output image.
Args:
vertices: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is an xyz position in world space.
triangles: 2-D int32 tensor with shape [triangle_count, 3]. Each triplet
should contain vertex indices describing a triangle such that the
triangle's normal points toward the viewer if the forward order of the
triplet defines a clockwise winding of the vertices. Gradients with
respect to this tensor are not available.
normals: 3-D float32 tensor with shape [batch_size, vertex_count, 3]. Each
triplet is the xyz vertex normal for its corresponding vertex. Each
vector is assumed to be already normalized.
mtx_camera: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the camera model view matrix
mtx_perspective_frustrum: 3-D tensor with shape [batch_size, 4, 4] or 2-D tensor with
shape [4, 4] specifying the perspective and frustrum matrix
camera_position: 2-D tensor with shape [batch_size, 3] or 1-D tensor with
shape [3] specifying the XYZ world space camera position.
image_width: int specifying desired output image width in pixels.
image_height: int specifying desired output image height in pixels.
Returns:
A 4-D float32 tensor of shape [batch_size, image_height, image_width, 4]
containing the lit RGBA color values for each image at each pixel. RGB
colors are the intensity values before tonemapping and can be in the range
[0, infinity]. Clipping to the range [0,1] with tf_render.clip_by_value is likely
reasonable for both viewing and training most scenes. More complex scenes
with multiple lights should tone map color values for display only. One
simple tonemapping approach is to rescale color values as x/(1+x); gamma
compression is another common techinque. Alpha values are zero for
background pixels and near one for mesh pixels.
Raises:
ValueError: An invalid argument to the method is detected.
"""
if len(vertices.shape) != 3:
raise ValueError('Vertices must have shape [batch_size, vertex_count, 3].')
batch_size = vertices.shape[0].value
# TODO: Debug Shape
if mtx_ext.get_shape().as_list() == [4, 4]:
mtx_ext = tf.tile(
tf.expand_dims(mtx_ext, axis=0), [batch_size, 1, 1])
elif mtx_ext.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
if mtx_perspective_frustrum.get_shape().as_list() == [4, 4]:
mtx_perspective_frustrum = tf.tile(
tf.expand_dims(mtx_perspective_frustrum, axis=0), [batch_size, 1])
elif mtx_perspective_frustrum.get_shape().as_list() != [batch_size, 4, 4]:
raise ValueError('Camera_lookat must have shape [batch_size, 4, 4]')
# vertex attribute of depthmap is only z
vertex_attributes = vertices
#vertex_attributes = tf_render.expand_dims(vertex_attributes, -1)
# camera_matrices = camera_utils.look_at(camera_position, camera_lookat,
# camera_up)
#
# perspective_transforms = camera_utils.perspective(image_width / image_height,
# fov_y, near_clip, far_clip)
clip_space_transforms = tf.matmul(mtx_perspective_frustrum, mtx_ext, name="mtx_clip_space_transforms_batch")
pixel_attributes, alpha, _ = rasterize_triangles(
vertices, vertex_attributes, triangles, clip_space_transforms,
image_width, image_height, [99999999] * vertex_attributes.shape[2].value)
# Extract the interpolated vertex attributes from the pixel buffer and
# supply them to the shader:
filler_homo = tf.ones(shape=[pixel_attributes.shape[0], pixel_attributes.shape[1], pixel_attributes.shape[2], 1])
pixel_attributes = tf.concat([pixel_attributes, filler_homo], axis=3)
pixel_attributes = tf.reshape(pixel_attributes, shape=[batch_size, -1, 4])
pixel_attributes = tf.transpose(pixel_attributes, perm=[0, 2, 1])
pixel_attributes = tf.matmul(mtx_ext, pixel_attributes)
pixel_attributes = tf.transpose(pixel_attributes, perm=[0, 2, 1])
pixel_attributes = tf.reshape(pixel_attributes, shape=[batch_size, image_height, image_width, 4])
depth_map = pixel_attributes[:, :, :, 2]
pixel_mask = alpha > 0.5
pixel_mask = tf.cast(pixel_mask, dtype=tf.float32)
depth_map = tf.reverse(depth_map, axis=[1])
pixel_mask = tf.reverse(pixel_mask, axis=[1])
return depth_map, pixel_mask
| 49.17342
| 115
| 0.716777
| 4,378
| 30,340
| 4.788716
| 0.066469
| 0.04808
| 0.053422
| 0.035297
| 0.93389
| 0.932316
| 0.918865
| 0.913236
| 0.903172
| 0.903172
| 0
| 0.021124
| 0.20267
| 30,340
| 617
| 116
| 49.17342
| 0.845521
| 0.505537
| 0
| 0.768061
| 0
| 0
| 0.136113
| 0.015024
| 0
| 0
| 0
| 0.008104
| 0
| 1
| 0.019011
| false
| 0
| 0.026616
| 0
| 0.064639
| 0.003802
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
440b2b00898f77a6e10d2b8d766330f2bdee3457
| 68,682
|
py
|
Python
|
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/cmp_GemsFDTD/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/cmp_GemsFDTD/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
benchmarks/SimResults/_bigLittle_hrrs_spec_tugberk_ml/SystemIPC_2/cmp_GemsFDTD/power.py
|
TugberkArkose/MLScheduler
|
e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061
|
[
"Unlicense"
] | null | null | null |
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate Leakage': 0.00662954,
'Peak Dynamic': 0.0,
'Runtime Dynamic': 0.0,
'Subthreshold Leakage': 0.0691322,
'Subthreshold Leakage with power gating': 0.0259246},
'Core': [{'Area': 32.6082,
'Execution Unit/Area': 8.2042,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0615522,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.251035,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.364373,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.122718,
'Execution Unit/Instruction Scheduler/Area': 2.17927,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.328073,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.00115349,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.20978,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.189927,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.017004,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00962066,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00730101,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 1.00996,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00529112,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 2.07911,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.328886,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0800117,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0455351,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 4.84781,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.841232,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.000856399,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.55892,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.188625,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.0178624,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00897339,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.707438,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.114878,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.0641291,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.131872,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 5.75365,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0688379,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00688502,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0715316,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0509189,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.14037,
'Execution Unit/Register Files/Runtime Dynamic': 0.057804,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0442632,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00607074,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.189713,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.537473,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.0920413,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0345155,
'Execution Unit/Runtime Dynamic': 1.95913,
'Execution Unit/Subthreshold Leakage': 1.83518,
'Execution Unit/Subthreshold Leakage with power gating': 0.709678,
'Gate Leakage': 0.372997,
'Instruction Fetch Unit/Area': 5.86007,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 0.000131425,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 0.000131425,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 0.000113736,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 4.36269e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000731455,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.00110804,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.00128637,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0590479,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0489497,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 3.11362,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.119108,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.166255,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 5.48556,
'Instruction Fetch Unit/Runtime Dynamic': 0.336707,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932587,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.408542,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.141075,
'L2/Runtime Dynamic': 0.0366513,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80969,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 3.30829,
'Load Store Unit/Data Cache/Runtime Dynamic': 1.04115,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0351387,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0670072,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0670072,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 3.626,
'Load Store Unit/Runtime Dynamic': 1.43862,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.165228,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.330457,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591622,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283406,
'Memory Management Unit/Area': 0.434579,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0586401,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0607512,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00813591,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.193593,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0195491,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.453469,
'Memory Management Unit/Runtime Dynamic': 0.0803003,
'Memory Management Unit/Subthreshold Leakage': 0.0769113,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0399462,
'Peak Dynamic': 20.0214,
'Renaming Unit/Area': 0.369768,
'Renaming Unit/FP Front End RAT/Area': 0.168486,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00489731,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 3.33511,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.240161,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0437281,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.024925,
'Renaming Unit/Free List/Area': 0.0414755,
'Renaming Unit/Free List/Gate Leakage': 4.15911e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0401324,
'Renaming Unit/Free List/Runtime Dynamic': 0.0126018,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000670426,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000377987,
'Renaming Unit/Gate Leakage': 0.00863632,
'Renaming Unit/Int Front End RAT/Area': 0.114751,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.00038343,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.86945,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0960641,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00611897,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781,
'Renaming Unit/Peak Dynamic': 4.56169,
'Renaming Unit/Runtime Dynamic': 0.348827,
'Renaming Unit/Subthreshold Leakage': 0.070483,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779,
'Runtime Dynamic': 4.20023,
'Subthreshold Leakage': 6.21877,
'Subthreshold Leakage with power gating': 2.58311},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0283133,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.224927,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.147891,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.056089,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0904695,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.045666,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.192225,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0414757,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.1673,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0279397,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00235263,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0278161,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0173991,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0557559,
'Execution Unit/Register Files/Runtime Dynamic': 0.0197517,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0656807,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.170502,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 1.01278,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 4.01195e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 4.01195e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 3.4907e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.34928e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.00024994,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000365086,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000385987,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0167262,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 1.06393,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0389778,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0568097,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.33408,
'Instruction Fetch Unit/Runtime Dynamic': 0.113265,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0431929,
'L2/Runtime Dynamic': 0.0133415,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.94103,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.356665,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.022773,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0227729,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 2.04856,
'Load Store Unit/Runtime Dynamic': 0.491746,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0561544,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.112308,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0199294,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0205755,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0661511,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00639738,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.256495,
'Memory Management Unit/Runtime Dynamic': 0.0269728,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 13.4391,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0734969,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00342502,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0274434,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.104365,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.76247,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0215805,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.219639,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.131279,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0526619,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0849416,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0428757,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.180479,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0401025,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.12402,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0248013,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00220887,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.023453,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.016336,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.0482543,
'Execution Unit/Register Files/Runtime Dynamic': 0.0185449,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0548052,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.155662,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.979702,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 4.35133e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 4.35133e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 3.77511e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.45326e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000234668,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000359445,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000422522,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0157042,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 0.99892,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0386381,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0533385,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.26591,
'Instruction Fetch Unit/Runtime Dynamic': 0.108463,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0431776,
'L2/Runtime Dynamic': 0.0123726,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.89103,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.331189,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0211555,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0211555,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.99093,
'Load Store Unit/Runtime Dynamic': 0.456677,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0521659,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.104332,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0185138,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0191604,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0621092,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.0063403,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.250022,
'Memory Management Unit/Runtime Dynamic': 0.0255007,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 13.2635,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0652409,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00316993,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0258901,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.094301,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.67702,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328},
{'Area': 32.0201,
'Execution Unit/Area': 7.68434,
'Execution Unit/Complex ALUs/Area': 0.235435,
'Execution Unit/Complex ALUs/Gate Leakage': 0.0132646,
'Execution Unit/Complex ALUs/Peak Dynamic': 0.0209712,
'Execution Unit/Complex ALUs/Runtime Dynamic': 0.219161,
'Execution Unit/Complex ALUs/Subthreshold Leakage': 0.20111,
'Execution Unit/Complex ALUs/Subthreshold Leakage with power gating': 0.0754163,
'Execution Unit/Floating Point Units/Area': 4.6585,
'Execution Unit/Floating Point Units/Gate Leakage': 0.0656156,
'Execution Unit/Floating Point Units/Peak Dynamic': 0.128627,
'Execution Unit/Floating Point Units/Runtime Dynamic': 0.304033,
'Execution Unit/Floating Point Units/Subthreshold Leakage': 0.994829,
'Execution Unit/Floating Point Units/Subthreshold Leakage with power gating': 0.373061,
'Execution Unit/Gate Leakage': 0.120359,
'Execution Unit/Instruction Scheduler/Area': 1.66526,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Area': 0.275653,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Gate Leakage': 0.000977433,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Peak Dynamic': 1.04181,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Runtime Dynamic': 0.0509425,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage': 0.0143453,
'Execution Unit/Instruction Scheduler/FP Instruction Window/Subthreshold Leakage with power gating': 0.00810519,
'Execution Unit/Instruction Scheduler/Gate Leakage': 0.00568913,
'Execution Unit/Instruction Scheduler/Instruction Window/Area': 0.805223,
'Execution Unit/Instruction Scheduler/Instruction Window/Gate Leakage': 0.00414562,
'Execution Unit/Instruction Scheduler/Instruction Window/Peak Dynamic': 1.6763,
'Execution Unit/Instruction Scheduler/Instruction Window/Runtime Dynamic': 0.0821684,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage': 0.0625755,
'Execution Unit/Instruction Scheduler/Instruction Window/Subthreshold Leakage with power gating': 0.0355964,
'Execution Unit/Instruction Scheduler/Peak Dynamic': 3.82262,
'Execution Unit/Instruction Scheduler/ROB/Area': 0.584388,
'Execution Unit/Instruction Scheduler/ROB/Gate Leakage': 0.00056608,
'Execution Unit/Instruction Scheduler/ROB/Peak Dynamic': 1.10451,
'Execution Unit/Instruction Scheduler/ROB/Runtime Dynamic': 0.0414758,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage': 0.00906853,
'Execution Unit/Instruction Scheduler/ROB/Subthreshold Leakage with power gating': 0.00364446,
'Execution Unit/Instruction Scheduler/Runtime Dynamic': 0.174587,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage': 0.0859892,
'Execution Unit/Instruction Scheduler/Subthreshold Leakage with power gating': 0.047346,
'Execution Unit/Integer ALUs/Area': 0.47087,
'Execution Unit/Integer ALUs/Gate Leakage': 0.0265291,
'Execution Unit/Integer ALUs/Peak Dynamic': 0.0385432,
'Execution Unit/Integer ALUs/Runtime Dynamic': 0.101344,
'Execution Unit/Integer ALUs/Subthreshold Leakage': 0.40222,
'Execution Unit/Integer ALUs/Subthreshold Leakage with power gating': 0.150833,
'Execution Unit/Peak Dynamic': 4.11593,
'Execution Unit/Register Files/Area': 0.570804,
'Execution Unit/Register Files/Floating Point RF/Area': 0.208131,
'Execution Unit/Register Files/Floating Point RF/Gate Leakage': 0.000232788,
'Execution Unit/Register Files/Floating Point RF/Peak Dynamic': 0.0243004,
'Execution Unit/Register Files/Floating Point RF/Runtime Dynamic': 0.00213676,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage': 0.00399698,
'Execution Unit/Register Files/Floating Point RF/Subthreshold Leakage with power gating': 0.00176968,
'Execution Unit/Register Files/Gate Leakage': 0.000622708,
'Execution Unit/Register Files/Integer RF/Area': 0.362673,
'Execution Unit/Register Files/Integer RF/Gate Leakage': 0.00038992,
'Execution Unit/Register Files/Integer RF/Peak Dynamic': 0.0226775,
'Execution Unit/Register Files/Integer RF/Runtime Dynamic': 0.0158026,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage': 0.00614175,
'Execution Unit/Register Files/Integer RF/Subthreshold Leakage with power gating': 0.00246675,
'Execution Unit/Register Files/Peak Dynamic': 0.046978,
'Execution Unit/Register Files/Runtime Dynamic': 0.0179394,
'Execution Unit/Register Files/Subthreshold Leakage': 0.0101387,
'Execution Unit/Register Files/Subthreshold Leakage with power gating': 0.00423643,
'Execution Unit/Results Broadcast Bus/Area Overhead': 0.0390912,
'Execution Unit/Results Broadcast Bus/Gate Leakage': 0.00537402,
'Execution Unit/Results Broadcast Bus/Peak Dynamic': 0.0530192,
'Execution Unit/Results Broadcast Bus/Runtime Dynamic': 0.151148,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage': 0.081478,
'Execution Unit/Results Broadcast Bus/Subthreshold Leakage with power gating': 0.0305543,
'Execution Unit/Runtime Dynamic': 0.968212,
'Execution Unit/Subthreshold Leakage': 1.79543,
'Execution Unit/Subthreshold Leakage with power gating': 0.688821,
'Gate Leakage': 0.368936,
'Instruction Fetch Unit/Area': 5.85939,
'Instruction Fetch Unit/Branch Predictor/Area': 0.138516,
'Instruction Fetch Unit/Branch Predictor/Chooser/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Chooser/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Chooser/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Chooser/Runtime Dynamic': 4.29935e-05,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Chooser/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/Gate Leakage': 0.000757657,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Area': 0.0435221,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Gate Leakage': 0.000278362,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Peak Dynamic': 0.0168831,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Runtime Dynamic': 4.29935e-05,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage': 0.00759719,
'Instruction Fetch Unit/Branch Predictor/Global Predictor/Subthreshold Leakage with power gating': 0.0039236,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Area': 0.0257064,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Gate Leakage': 0.000154548,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Peak Dynamic': 0.0142575,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Runtime Dynamic': 3.73035e-05,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage': 0.00384344,
'Instruction Fetch Unit/Branch Predictor/L1_Local Predictor/Subthreshold Leakage with power gating': 0.00198631,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Area': 0.0151917,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Gate Leakage': 8.00196e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Peak Dynamic': 0.00527447,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Runtime Dynamic': 1.43622e-05,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage': 0.00181347,
'Instruction Fetch Unit/Branch Predictor/L2_Local Predictor/Subthreshold Leakage with power gating': 0.000957045,
'Instruction Fetch Unit/Branch Predictor/Peak Dynamic': 0.0597838,
'Instruction Fetch Unit/Branch Predictor/RAS/Area': 0.0105732,
'Instruction Fetch Unit/Branch Predictor/RAS/Gate Leakage': 4.63858e-05,
'Instruction Fetch Unit/Branch Predictor/RAS/Peak Dynamic': 0.0117602,
'Instruction Fetch Unit/Branch Predictor/RAS/Runtime Dynamic': 0.000227006,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage': 0.000932505,
'Instruction Fetch Unit/Branch Predictor/RAS/Subthreshold Leakage with power gating': 0.000494733,
'Instruction Fetch Unit/Branch Predictor/Runtime Dynamic': 0.000350296,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage': 0.0199703,
'Instruction Fetch Unit/Branch Predictor/Subthreshold Leakage with power gating': 0.0103282,
'Instruction Fetch Unit/Branch Target Buffer/Area': 0.64954,
'Instruction Fetch Unit/Branch Target Buffer/Gate Leakage': 0.00272758,
'Instruction Fetch Unit/Branch Target Buffer/Peak Dynamic': 0.177867,
'Instruction Fetch Unit/Branch Target Buffer/Runtime Dynamic': 0.000417352,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage': 0.0811682,
'Instruction Fetch Unit/Branch Target Buffer/Subthreshold Leakage with power gating': 0.0435357,
'Instruction Fetch Unit/Gate Leakage': 0.0589979,
'Instruction Fetch Unit/Instruction Buffer/Area': 0.0226323,
'Instruction Fetch Unit/Instruction Buffer/Gate Leakage': 6.83558e-05,
'Instruction Fetch Unit/Instruction Buffer/Peak Dynamic': 0.606827,
'Instruction Fetch Unit/Instruction Buffer/Runtime Dynamic': 0.0151915,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage': 0.00151885,
'Instruction Fetch Unit/Instruction Buffer/Subthreshold Leakage with power gating': 0.000701682,
'Instruction Fetch Unit/Instruction Cache/Area': 3.14635,
'Instruction Fetch Unit/Instruction Cache/Gate Leakage': 0.029931,
'Instruction Fetch Unit/Instruction Cache/Peak Dynamic': 0.96631,
'Instruction Fetch Unit/Instruction Cache/Runtime Dynamic': 0.0376411,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage': 0.367022,
'Instruction Fetch Unit/Instruction Cache/Subthreshold Leakage with power gating': 0.180386,
'Instruction Fetch Unit/Instruction Decoder/Area': 1.85799,
'Instruction Fetch Unit/Instruction Decoder/Gate Leakage': 0.0222493,
'Instruction Fetch Unit/Instruction Decoder/Peak Dynamic': 1.37404,
'Instruction Fetch Unit/Instruction Decoder/Runtime Dynamic': 0.0515971,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage': 0.442943,
'Instruction Fetch Unit/Instruction Decoder/Subthreshold Leakage with power gating': 0.166104,
'Instruction Fetch Unit/Peak Dynamic': 3.23172,
'Instruction Fetch Unit/Runtime Dynamic': 0.105197,
'Instruction Fetch Unit/Subthreshold Leakage': 0.932286,
'Instruction Fetch Unit/Subthreshold Leakage with power gating': 0.40843,
'L2/Area': 4.53318,
'L2/Gate Leakage': 0.015464,
'L2/Peak Dynamic': 0.0411216,
'L2/Runtime Dynamic': 0.0120555,
'L2/Subthreshold Leakage': 0.834142,
'L2/Subthreshold Leakage with power gating': 0.401066,
'Load Store Unit/Area': 8.80901,
'Load Store Unit/Data Cache/Area': 6.84535,
'Load Store Unit/Data Cache/Gate Leakage': 0.0279261,
'Load Store Unit/Data Cache/Peak Dynamic': 1.87156,
'Load Store Unit/Data Cache/Runtime Dynamic': 0.321777,
'Load Store Unit/Data Cache/Subthreshold Leakage': 0.527675,
'Load Store Unit/Data Cache/Subthreshold Leakage with power gating': 0.25085,
'Load Store Unit/Gate Leakage': 0.0350888,
'Load Store Unit/LoadQ/Area': 0.0836782,
'Load Store Unit/LoadQ/Gate Leakage': 0.00059896,
'Load Store Unit/LoadQ/Peak Dynamic': 0.0205255,
'Load Store Unit/LoadQ/Runtime Dynamic': 0.0205255,
'Load Store Unit/LoadQ/Subthreshold Leakage': 0.00941961,
'Load Store Unit/LoadQ/Subthreshold Leakage with power gating': 0.00536918,
'Load Store Unit/Peak Dynamic': 1.96848,
'Load Store Unit/Runtime Dynamic': 0.443528,
'Load Store Unit/StoreQ/Area': 0.322079,
'Load Store Unit/StoreQ/Gate Leakage': 0.00329971,
'Load Store Unit/StoreQ/Peak Dynamic': 0.0506125,
'Load Store Unit/StoreQ/Runtime Dynamic': 0.101225,
'Load Store Unit/StoreQ/Subthreshold Leakage': 0.0345621,
'Load Store Unit/StoreQ/Subthreshold Leakage with power gating': 0.0197004,
'Load Store Unit/Subthreshold Leakage': 0.591321,
'Load Store Unit/Subthreshold Leakage with power gating': 0.283293,
'Memory Management Unit/Area': 0.4339,
'Memory Management Unit/Dtlb/Area': 0.0879726,
'Memory Management Unit/Dtlb/Gate Leakage': 0.00088729,
'Memory Management Unit/Dtlb/Peak Dynamic': 0.0179625,
'Memory Management Unit/Dtlb/Runtime Dynamic': 0.0185781,
'Memory Management Unit/Dtlb/Subthreshold Leakage': 0.0155699,
'Memory Management Unit/Dtlb/Subthreshold Leakage with power gating': 0.00887485,
'Memory Management Unit/Gate Leakage': 0.00808595,
'Memory Management Unit/Itlb/Area': 0.301552,
'Memory Management Unit/Itlb/Gate Leakage': 0.00393464,
'Memory Management Unit/Itlb/Peak Dynamic': 0.0600816,
'Memory Management Unit/Itlb/Runtime Dynamic': 0.00617672,
'Memory Management Unit/Itlb/Subthreshold Leakage': 0.0413758,
'Memory Management Unit/Itlb/Subthreshold Leakage with power gating': 0.0235842,
'Memory Management Unit/Peak Dynamic': 0.247047,
'Memory Management Unit/Runtime Dynamic': 0.0247549,
'Memory Management Unit/Subthreshold Leakage': 0.0766103,
'Memory Management Unit/Subthreshold Leakage with power gating': 0.0398333,
'Peak Dynamic': 13.1938,
'Renaming Unit/Area': 0.303608,
'Renaming Unit/FP Front End RAT/Area': 0.131045,
'Renaming Unit/FP Front End RAT/Gate Leakage': 0.00351123,
'Renaming Unit/FP Front End RAT/Peak Dynamic': 2.51468,
'Renaming Unit/FP Front End RAT/Runtime Dynamic': 0.0639232,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage': 0.0308571,
'Renaming Unit/FP Front End RAT/Subthreshold Leakage with power gating': 0.0175885,
'Renaming Unit/Free List/Area': 0.0340654,
'Renaming Unit/Free List/Gate Leakage': 2.5481e-05,
'Renaming Unit/Free List/Peak Dynamic': 0.0306032,
'Renaming Unit/Free List/Runtime Dynamic': 0.00307632,
'Renaming Unit/Free List/Subthreshold Leakage': 0.000370144,
'Renaming Unit/Free List/Subthreshold Leakage with power gating': 0.000201064,
'Renaming Unit/Gate Leakage': 0.00708398,
'Renaming Unit/Int Front End RAT/Area': 0.0941223,
'Renaming Unit/Int Front End RAT/Gate Leakage': 0.000283242,
'Renaming Unit/Int Front End RAT/Peak Dynamic': 0.731965,
'Renaming Unit/Int Front End RAT/Runtime Dynamic': 0.0250125,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage': 0.00435488,
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228,
'Renaming Unit/Peak Dynamic': 3.58947,
'Renaming Unit/Runtime Dynamic': 0.0920121,
'Renaming Unit/Subthreshold Leakage': 0.0552466,
'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461,
'Runtime Dynamic': 1.64576,
'Subthreshold Leakage': 6.16288,
'Subthreshold Leakage with power gating': 2.55328}],
'DRAM': {'Area': 0,
'Gate Leakage': 0,
'Peak Dynamic': 8.52743213010311,
'Runtime Dynamic': 8.52743213010311,
'Subthreshold Leakage': 4.252,
'Subthreshold Leakage with power gating': 4.252},
'L3': [{'Area': 61.9075,
'Gate Leakage': 0.0484137,
'Peak Dynamic': 0.453471,
'Runtime Dynamic': 0.173055,
'Subthreshold Leakage': 6.80085,
'Subthreshold Leakage with power gating': 3.32364}],
'Processor': {'Area': 191.908,
'Gate Leakage': 1.53485,
'Peak Dynamic': 60.3713,
'Peak Power': 93.4836,
'Runtime Dynamic': 9.45853,
'Subthreshold Leakage': 31.5774,
'Subthreshold Leakage with power gating': 13.9484,
'Total Cores/Area': 128.669,
'Total Cores/Gate Leakage': 1.4798,
'Total Cores/Peak Dynamic': 59.9179,
'Total Cores/Runtime Dynamic': 9.28548,
'Total Cores/Subthreshold Leakage': 24.7074,
'Total Cores/Subthreshold Leakage with power gating': 10.2429,
'Total L3s/Area': 61.9075,
'Total L3s/Gate Leakage': 0.0484137,
'Total L3s/Peak Dynamic': 0.453471,
'Total L3s/Runtime Dynamic': 0.173055,
'Total L3s/Subthreshold Leakage': 6.80085,
'Total L3s/Subthreshold Leakage with power gating': 3.32364,
'Total Leakage': 33.1122,
'Total NoCs/Area': 1.33155,
'Total NoCs/Gate Leakage': 0.00662954,
'Total NoCs/Peak Dynamic': 0.0,
'Total NoCs/Runtime Dynamic': 0.0,
'Total NoCs/Subthreshold Leakage': 0.0691322,
'Total NoCs/Subthreshold Leakage with power gating': 0.0259246}}
| 75.14442
| 124
| 0.682231
| 8,095
| 68,682
| 5.782458
| 0.067326
| 0.123395
| 0.112799
| 0.093315
| 0.939349
| 0.930868
| 0.918499
| 0.886389
| 0.862185
| 0.842594
| 0
| 0.132649
| 0.224091
| 68,682
| 914
| 125
| 75.14442
| 0.745717
| 0
| 0
| 0.642232
| 0
| 0
| 0.656713
| 0.048047
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
440b2bea0a84785aefcc374b80948e6c65f3ad6e
| 7,971
|
py
|
Python
|
mail.py
|
robDaglio/dev_mail
|
d05ca14a58845901bec2c2a76001b8655325ceee
|
[
"MIT"
] | null | null | null |
mail.py
|
robDaglio/dev_mail
|
d05ca14a58845901bec2c2a76001b8655325ceee
|
[
"MIT"
] | null | null | null |
mail.py
|
robDaglio/dev_mail
|
d05ca14a58845901bec2c2a76001b8655325ceee
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import email, smtplib, ssl
from email import encoders
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
class Simple():
def __init__(self, sender, recipient, password, subject, text):
self.sender = sender
self.password = password
self.recipient = recipient
self.subject = subject
self.text = text
def send_mail(self):
message = 'Subject: {}\n\n{}'.format(self.subject, self.text)
server_connect = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server_connect.ehlo()
server_connect.login(self.sender, self.password)
server_connect.sendmail(self.sender, self.recipient, message)
class Html_Message(Simple):
def __init__(self, sender, recipient, password, subject, text, html):
Simple.__init__(self, sender, recipient, password, subject, text)
self.html = html
def send_mail(self):
SMTP_INFO = {
'host': 'smtp.gmail.com',
'port': 587,
'username': self.sender,
'password': self.password
}
SENDER_NAME = 'SYSTEM'
RECIPIENT = self.recipient
SUBJECT = self.subject
BODY_PLAIN_TEXT = self.text
BODY_HTML = self.html
message = MIMEMultipart('alternative')
message['From'] = f"{SENDER_NAME} <{SMTP_INFO['username']}>"
message['To'] = RECIPIENT
message['Subject'] = SUBJECT
#Adding the plain text email body
message.attach(MIMEText(BODY_PLAIN_TEXT, 'plain'))
#Adding the HTML email BODY_HTML
message.attach(MIMEText(BODY_HTML, 'html'))
#SMTP server connection
with smtplib.SMTP(SMTP_INFO['host'], SMTP_INFO['port']) as smtp:
#encrypt the connection
smtp.starttls()
#Logging in and sending the email:
smtp.login(SMTP_INFO['username'], SMTP_INFO['password'])
smtp.send_message(message)
class Attachment(Simple):
def __init__(self, sender, recipient, password, subject, text, attachments):
# Attachments are passed as a list
Simple.__init__(self, sender, recipient, password, subject, text)
self.attachments = attachments
def send_mail(self):
SMTP_INFO = {
'host': 'smtp.gmail.com',
'port': 587,
'username': self.sender,
'password': self.password
}
SENDER_NAME = 'SYSTEM'
RECIPIENT = self.recipient
SUBJECT = self.subject
BODY_PLAIN_TEXT = self.text
FILES = self.attachments
message = MIMEMultipart('alternative')
message['From'] = f"{SENDER_NAME} <{SMTP_INFO['username']}>"
message['To'] = RECIPIENT
message['Subject'] = SUBJECT
#Adding the plain text email body
message.attach(MIMEText(BODY_PLAIN_TEXT, 'plain'))
# Add the attachment
# Open files in binary mode
for f in FILES:
with open(f, "rb") as attached_file:
# Add file as application/octet-stream
# Email client can usually download this automatically as attachment
part = MIMEBase("application", "octet-stream")
part.set_payload(attached_file.read())
# Encode file in ASCII characters to send by email
encoders.encode_base64(part)
part.add_header(
"Content-Disposition",
f"attachment; filename={f}",
)
# Add attachment to message and convert message to string
message.attach(part)
#SMTP server connection
with smtplib.SMTP(SMTP_INFO['host'], SMTP_INFO['port']) as smtp:
#encrypt the connection
smtp.starttls()
#Logging in and sending the email:
smtp.login(SMTP_INFO['username'], SMTP_INFO['password'])
smtp.send_message(message)
class Fancy(Simple):
def __init__(self, sender, recipient, password, subject, text, attachments, html):
# Attachments are passed as a list
Simple.__init__(self, sender, recipient, password, subject, text)
self.attachments = attachments
self.html = html
def send_mail(self):
SMTP_INFO = {
'host': 'smtp.gmail.com',
'port': 587,
'username': self.sender,
'password': self.password
}
SENDER_NAME = 'SYSTEM'
RECIPIENT = self.recipient
SUBJECT = self.subject
BODY_PLAIN_TEXT = self.text
BODY_HTML = self.html
FILES = self.attachments
message = MIMEMultipart('alternative')
message['From'] = f"{SENDER_NAME} <{SMTP_INFO['username']}>"
message['To'] = RECIPIENT
message['Subject'] = SUBJECT
#Adding the plain text email body
message.attach(MIMEText(BODY_PLAIN_TEXT, 'plain'))
# Add the attachment
# Open files in binary mode
for f in FILES:
with open(f, "rb") as attached_file:
# Add file as application/octet-stream
# Email client can usually download this automatically as attachment
part = MIMEBase("application", "octet-stream")
part.set_payload(attached_file.read())
# Encode file in ASCII characters to send by email
encoders.encode_base64(part)
part.add_header(
"Content-Disposition",
f"attachment; filename={f}",
)
# Add attachment to message and convert message to string
message.attach(part)
#Adding the HTML email BODY_HTML
message.attach(MIMEText(BODY_HTML, 'html'))
#SMTP server connection
with smtplib.SMTP(SMTP_INFO['host'], SMTP_INFO['port']) as smtp:
#encrypt the connection
smtp.starttls()
#Logging in and sending the email:
smtp.login(SMTP_INFO['username'], SMTP_INFO['password'])
smtp.send_message(message)
| 41.300518
| 100
| 0.460294
| 674
| 7,971
| 5.305638
| 0.155786
| 0.040268
| 0.027405
| 0.045022
| 0.861298
| 0.861298
| 0.861298
| 0.861298
| 0.860179
| 0.818233
| 0
| 0.003738
| 0.463054
| 7,971
| 193
| 101
| 41.300518
| 0.831776
| 0.123322
| 0
| 0.760684
| 0
| 0
| 0.083764
| 0.010776
| 0
| 0
| 0
| 0
| 0
| 1
| 0.068376
| false
| 0.128205
| 0.042735
| 0
| 0.145299
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 8
|
44154cbf2d1b03cd18cf2d8b16f7231ec15eafe7
| 9,755
|
py
|
Python
|
endpoints/client_endpoint.py
|
iTecAI/XL3
|
17cc30288d6d5f53e5a269c3bff619cb65f6e1d1
|
[
"MIT"
] | null | null | null |
endpoints/client_endpoint.py
|
iTecAI/XL3
|
17cc30288d6d5f53e5a269c3bff619cb65f6e1d1
|
[
"MIT"
] | null | null | null |
endpoints/client_endpoint.py
|
iTecAI/XL3
|
17cc30288d6d5f53e5a269c3bff619cb65f6e1d1
|
[
"MIT"
] | null | null | null |
from fastapi import APIRouter, status, Request, Response
from util import *
from classes import *
from _runtime import server
import logging, random, hashlib
from pydantic import BaseModel
from models import *
logger = logging.getLogger("uvicorn.error")
router = APIRouter()
@router.post('/settings/set/{setting}/',responses={
404: {'model':SimpleResult,'description':'Connection or Setting not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'Cannot edit client settings, as the user is not logged in.','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':SimpleResult,'description':'Successful. Setting is changed','content':{'application/json':{'example':{'result':'Success.'}}}}
})
async def edit_client_settings(fingerprint: str, setting: str, model: ClientSettingsModel, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
if setting in server.connections[fingerprint].user.settings.keys():
server.connections[fingerprint].user.settings[setting] = model.value
logger.info('User '+server.connections[fingerprint].user.username+' changed a setting: '+setting+' = '+model.value)
server.connections[fingerprint].user.update()
return {'result':'Success'}
elif setting == 'email':
server.connections[fingerprint].user.username = model.value
logger.info('User '+server.connections[fingerprint].user.username+' changed a setting: '+setting+' = '+model.value)
server.connections[fingerprint].user.update()
return {'result':'Success'}
else:
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Setting '+setting+' not found.'}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.get('/settings/{setting}/',responses={
404: {'model':SimpleResult,'description':'Connection or Setting not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'Cannot get client settings, as the user is not logged in.','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':SettingResponseModel,'description':'Successful. Returns setting value.','content':{'application/json':{'example':{'result':'Success.','setting':'Setting Name','value':'Setting Value'}}}}
})
async def get_specific_client_setting(fingerprint: str, setting: str, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
if setting in server.connections[fingerprint].user.settings.keys():
return {'result':'Success','setting':setting,'value':server.connections[fingerprint].user.settings[setting]}
elif setting == 'email':
return {'result':'Success','setting':setting,'value':server.connections[fingerprint].user.email}
else:
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Setting '+setting+' not found.'}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.get('/settings/',responses={
404: {'model':SimpleResult,'description':'Connection not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'Cannot get client settings, as the user is not logged in.','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':AllSettingsResponseModel,'description':'Successful. Returns setting value.','content':{'application/json':{'example':{'result':'Success.','settings':{'Setting Name':'Setting Value','Foo':'Bar'}}}}}
})
async def get_client_settings(fingerprint: str, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
_settings = server.connections[fingerprint].user.settings.copy()
_settings['email'] = server.connections[fingerprint].user.username
return {'result':'Success','settings':_settings}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.post('/password/check/',responses={
404: {'model':SimpleResult,'description':'Connection not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'Cannot check password, as the user is not logged in.','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':PasswordCheckResponseModel,'description':'Successful. Returns whether the password matches.','content':{'application/json':{'example':{'result':'Success.','match':True}}}}
})
async def check_password(fingerprint: str, model: PasswordCheckModel, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
if server.connections[fingerprint].user.password_hash == model.hashword:
return {'result':'Success','match':True}
else:
return {'result':'Success','match':False}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.post('/password/change/',responses={
404: {'model':SimpleResult,'description':'Connection not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'Cannot change password, as the user is not logged in.','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
403: {'model':SimpleResult,'description':'Cannot change password, as the previous password provided was incorrect.','content':{'application/json':{'example':{'result':'Previous password incorrect.'}}}},
200: {'model':SimpleResult,'description':'Successful. Returns whether the password matches.','content':{'application/json':{'example':{'result':'Success.'}}}}
})
async def change_password(fingerprint: str, model: PasswordChangeModel, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
if server.connections[fingerprint].user.password_hash == model.hashword:
server.connections[fingerprint].user.password_hash = model.new_hashword
return {'result':'Success.'}
else:
response.status_code = status.HTTP_403_FORBIDDEN
return {'result':'Previous password incorrect.'}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.get('/characters/',responses={
404: {'model':SimpleResult,'description':'Connection not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'User must be logged in','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':OwnedListResponseModel,'description':'List of owned character IDs','content':{'application/json':{'example':{'result':'Success.','owned':[]}}}}
})
async def get_characters(fingerprint: str, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
return {'result':'Success.','owned':server.connections[fingerprint].user.owned_characters}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
@router.get('/campaigns/',responses={
404: {'model':SimpleResult,'description':'Connection not found','content':{'application/json':{'example.':{'result':'You must be logged in to do that.'}}}},
405: {'model':SimpleResult,'description':'User must be logged in','content':{'application/json':{'example':{'result':'User is not logged in.'}}}},
200: {'model':OwnedListResponseModel,'description':'List of owned campaign IDs','content':{'application/json':{'example':{'result':'Success.','owned':[]}}}}
})
async def get_campaigns(fingerprint: str, response: Response):
if not fingerprint in server.connections.keys():
response.status_code = status.HTTP_404_NOT_FOUND
return {'result':'Connection not found.'}
if server.connections[fingerprint].logged_in:
return {'result':'Success.','owned':server.connections[fingerprint].user.owned_campaigns}
else:
response.status_code = status.HTTP_405_METHOD_NOT_ALLOWED
return {'result':'You must be logged in to do that.'}
| 64.602649
| 215
| 0.691953
| 1,137
| 9,755
| 5.846966
| 0.104661
| 0.042118
| 0.101083
| 0.095969
| 0.845517
| 0.826264
| 0.8034
| 0.796029
| 0.77843
| 0.770758
| 0
| 0.014056
| 0.146694
| 9,755
| 151
| 216
| 64.602649
| 0.784599
| 0
| 0
| 0.639706
| 0
| 0
| 0.352604
| 0.00246
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.095588
| 0.051471
| 0
| 0.25
| 0.279412
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
443678752b66887c024d50b64ba6117d722d5682
| 93
|
py
|
Python
|
simple_playgrounds/agents/sensors/__init__.py
|
Asjidkalam/simple-playgrounds
|
72ec42987a33175103191fa9722e0e002f889954
|
[
"MIT"
] | null | null | null |
simple_playgrounds/agents/sensors/__init__.py
|
Asjidkalam/simple-playgrounds
|
72ec42987a33175103191fa9722e0e002f889954
|
[
"MIT"
] | 1
|
2021-02-19T20:55:05.000Z
|
2021-02-19T20:55:05.000Z
|
simple_playgrounds/agents/sensors/__init__.py
|
Asjidkalam/simple-playgrounds
|
72ec42987a33175103191fa9722e0e002f889954
|
[
"MIT"
] | 1
|
2021-02-19T20:46:00.000Z
|
2021-02-19T20:46:00.000Z
|
from .robotic_sensors import *
from .topdown_sensors import *
from .semantic_sensors import *
| 31
| 31
| 0.817204
| 12
| 93
| 6.083333
| 0.5
| 0.534247
| 0.465753
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11828
| 93
| 3
| 31
| 31
| 0.890244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
4473663dd67c7e81f92c9f5989e3ffbaa1a88084
| 4,333
|
py
|
Python
|
ektelo/algorithm/dawa/partition_engines/l1partition.py
|
dpcomp-org/ektelo
|
7629fbf106f9b9568c66a0b97f6005280022c3d8
|
[
"Apache-2.0"
] | 32
|
2018-07-26T23:17:05.000Z
|
2022-03-26T14:23:39.000Z
|
ektelo/algorithm/dawa/partition_engines/l1partition.py
|
ektelo/ektelo
|
53129fc417ae9b5a9830beb1229ec3e2611c5534
|
[
"Apache-2.0"
] | 3
|
2018-07-26T19:39:09.000Z
|
2020-03-20T04:19:27.000Z
|
ektelo/algorithm/dawa/partition_engines/l1partition.py
|
dpcomp-org/ektelo
|
7629fbf106f9b9568c66a0b97f6005280022c3d8
|
[
"Apache-2.0"
] | 11
|
2018-06-21T12:44:42.000Z
|
2020-11-27T15:43:57.000Z
|
from __future__ import division
from builtins import str
import numpy
import os
import sys
import logging
from ektelo.algorithm.dawa.cutils import cutil
from ektelo.algorithm.dawa.partition_engines import partition_engine
from ektelo import util
class l1partition_engine(partition_engine.partition_engine):
"""Use the L1 partition method."""
def __init__(self):
self.init_params = util.init_params_from_locals(locals())
@staticmethod
def Run(x, epsilon, ratio,seed):
return L1partition(x, epsilon, ratio, gethist=True,seed =seed)
class l1partition_approx_engine(partition_engine.partition_engine):
"""Use the approximate L1 partition method."""
def __init__(self):
self.init_params = util.init_params_from_locals(locals())
@staticmethod
def Run(x, epsilon, ratio,seed):
return L1partition_approx(x, epsilon, ratio, gethist=True,seed = seed)
def L1partition(x, epsilon, ratio=0.5, gethist=False,seed=None):
"""Compute the noisy L1 histogram using all interval buckets
Args:
x - list of numeric values. The input data vector
epsilon - double. Total private budget
ratio - double in (0, 1). use ratio*epsilon for partition computation and (1-ratio)*epsilon for querying
the count in each partition
gethist - boolean. If set to truth, return the partition directly (the privacy budget used is still ratio*epsilon)
Return:
if gethist == False, return an estimated data vector. Otherwise, return the partition
"""
assert seed is not None, "seed must be set"
prng = numpy.random.RandomState(seed)
assert (x.dtype == numpy.dtype(int) or x.dtype == numpy.dtype("int32")), "Input vector must be int! %s given" %x.dtype
y=x.astype('int32') #numpy type int32 is not not JSON serializable
check = (x ==y)
assert check.sum() == len(check), "Casting error from int to int32"
x=y
n = len(x)
hist = cutil.L1partition(n+1, x, epsilon, ratio, prng.randint(500000))
hatx = numpy.zeros(n)
rb = n
if gethist:
bucks = []
for lb in hist[1:]:
bucks.insert(0, [lb, rb-1])
rb = lb
if lb == 0:
break
logging.debug(' L1-PART: number of buckets %s' % str(bucks[:5]) )
return bucks
else:
for lb in hist[1:]:
hatx[lb:rb] = util.old_div(max(0, sum(x[lb:rb]) + prng.laplace(0, util.old_div(1.0,(epsilon*(1-ratio))), 1)), float(rb - lb))
rb = lb
if lb == 0:
break
return hatx
def L1partition_approx(x, epsilon, ratio=0.5, gethist=False,seed =None):
"""Compute the noisy L1 histogram using interval buckets of size 2^k
Args:
x - list of numeric values. The input data vector
epsilon - double. Total private budget
ratio - double in (0, 1) the use ratio*epsilon for partition computation and (1-ratio)*epsilon for querying
the count in each partition
gethist - boolean. If set to truth, return the partition directly (the privacy budget used is still ratio*epsilon)
Return:
if gethist == False, return an estimated data vector. Otherwise, return the partition
"""
assert seed is not None, "seed must be set"
prng = numpy.random.RandomState(seed)
n = len(x)
# check that the input vector x is of appropriate type
assert (x.dtype == numpy.dtype(int) or x.dtype == numpy.dtype("int32")), "Input vector must be int! %s given" %x.dtype
y=x.astype('int32') #numpy type int32 is not not JSON serializable
check = (x ==y)
assert check.sum() == len(check), "Casting error from int to int32"
x=y
hist = cutil.L1partition_approx(n+1, x, epsilon, ratio, prng.randint(500000))
hatx = numpy.zeros(n)
rb = n
if gethist:
bucks = []
for lb in hist[1:]:
bucks.insert(0, [lb, rb-1])
rb = lb
if lb == 0:
break
return bucks
else:
for lb in hist[1:]:
hatx[lb:rb] = util.old_div(max(0, sum(x[lb:rb]) + prng.laplace(0, util.old_div(1.0,(epsilon*(1-ratio))), 1)), float(rb - lb))
rb = lb
if lb == 0:
break
return hatx
| 35.227642
| 137
| 0.622432
| 614
| 4,333
| 4.333876
| 0.216612
| 0.024051
| 0.039083
| 0.024051
| 0.827884
| 0.819241
| 0.819241
| 0.763623
| 0.763623
| 0.763623
| 0
| 0.025032
| 0.271636
| 4,333
| 122
| 138
| 35.516393
| 0.818124
| 0.295869
| 0
| 0.763158
| 0
| 0
| 0.072106
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 1
| 0.078947
| false
| 0
| 0.118421
| 0.026316
| 0.302632
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
927af781b523ab4596d981b0b3ea1f993b7a9765
| 10,948
|
py
|
Python
|
app/migrations/0001_initial.py
|
Juggerj/OnlineTailor
|
a59504f2ed1b74b47aee66b2c004be347fb4b550
|
[
"MIT"
] | null | null | null |
app/migrations/0001_initial.py
|
Juggerj/OnlineTailor
|
a59504f2ed1b74b47aee66b2c004be347fb4b550
|
[
"MIT"
] | null | null | null |
app/migrations/0001_initial.py
|
Juggerj/OnlineTailor
|
a59504f2ed1b74b47aee66b2c004be347fb4b550
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2018-05-13 08:57
from __future__ import unicode_literals
import app.models
import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Customer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=191, verbose_name='\u0424\u0418\u041e')),
('phone', models.CharField(blank=True, max_length=15, verbose_name='\u0422\u0435\u043b\u0435\u0444\u043e\u043d')),
('email', models.EmailField(blank=True, max_length=100, verbose_name='Email')),
],
options={
'ordering': ('-id',),
'verbose_name': '\u041f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044c',
'verbose_name_plural': '\u041f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0438',
},
),
migrations.CreateModel(
name='Goods',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32, verbose_name='\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435')),
('price', models.PositiveIntegerField(verbose_name='\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c')),
],
options={
'verbose_name': '\u0422\u043e\u0432\u0430\u0440',
'verbose_name_plural': '\u0422\u043e\u0432\u0430\u0440\u044b',
},
),
migrations.CreateModel(
name='Lead',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(default=datetime.datetime(2018, 5, 13, 8, 57, 40, 491000, tzinfo=utc), verbose_name='\u0414\u0430\u0442\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438')),
('type', models.CharField(blank=True, choices=[('try_subscribe', '\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430, \u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0435\u043d\u0430'), ('subscribe', '\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0430'), ('unsubscribe', '\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430, \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u0430'), ('purchase', '\u041f\u043e\u043a\u0443\u043f\u043a\u0430')], default='', max_length=50, null=True, verbose_name='\u0422\u0438\u043f \u0437\u0430\u044f\u0432\u043a\u0438')),
('auth_code', models.CharField(default='0', max_length=50, verbose_name='\u041a\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438')),
('customer_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Customer', verbose_name='\u041f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044c')),
],
options={
'verbose_name': '\u0417\u0430\u044f\u0432\u043a\u0430',
'verbose_name_plural': '\u0417\u0430\u044f\u0432\u043a\u0438',
},
),
migrations.CreateModel(
name='Payments',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('pub_date', models.DateTimeField(auto_now_add=True, verbose_name='\u0412\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f')),
('shop_id', models.PositiveIntegerField(default=170735, verbose_name='ID \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430')),
('scid', models.PositiveIntegerField(default=721947, verbose_name='\u041d\u043e\u043c\u0435\u0440 \u0432\u0438\u0442\u0440\u0438\u043d\u044b')),
('customer_number', models.CharField(default=app.models.get_default_as_uuid, max_length=64, verbose_name='\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043b\u0430\u0442\u0435\u043b\u044c\u0449\u0438\u043a\u0430')),
('order_amount', models.DecimalField(decimal_places=2, max_digits=15, verbose_name='\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430')),
('payment_type', models.CharField(choices=[('PC', '\u041a\u043e\u0448\u0435\u043b\u0435\u043a \u042f\u043d\u0434\u0435\u043a\u0441.\u0414\u0435\u043d\u044c\u0433\u0438'), ('AC', '\u0411\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0430'), ('GP', '\u041d\u0430\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0441\u0441\u044b \u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044b'), ('MC', '\u0421\u0447\u0435\u0442 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430'), ('WM', '\u041a\u043e\u0448\u0435\u043b\u0435\u043a WebMoney'), ('SB', '\u0421\u0431\u0435\u0440\u0431\u0430\u043d\u043a: \u043e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e SMS \u0438\u043b\u0438 \u0421\u0431\u0435\u0440\u0431\u0430\u043d\u043a \u041e\u043d\u043b\u0430\u0439\u043d'), ('AB', '\u0410\u043b\u044c\u0444\u0430-\u041a\u043b\u0438\u043a'), ('MA', 'MasterPass'), ('PB', '\u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0431\u0430\u043d\u043a \u041f\u0440\u043e\u043c\u0441\u0432\u044f\u0437\u044c\u0431\u0430\u043d\u043a\u0430'), ('QW', 'QIWI Wallet'), ('QP', '\u0414\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436 (\u041a\u0443\u043f\u043f\u0438.\u0440\u0443)'), ('DF', '\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d')], default='DF', max_length=2, verbose_name='\u0421\u043f\u043e\u0441\u043e\u0431 \u043f\u043b\u0430\u0442\u0435\u0436\u0430')),
('order_number', models.CharField(default=app.models.get_default_as_uuid, max_length=64, verbose_name='\u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430')),
('cps_email', models.EmailField(blank=True, max_length=100, null=True, verbose_name='Email \u043f\u043b\u0430\u0442\u0435\u043b\u044c\u0449\u0438\u043a\u0430')),
('cps_phone', models.CharField(blank=True, max_length=15, null=True, verbose_name='\u0422\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u043b\u0430\u0442\u0435\u043b\u044c\u0449\u0438\u043a\u0430')),
('success_url', models.URLField(default=b'https://made-fashion.ru/kassa/success/', verbose_name='URL \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b')),
('fail_url', models.URLField(default=b'https://made-fashion.ru/kassa/fail/', verbose_name='URL \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b')),
('status', models.CharField(choices=[('processed', '\u0421\u0447\u0435\u0442 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d'), ('checked_s', '\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430'), ('checked_f', '\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u0430 '), ('success', '\u0421\u0447\u0435\u0442 \u043e\u043f\u043b\u0430\u0447\u0435\u043d'), ('fail', '\u0421\u0447\u0435\u0442 \u043d\u0435 \u043e\u043f\u043b\u0430\u0447\u0435\u043d')], default='processed', max_length=16, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
('invoice_id', models.PositiveIntegerField(blank=True, null=True, verbose_name='\u041d\u043e\u043c\u0435\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430')),
('shop_amount', models.DecimalField(blank=True, decimal_places=2, help_text='\u0417\u0430 \u0432\u044b\u0447\u0435\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430', max_digits=15, null=True, verbose_name='\u0421\u0443\u043c\u043c\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0440/\u0441')),
('order_currency', models.PositiveIntegerField(choices=[(643, '\u0420\u0443\u0431\u043b\u0438'), (10643, '\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0432\u0430\u043b\u044e\u0442\u0430')], default=643, verbose_name='\u0412\u0430\u043b\u044e\u0442\u0430')),
('shop_currency', models.PositiveIntegerField(blank=True, choices=[(643, '\u0420\u0443\u0431\u043b\u0438'), (10643, '\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0432\u0430\u043b\u044e\u0442\u0430')], default=643, null=True, verbose_name='\u0412\u0430\u043b\u044e\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0440/\u0441')),
('performed_datetime', models.DateTimeField(blank=True, default=datetime.datetime(2018, 5, 13, 8, 57, 40, 490000, tzinfo=utc), null=True, verbose_name='\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430')),
('ym_merchant_receipt', models.TextField(blank=True, max_length=2000, null=True, verbose_name='\u041a\u043e\u0440\u0437\u0438\u043d\u0430')),
('customer_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Customer', verbose_name='\u041f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044c')),
('good_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Goods', verbose_name='\u0422\u043e\u0432\u0430\u0440')),
],
options={
'ordering': ('-pub_date',),
'verbose_name': '\u043f\u043b\u0430\u0442\u0451\u0436',
'verbose_name_plural': '\u043f\u043b\u0430\u0442\u0435\u0436\u0438',
},
),
migrations.AddField(
model_name='lead',
name='payment_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Payments', verbose_name='\u041f\u043b\u0430\u0442\u0435\u0436'),
),
migrations.AlterUniqueTogether(
name='customer',
unique_together=set([('name', 'email', 'phone')]),
),
migrations.AlterUniqueTogether(
name='payments',
unique_together=set([('shop_id', 'order_number')]),
),
]
| 104.266667
| 1,551
| 0.686427
| 1,427
| 10,948
| 5.1822
| 0.146461
| 0.062475
| 0.024341
| 0.027045
| 0.515889
| 0.484922
| 0.450034
| 0.380257
| 0.298986
| 0.245571
| 0
| 0.32303
| 0.140117
| 10,948
| 104
| 1,552
| 105.269231
| 0.462503
| 0.00612
| 0
| 0.322917
| 1
| 0.364583
| 0.527303
| 0.428939
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.010417
| 0.0625
| 0
| 0.104167
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
92af4aaed263d20f2f26df37be2d79c348071122
| 76
|
py
|
Python
|
comicolorization/extensions/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 122
|
2017-08-21T10:01:07.000Z
|
2022-03-21T13:52:19.000Z
|
comicolorization/extensions/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 7
|
2017-10-20T15:12:13.000Z
|
2022-01-30T23:04:37.000Z
|
comicolorization/extensions/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 26
|
2017-08-22T08:11:20.000Z
|
2022-03-09T14:59:18.000Z
|
from .save_images import SaveGeneratedImageExtension, SaveRawImageExtension
| 38
| 75
| 0.907895
| 6
| 76
| 11.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065789
| 76
| 1
| 76
| 76
| 0.957746
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
92b3b3dea788241674de867fcd74191124632fd2
| 2,677
|
py
|
Python
|
blitz_api/migrations/0014_model_translation.py
|
Jerome-Celle/Blitz-API
|
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
|
[
"MIT"
] | 3
|
2019-10-22T00:16:49.000Z
|
2021-07-15T07:44:43.000Z
|
blitz_api/migrations/0014_model_translation.py
|
Jerome-Celle/Blitz-API
|
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
|
[
"MIT"
] | 1,183
|
2018-04-19T18:40:30.000Z
|
2022-03-31T21:05:05.000Z
|
blitz_api/migrations/0014_model_translation.py
|
Jerome-Celle/Blitz-API
|
7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0
|
[
"MIT"
] | 12
|
2018-04-17T19:16:42.000Z
|
2022-01-27T00:19:59.000Z
|
# Generated by Django 2.0.2 on 2018-10-26 01:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blitz_api', '0013_historicalacademicfield_historicalacademiclevel_historicalactiontoken_historicaldomain_historicalorg'),
]
operations = [
migrations.AddField(
model_name='academicfield',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='academicfield',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='academiclevel',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='academiclevel',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalacademicfield',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalacademicfield',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalacademiclevel',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalacademiclevel',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalorganization',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='historicalorganization',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='organization',
name='name_en',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
migrations.AddField(
model_name='organization',
name='name_fr',
field=models.CharField(max_length=100, null=True, verbose_name='Name'),
),
]
| 36.175676
| 131
| 0.598058
| 260
| 2,677
| 5.95
| 0.173077
| 0.124111
| 0.17841
| 0.209438
| 0.850679
| 0.850679
| 0.850679
| 0.816419
| 0.816419
| 0.816419
| 0
| 0.028721
| 0.284647
| 2,677
| 73
| 132
| 36.671233
| 0.779112
| 0.01681
| 0
| 0.895522
| 1
| 0
| 0.174144
| 0.091635
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.014925
| 0
| 0.059701
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
2baa31b7ab2a2b3f210080b3e41c6e139bc58d91
| 62,878
|
py
|
Python
|
Code/Regression.py
|
Kaamraan19064/Analysis-And-Prediction-of-Delhi-Climate-using-ML
|
f06280bc9923f10b39875e32252d8ba490a217df
|
[
"Apache-2.0"
] | null | null | null |
Code/Regression.py
|
Kaamraan19064/Analysis-And-Prediction-of-Delhi-Climate-using-ML
|
f06280bc9923f10b39875e32252d8ba490a217df
|
[
"Apache-2.0"
] | null | null | null |
Code/Regression.py
|
Kaamraan19064/Analysis-And-Prediction-of-Delhi-Climate-using-ML
|
f06280bc9923f10b39875e32252d8ba490a217df
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
from sklearn.ensemble import ExtraTreesRegressor, RandomForestRegressor
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import preprocessing, svm
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn import metrics
from sklearn.linear_model import LogisticRegression
import statsmodels.api as sm
import matplotlib.dates as mdates
import warnings
import itertools
import dateutil
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from sklearn.svm import SVR
from sklearn.model_selection import GridSearchCV as gsc
from sklearn.linear_model import Ridge,Lasso
from sklearn.ensemble import RandomForestRegressor
from sklearn.neural_network import MLPRegressor
def main ():
# Using svm
data=pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
S1,S2=AQI_SVM(data)
S3,S4=AQI_Feature_importance_SVM(data)
S5,S6=AQI_Domain_Knowledge_SVM(data)
S7,S8=AQI_without_Domain_Knowledge_SVM(data)
##Linear Regression
data=pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
LR1,LR2=AQI(data)
LR3,LR4=AQI_Feature_importance(data)
LR5,LR6==AQI_Domain_Knowledge(data)
LR7,LR8=AQI_without_Domain_Knowledge(data)
## Predincting for next day
data=pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
normalize(data)
y=pd.read_csv('AQI_prediction_add.csv')
LR_F1,LR_F2=AQI_Future(data,y.AQI_predicted)
LR_F3,LR_F4=AQI_Feature_importance_Future(data,y.AQI_predicted)
LR_F5,LR_F6=AQI_Domain_Knowledge_Future(data,y.AQI_predicted)
LR_F7,LR_F8=AQI_without_Domain_Knowledge_Future(data,y.AQI_predicted)
##Predicting for Autumn Season
data=pd.read_csv('autumn_data.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
data=pd.get_dummies(data, columns=[' _conds'], prefix = [' _conds'])
data=pd.get_dummies(data, columns=[' _wdire'], prefix = [' _wdire'])
data=pd.get_dummies(data, columns=['Type'], prefix = ['Type'])
LR_A1,LR_A2=AQI(data)
LR_A3,LR_A4=AQI_Feature_importance(data)
LR_A5,LR_A6=AQI_Domain_Knowledge(data)
LR_A7,LR_A8=AQI_without_Domain_Knowledge(data)
##Predicting for Summer Season
data=pd.read_csv('summer_data.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
data=pd.get_dummies(data, columns=[' _conds'], prefix = [' _conds'])
data=pd.get_dummies(data, columns=[' _wdire'], prefix = [' _wdire'])
data=pd.get_dummies(data, columns=['Type'], prefix = ['Type'])
LR_S1,LR_S2=AQI(data)
LR_S3,LR_S4=AQI_Feature_importance(data)
LR_S5,LR_S6=AQI_Domain_Knowledge(data)
LR_S7,LR_S8=AQI_without_Domain_Knowledge(data)
##Predicting for Winter Season
data=pd.read_csv('winter_data.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
data=pd.get_dummies(data, columns=[' _conds'], prefix = [' _conds'])
data=pd.get_dummies(data, columns=[' _wdire'], prefix = [' _wdire'])
data=pd.get_dummies(data, columns=['Type'], prefix = ['Type'])
LR_W1,LR_W2=AQI(data)
LR_W3,LR_W4=AQI_Feature_importance(data)
LR_W5,LR_W6=AQI_Domain_Knowledge(data)
LR_W7,LR_W8=AQI_without_Domain_Knowledge(data)
##Using Ridge
data = pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
h = BestParams(data)
## Using all features
R1,R2=AQI_Ridge(data,h)
R3,R4=AQI_Feature_importance_Ridge(data,h)
R5,R6=AQI_Domain_Knowledge_Ridge(data,h)
R7,R8=AQI_without_Domain_Knowledge_Ridge(data,h)
##Future
data = pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
h = BestParams(data)
y = pd.read_csv('AQI_prediction_add.csv')
R_F1,R_F2=AQI_Future_Ridge(data, y.AQI_predicted,h)
R_F3,R_F4=AQI_Feature_importance_Future_Ridge(data, y.AQI_predicted,h)
R_F5,R_F6=AQI_Domain_Knowledge_Future_Ridge(data, y.AQI_predicted,h)
R_F7,R_F8=AQI_without_Domain_Knowledge_Future_Ridge(data, y.AQI_predicted,h)
##using Lasso
data=pd.read_csv('Original_with_dummies.csv')
y=data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI']=y
h=BestParams(data)
L1,L2=AQI_Lasso(data,h)
L3,L4=AQI_Feature_importance_Lasso(data,h)
L5,L6=AQI_Domain_Knowledge_Lasso(data,h)
L7,L8=AQI_without_Domain_Knowledge_Lasso(data,h)
## Predincting for nxt day
data=pd.read_csv('Original_with_dummies.csv')
normalize(data)
h=BestParams(data)
y=pd.read_csv('AQI_prediction_add.csv')
L_F1,L_F2=AQI_Future_Lasso(data,y.AQI_predicted,h)
L_F3,L_F4=AQI_Feature_importance_Future_Lasso(data,y.AQI_predicted,h)
L_F5,L_F6=AQI_Domain_Knowledge_Future_Lasso(data,y.AQI_predicted,h)
L_F7,L_F8=AQI_without_Domain_Knowledge_Future_Lasso(data,y.AQI_predicted,h)
##Random forest
#All feautres
data = pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
F1,F2=AQI_RF(data)
F3,F4=AQI_Feature_importance_RF(data)
F5,F6=AQI_Domain_Knowledge_RF(data)
F7,F8=AQI_without_Domain_Knowledge_RF(data)
## Predincting for nxt day
data = pd.read_csv('Original_with_dummies.csv')
normalize(data)
y = pd.read_csv('AQI_prediction_add.csv')
F_F1,F_F2=AQI_Future_RF(data, y.AQI_predicted)
F_F3,F_F4=AQI_Feature_importance_Future_RF(data, y.AQI_predicted)
F_F5,F_F6=AQI_Domain_Knowledge_Future_RF(data, y.AQI_predicted)
F_F7,F_F8=AQI_without_Domain_Knowledge_Future_RF(data, y.AQI_predicted)
##NN
data=pd.read_csv('Original_with_dummies.csv')
y = data.AQI
data = data.drop('AQI', axis=1)
normalize(data)
data['AQI'] = y
layer = [4,4,4]
NN1,NN2=AQI_NN(data, layer)
NN3,NN4=AQI_Feature_importance_NN(data, layer)
NN5,NN6=AQI_Domain_Knowledge_NN(data, layer)
NN7,NN8=AQI_without_Domain_Knowledge_NN(data, layer)
## Predincting for nxt day
data=pd.read_csv('Original_with_dummies.csv')
y=pd.read_csv('AQI_prediction_add.csv')
normalize(data)
NN_F1,NN_F2=AQI_Future_NN(data,y.AQI_predicted, layer)
NN_F3,NN_F4=AQI_Feature_importance_Future_NN(data,y.AQI_predicted,layer)
NN_F5,NN_F6=AQI_Domain_Knowledge_Future_NN(data,y.AQI_predicted,layer)
NN_F7,NN_F8=AQI_without_Domain_Knowledge_Future_NN(data,y.AQI_predicted, layer)
##All features v/s all models
Bar_graph (LR1,LR2,L1,L2,R1,R2,S1,S2,F1,F2,NN1,NN2)
##iMPORTANT FEATURES V/S ALL MODELS
Bar_graph (LR3,LR4,L3,L4,R3,R4,S3,S4,F3,F4,NN3,NN4)
##Future with important features V/S ALL MODELS except svm
Bar_graph_without_svm (LR_F3,LR_F4,L_F3,L_F4,R_F3,R_F4,F_F3,F_F4,NN_F3,NN_F4)
##Autumn winter and summer
Bar_graph_season (LR_A3,LR_A4,LR_S3,LR_S4,LR_W3,LR_W4)
##Best Model Analysis using Data
data = pd.read_csv('Original_with_dummies.csv')
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
train=90
test=18
tips=[]
LABELS=[]
d=[0,1,2,3,4,5,6,7,8,9]
for i in range (10):
train=train+30
test=test+6
LABELS.append(train)
tips.append(train_test_data_prepare(data, train, test, 15))
plt.plot(tips)
plt.xticks(d, LABELS)
plt.xlabel("No of Days")
plt.ylabel("RMSE")
plt.title("Models")
plt.legend()
plt.show()
#Predicting AQI using all features
def AQI(data):
y=data.AQI
data=data.drop('AQI',axis=1)
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance(data):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge(data):
y=data.AQI
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area',]]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge(data):
y=data.AQI
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_Future(data,y):
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Future(data,y):
tree_clf = ExtraTreesRegressor()
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Future(data,y):
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area','month_10','month_11',]]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Future(data,y):
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
data=data.drop('month_10',axis=1)
data=data.drop('month_11',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = LinearRegression()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def graph_training(y_pred,y_train):
all_samples = [i for i in range(0, 250)]
y_pred=y_pred[0:250]
y_train=y_train[0:250]
plt.plot(all_samples, y_pred,label='Predicted')
plt.plot(all_samples , y_train,label='Expected')
plt.xlabel("No of Samples")
plt.ylabel("AQI")
plt.title("Training")
plt.legend()
plt.show()
def graph_testing(y_pred,y_val):
all_samples = [i for i in range(0, 250)]
y_pred=y_pred[0:250]
y_val=y_val[0:250]
plt.plot(all_samples, y_pred,label='Predicted')
plt.plot(all_samples , y_val,label='Expected')
plt.xlabel("No of Samples")
plt.ylabel("AQI")
plt.title("Validation")
plt.legend()
plt.show()
## svm
def AQI_SVM(data):
y=data.AQI
data=data.drop('AQI',axis=1)
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = SVR(gamma='scale')
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_SVM(data):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = SVR(gamma='scale')
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_SVM(data):
y=data.AQI
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
# df[['Name', 'Qualification']]
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area',]]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = SVR(gamma='scale')
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_SVM(data):
y=data.AQI
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
# data=data.drop('month_10',axis=1)
# data=data.drop('month_11',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = SVR(gamma='scale')
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def BestParams(data):
y = data.AQI
data = data.drop('AQI', axis=1)
Hyper_params = np.array(
[ 0.011, 0.1, 0.001, 0.01,.3, .2, 0.6, .8, 0.001, 0.0001, 3, 4,1,2.4])
Reg_model = Ridge()
GSCgrid = gsc(estimator=Reg_model, param_grid=dict(alpha=Hyper_params))
GSCgrid.fit(data, y)
# print('Hyper Parameter for Ridge:', GSCgrid.best_estimator_.alpha)
return GSCgrid.best_estimator_.alpha
def normalize(data):
for c in data.columns:
mean = data[c].mean()
max = data[c].max()
min = data[c].min()
data[c] = (data[c] - min) / (max - min)
return data
def AQI_Ridge(data,h):
y=data.AQI
data=data.drop('AQI',axis=1)
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Ridge(data,h):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Ridge(data,h):
y=data.AQI
# df[['Name', 'Qualification']]
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Ridge(data,h):
y=data.AQI
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_Future_Ridge(data,y,h):
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Future_Ridge(data,y,h):
tree_clf = ExtraTreesRegressor()
data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Future_Ridge(data,y,h):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Future_Ridge(data,y,h):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Ridge(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Lasso(data,h):
y=data.AQI
data=data.drop('AQI',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Lasso(data,h):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Lasso(data,h):
y=data.AQI
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Lasso(data,h):
y=data.AQI
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr =Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_Future_Lasso(data,y,h):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr =Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Future_Lasso(data,y,h):
tree_clf = ExtraTreesRegressor()
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Future_Lasso(data,y,h):
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Future_Lasso(data,y,h):
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = Lasso(alpha=h)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_RF(data):
y=data.AQI
data=data.drop('AQI',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_RF(data):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_RF(data):
y=data.AQI
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_RF(data):
y=data.AQI
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr =RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_Future_RF(data,y):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Future_RF(data,y):
tree_clf = ExtraTreesRegressor()
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Future_RF(data,y):
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Future_RF(data,y):
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = RandomForestRegressor()
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_NN(data,layer):
y=data.AQI
data=data.drop('AQI',axis=1)
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_NN(data, layer):
tree_clf = ExtraTreesRegressor()
y=data['AQI']
data=data.drop('AQI',axis=1)
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_NN(data, layer):
y=data.AQI
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_NN(data,layer):
y=data.AQI
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_Future_NN(data,y, layer):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using features from features importance graph
def AQI_Feature_importance_Future_NN(data,y, layer):
tree_clf = ExtraTreesRegressor()
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
tree_clf.fit(data, y)
importances = tree_clf.feature_importances_
feature_names = data.columns
imp_features=dict(zip(feature_names,importances))
features_up = sorted(imp_features.items(), key=lambda x: x[1], reverse=True)
features_down = sorted(imp_features.items(), key=lambda x: x[1], reverse=False)
#best features
x = [i[0] for i in features_up]
print(x)
x=data[x]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
#Predicting AQI using all features
def AQI_Domain_Knowledge_Future_NN(data,y,layer):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
x=data[[' _tempm',' _wdird',' _wspdm','year','Type_Industrial Area']]
X_train, X_val, y_train, y_val = train_test_split(x, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def AQI_without_Domain_Knowledge_Future_NN(data,y, layer):
# data=pd.get_dummies(data, columns=['month'], prefix = ['month'])
data=data.drop('AQI',axis=1)
data=data.drop('NO2',axis=1)
data=data.drop('SO2',axis=1)
data=data.drop('SPM',axis=1)
data=data.drop('RSPM',axis=1)
data=data.drop('ni',axis=1)
data=data.drop('si',axis=1)
data=data.drop('rpi',axis=1)
data=data.drop('spi',axis=1)
data=data.drop(' _tempm',axis=1)
data=data.drop(' _wdird',axis=1)
data=data.drop(' _wspdm',axis=1)
data=data.drop('year',axis=1)
data=data.drop('Type_Industrial Area',axis=1)
X_train, X_val, y_train, y_val = train_test_split(data, y, test_size=0.2, random_state=1)
regr = MLPRegressor(hidden_layer_sizes=(layer),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(X_train, y_train)
print("xxxx")
y_pred = regr.predict(X_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
train= np.sqrt(metrics.mean_squared_error(y_train, y_pred))
graph_training(y_pred,y_train)
y_pred = regr.predict(X_val)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_val, y_pred)))
test=np.sqrt(metrics.mean_squared_error(y_val, y_pred))
graph_testing(y_pred,y_val)
return train,test
def Bar_graph (a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,f1,f2):
barWidth = 0.2
bars2 = [a2,b2,c2,d2,e2,f2]
bars1 = [a1,b1,c1,d1,e1,f1]
r1 = np.arange(len(bars1))
r2 = [x + barWidth for x in r1]
plt.bar(r1, bars1, width = barWidth, color = 'blue', edgecolor = 'black', capsize=7, label='Train')
plt.bar(r2, bars2, width = barWidth, color = 'cyan', edgecolor = 'black', capsize=7, label='Test')
plt.xticks([r + barWidth for r in range(len(bars1))], ['LinearRegression', 'LR with Lasso','LR with Ridge','SVM','random forest', 'Neural Network'])
plt.ylabel('RMSE')
plt.xlabel('Models')
plt.legend()
plt.show()
def Bar_graph_without_svm(a1,a2,b1,b2,c1,c2,d1,d2,e1,e2):
barWidth = 0.2
bars2 = [a2,b2,c2,d2,e2]
bars1 = [a1,b1,c1,d1,e1]
r1 = np.arange(len(bars1))
r2 = [x + barWidth for x in r1]
plt.bar(r1, bars1, width = barWidth, color = 'blue', edgecolor = 'black', capsize=7, label='Train')
plt.bar(r2, bars2, width = barWidth, color = 'cyan', edgecolor = 'black',capsize=7, label='Test')
plt.xticks([r + barWidth for r in range(len(bars1))], ['LinearRegression', 'LR with Lasso','LR with Ridge','random forest', 'Neural Network'])
plt.ylabel('RMSE')
plt.xlabel('Models')
plt.legend()
plt.show()
def Bar_graph_season(a1,a2,b1,b2,c1,c2):
barWidth = 0.2
bars2 = [a2,b2,c2]
bars1 = [a1,b1,c1]
r1 = np.arange(len(bars1))
r2 = [x + barWidth for x in r1]
plt.bar(r1, bars1, width = barWidth, color = 'blue', edgecolor = 'black', capsize=7, label='Train')
plt.bar(r2, bars2, width = barWidth, color = 'cyan', edgecolor = 'black',capsize=7, label='Test')
plt.xticks([r + barWidth for r in range(len(bars1))], ['Autumn', 'Summer','Winter'])
plt.ylabel('RMSE')
plt.xlabel('Seasons')
plt.legend()
plt.show()
def train_test_data_prepare(data, train, test, folds):
d_y = pd.read_csv('AQI_prediction_add.csv')
y = d_y.AQI_predicted
x_data = []
y_data = []
errors = []
for i in range(folds):
x_train = data.loc[i*(train+test):(i*(train+test)+train - 1), :]
x_test = data.loc[(i*(train+test)+train):(i+1)*(train+test)-1, :]
y_train = y.loc[i * (train + test):(i * (train + test) + train - 1)]
y_test = y.loc[(i * (train + test) + train):(i + 1) * (train + test) - 1]
regr = MLPRegressor(hidden_layer_sizes=(4, 4),
activation='relu',
solver='adam',
learning_rate='adaptive',
max_iter=1000,
learning_rate_init=0.01,
alpha=0.01,
# batch_size=500,
# early_stopping=True,
random_state=1)
regr.fit(x_train, y_train)
print("xxxx")
y_pred = regr.predict(x_train)
print('Training Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_train, y_pred)))
y_pred = regr.predict(x_test)
print('Testing Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
errors.append(np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
print("Cross validation test error = ", sum(errors)/len(errors))
return sum(errors)/len(errors)
main()
| 40.566452
| 152
| 0.669694
| 9,831
| 62,878
| 4.030109
| 0.032957
| 0.046063
| 0.108632
| 0.076805
| 0.94841
| 0.928622
| 0.915775
| 0.898536
| 0.886497
| 0.87577
| 0
| 0.01675
| 0.194854
| 62,878
| 1,549
| 153
| 40.59264
| 0.765852
| 0.049222
| 0
| 0.845917
| 0
| 0
| 0.0982
| 0.007239
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040832
| false
| 0
| 0.053159
| 0
| 0.1302
| 0.113251
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
ecf9e4407b359598628a8e35340f44dfbad38f31
| 2,281
|
py
|
Python
|
tests/test_parser/test_method_statement.py
|
vbondarevsky/ones_analyzer
|
ab8bff875192db238ed17c20d61c9fa5b55c3fa8
|
[
"MIT"
] | 12
|
2017-11-23T07:04:13.000Z
|
2022-03-01T21:06:56.000Z
|
tests/test_parser/test_method_statement.py
|
vbondarevsky/analyzer_test
|
ab8bff875192db238ed17c20d61c9fa5b55c3fa8
|
[
"MIT"
] | 2
|
2017-06-25T21:32:32.000Z
|
2017-11-19T19:05:40.000Z
|
tests/test_parser/test_method_statement.py
|
vbondarevsky/analyzer_test
|
ab8bff875192db238ed17c20d61c9fa5b55c3fa8
|
[
"MIT"
] | 5
|
2017-11-21T08:24:56.000Z
|
2021-08-17T23:21:18.000Z
|
from analyzer.syntax_kind import SyntaxKind
from tests.utils import TestCaseParser
class TestParserMethodStatement(TestCaseParser):
def test_procedure_with_export(self):
code = \
"""Процедура МояПроцедура() Экспорт
КонецПроцедуры"""
self.parse_source(code)
self.assertNode(self.syntax_tree.methods, [SyntaxKind.ProcedureBlock])
self.assertNode(self.syntax_tree.methods[0].begin.declaration_keyword, SyntaxKind.ProcedureKeyword)
self.assertNode(self.syntax_tree.methods[0].begin.identifier, SyntaxKind.IdentifierToken)
self.assertNode(self.syntax_tree.methods[0].begin.export, SyntaxKind.ExportKeyword)
def test_procedure_without_export(self):
code = \
"""Процедура МояПроцедура()
КонецПроцедуры"""
self.parse_source(code)
self.assertNode(self.syntax_tree.methods, [SyntaxKind.ProcedureBlock])
self.assertNode(self.syntax_tree.methods[0].begin.declaration_keyword, SyntaxKind.ProcedureKeyword)
self.assertNode(self.syntax_tree.methods[0].begin.identifier, SyntaxKind.IdentifierToken)
self.assertNode(self.syntax_tree.methods[0].begin.export, SyntaxKind.Empty)
def test_function_with_export(self):
code = \
"""Функция МояПроцедура() Экспорт
КонецФункции"""
self.parse_source(code)
self.assertNode(self.syntax_tree.methods, [SyntaxKind.FunctionBlock])
self.assertNode(self.syntax_tree.methods[0].begin.declaration_keyword, SyntaxKind.FunctionKeyword)
self.assertNode(self.syntax_tree.methods[0].begin.identifier, SyntaxKind.IdentifierToken)
self.assertNode(self.syntax_tree.methods[0].begin.export, SyntaxKind.ExportKeyword)
def test_function_without_export(self):
code = \
"""Функция МояПроцедура()
КонецФункции"""
self.parse_source(code)
self.assertNode(self.syntax_tree.methods, [SyntaxKind.FunctionBlock])
self.assertNode(self.syntax_tree.methods[0].begin.declaration_keyword, SyntaxKind.FunctionKeyword)
self.assertNode(self.syntax_tree.methods[0].begin.identifier, SyntaxKind.IdentifierToken)
self.assertNode(self.syntax_tree.methods[0].begin.export, SyntaxKind.Empty)
| 50.688889
| 107
| 0.725559
| 240
| 2,281
| 6.741667
| 0.179167
| 0.138443
| 0.177998
| 0.23733
| 0.876391
| 0.792336
| 0.792336
| 0.792336
| 0.792336
| 0.792336
| 0
| 0.006342
| 0.170539
| 2,281
| 44
| 108
| 51.840909
| 0.848837
| 0
| 0
| 0.774194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.516129
| 1
| 0.129032
| false
| 0
| 0.064516
| 0
| 0.225806
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
ecff3f99beae200a29fac21a69522182ff664420
| 6,398
|
py
|
Python
|
thespian/system/transport/test/test_resultcallback.py
|
dendron2000/Thespian
|
0acbc5a0803f6d2be3421ea6eb08c6beecbf3802
|
[
"MIT"
] | 210
|
2015-08-31T19:39:34.000Z
|
2020-01-10T08:07:48.000Z
|
thespian/system/transport/test/test_resultcallback.py
|
dendron2000/Thespian
|
0acbc5a0803f6d2be3421ea6eb08c6beecbf3802
|
[
"MIT"
] | 85
|
2017-04-08T19:28:42.000Z
|
2022-03-23T15:25:49.000Z
|
thespian/system/transport/test/test_resultcallback.py
|
dendron2000/Thespian
|
0acbc5a0803f6d2be3421ea6eb08c6beecbf3802
|
[
"MIT"
] | 47
|
2015-09-01T19:24:20.000Z
|
2020-01-02T20:03:05.000Z
|
from thespian.system.transport import ResultCallback
from datetime import datetime, timedelta
from time import sleep
class TestUnitResultCallback(object):
def _good(self, result, value):
if not hasattr(self, 'goods'): self.goods = []
self.goods.append( (result, value) )
def _fail(self, result, value):
if not hasattr(self, 'fails'): self.fails = []
self.fails.append( (result, value) )
def testGoodCallback(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(True, 5)
assert self.goods == [(True, 5)]
assert self.fails == []
def testFailCallback(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(False, 9)
assert self.goods == []
assert self.fails == [(False, 9)]
def testGoodCallbackReCall(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(True, 5)
assert self.goods == [(True, 5)]
assert self.fails == []
rc.resultCallback(True, 4)
assert self.goods == [(True, 5)]
assert self.fails == []
def testFailCallbackReCall(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(False, 9)
assert self.goods == []
assert self.fails == [(False, 9)]
rc.resultCallback(False, 8)
assert self.goods == []
assert self.fails == [(False, 9)]
def testGoodCallbackReCallFail(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(True, 5)
assert self.goods == [(True, 5)]
assert self.fails == []
rc.resultCallback(False, 4)
assert self.goods == [(True, 5)]
assert self.fails == []
def testFailCallbackReCallGood(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc.resultCallback(False, 9)
assert self.goods == []
assert self.fails == [(False, 9)]
rc.resultCallback(True, 8)
assert self.goods == []
assert self.fails == [(False, 9)]
def testManyGoodCallbacks(self):
self.goods = []
self.fails = []
rc = [ResultCallback(self._good, self._fail) for N in range(20)]
for num,each in enumerate(rc):
each.resultCallback(True, num)
assert self.goods == [(True, N) for N in range(20)]
assert self.fails == []
def testManyFailCallbacks(self):
self.goods = []
self.fails = []
rc = [ResultCallback(self._good, self._fail) for N in range(20)]
for num,each in enumerate(rc):
each.resultCallback(False, num)
assert self.goods == []
assert self.fails == [(False, N) for N in range(20)]
def testManyGoodAndFailCallbacks(self):
self.goods = []
self.fails = []
rc = [ResultCallback(self._good, self._fail) for N in range(20)]
for num,each in enumerate(rc):
each.resultCallback(0 == num % 3, num)
assert self.goods == [(True, N) for N in range(20) if N % 3 == 0]
assert self.fails == [(False, N) for N in range(20) if N % 3]
def testChainedGoodCallbacks(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc3.resultCallback(True, 'good')
assert self.goods == [(True, 'good')] * 3
assert self.fails == []
def testChainedFailCallbacks(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc3.resultCallback(False, 'oops')
assert self.goods == []
assert self.fails == [(False, 'oops')] * 3
def testChainedGoodCallbacksDoNotDuplicate(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc2.resultCallback(True, 'ok')
assert self.goods == [(True, 'ok'), (True, 'ok')]
assert self.fails == []
rc3.resultCallback(True, 'good')
assert self.goods == [(True, 'ok'), (True, 'ok'), (True, 'good')]
assert self.fails == []
def testChainedFailCallbacksDoNotDuplicate(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc2.resultCallback(False, 'bad')
assert self.goods == []
assert self.fails == [(False, 'bad'), (False, 'bad')]
rc3.resultCallback(False, 'oops')
assert self.goods == []
assert self.fails == [(False, 'bad'), (False, 'bad'), (False, 'oops')]
def testChainedGoodCallbacksDoNotDuplicateOnFail(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc2.resultCallback(True, 'ok')
assert self.goods == [(True, 'ok'), (True, 'ok')]
assert self.fails == []
rc3.resultCallback(False, 'bad')
assert self.goods == [(True, 'ok'), (True, 'ok')]
assert self.fails == [(False, 'bad')]
def testChainedFailCallbacksDoNotDuplicateOnGood(self):
self.goods = []
self.fails = []
rc = ResultCallback(self._good, self._fail)
rc2 = ResultCallback(self._good, self._fail, rc)
rc3 = ResultCallback(self._good, self._fail, rc2)
rc2.resultCallback(False, 'bad')
assert self.goods == []
assert self.fails == [(False, 'bad'), (False, 'bad')]
rc3.resultCallback(True, 'yippee')
assert self.goods == [(True, 'yippee')]
assert self.fails == [(False, 'bad'), (False, 'bad')]
| 36.56
| 78
| 0.575336
| 697
| 6,398
| 5.200861
| 0.091822
| 0.126897
| 0.163862
| 0.193655
| 0.777103
| 0.774897
| 0.77269
| 0.74069
| 0.725793
| 0.721931
| 0
| 0.014951
| 0.278681
| 6,398
| 174
| 79
| 36.770115
| 0.770531
| 0
| 0
| 0.714286
| 0
| 0
| 0.017196
| 0
| 0
| 0
| 0
| 0
| 0.298701
| 1
| 0.11039
| false
| 0
| 0.019481
| 0
| 0.136364
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
a60c40b6a9d9747306c8c8e2220567852b3802bc
| 200
|
py
|
Python
|
pykeyvi/src/converters/__init__.py
|
remusao/keyvi
|
7ea51e4ae94d355c677cce349a1c17290f24252c
|
[
"Apache-2.0"
] | 147
|
2015-10-06T19:10:01.000Z
|
2021-08-19T07:52:02.000Z
|
pykeyvi/src/converters/__init__.py
|
remusao/keyvi
|
7ea51e4ae94d355c677cce349a1c17290f24252c
|
[
"Apache-2.0"
] | 148
|
2015-10-06T09:24:56.000Z
|
2018-12-08T08:42:54.000Z
|
pykeyvi/src/converters/__init__.py
|
remusao/keyvi
|
7ea51e4ae94d355c677cce349a1c17290f24252c
|
[
"Apache-2.0"
] | 34
|
2015-10-09T06:55:52.000Z
|
2021-01-05T18:43:57.000Z
|
from .pykeyvi_autowrap_conversion_providers import *
from autowrap.ConversionProvider import special_converters
def register_converters():
special_converters.append(MatchIteratorPairConverter())
| 33.333333
| 59
| 0.865
| 19
| 200
| 8.789474
| 0.684211
| 0.203593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 200
| 5
| 60
| 40
| 0.907609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
a6118a27fcf47cf3675a05566443faee375ed95b
| 137
|
py
|
Python
|
build/lib/saes/optimizer/__init__.py
|
Johumel/SAES
|
0152c1563e5bc4c87822dbf6dfc66710cae60eb0
|
[
"MIT"
] | 9
|
2019-06-04T14:42:54.000Z
|
2022-01-29T01:06:23.000Z
|
build/lib/saes/optimizer/__init__.py
|
Johumel/SAES
|
0152c1563e5bc4c87822dbf6dfc66710cae60eb0
|
[
"MIT"
] | null | null | null |
build/lib/saes/optimizer/__init__.py
|
Johumel/SAES
|
0152c1563e5bc4c87822dbf6dfc66710cae60eb0
|
[
"MIT"
] | 3
|
2021-03-30T02:42:34.000Z
|
2022-03-29T08:59:17.000Z
|
from .srfit import *
from .fit_sin_spec_pll import *
from .fit_sin_spec import *
from .specr_model import *
from .sinspec_model import *
| 22.833333
| 31
| 0.781022
| 22
| 137
| 4.545455
| 0.454545
| 0.4
| 0.26
| 0.32
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145985
| 137
| 5
| 32
| 27.4
| 0.854701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
a6982f9425cc590b6333c3ab264414a4729023bc
| 297
|
py
|
Python
|
basics/solutions/get-data-urllib.py
|
carlosal1015/ACM-Python-Tutorials-KAUST-2015
|
688acf1017dba7687254a8c880b7f19c6f939c3f
|
[
"CC-BY-3.0"
] | 5
|
2019-01-16T14:43:43.000Z
|
2021-06-29T02:20:47.000Z
|
basics/solutions/get-data-urllib.py
|
carlosal1015/ACM-Python-Tutorials-KAUST-2015
|
688acf1017dba7687254a8c880b7f19c6f939c3f
|
[
"CC-BY-3.0"
] | null | null | null |
basics/solutions/get-data-urllib.py
|
carlosal1015/ACM-Python-Tutorials-KAUST-2015
|
688acf1017dba7687254a8c880b7f19c6f939c3f
|
[
"CC-BY-3.0"
] | 3
|
2017-02-21T06:19:19.000Z
|
2021-06-29T02:20:54.000Z
|
import urllib
urllib.urlretrieve("http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data",
"data")
urllib.urlretrieve("http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.names",
"description")
!cat description
| 42.428571
| 102
| 0.686869
| 38
| 297
| 5.368421
| 0.473684
| 0.137255
| 0.205882
| 0.27451
| 0.754902
| 0.754902
| 0.754902
| 0.754902
| 0.754902
| 0.754902
| 0
| 0
| 0.154882
| 297
| 6
| 103
| 49.5
| 0.812749
| 0
| 0
| 0
| 0
| 0.333333
| 0.585859
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.166667
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
a6b7774612f7341aa37737efd55df79d275c3e3a
| 4,461
|
py
|
Python
|
testsuite/tests/QB13-061__module_config_file/run_test.py
|
AdaCore/style_checker
|
17108ebfc44375498063ecdad6c6e4430458e60a
|
[
"CNRI-Python"
] | 2
|
2017-10-22T18:04:26.000Z
|
2020-03-06T11:07:41.000Z
|
testsuite/tests/QB13-061__module_config_file/run_test.py
|
AdaCore/style_checker
|
17108ebfc44375498063ecdad6c6e4430458e60a
|
[
"CNRI-Python"
] | null | null | null |
testsuite/tests/QB13-061__module_config_file/run_test.py
|
AdaCore/style_checker
|
17108ebfc44375498063ecdad6c6e4430458e60a
|
[
"CNRI-Python"
] | 4
|
2018-05-22T12:08:54.000Z
|
2020-12-14T15:25:27.000Z
|
def test_epl_single_year_mtl(style_checker):
"""Style check test against epl_single_year.mtl
"""
style_checker.set_year(2017)
p = style_checker.run_style_checker('--config=module_config.yaml',
'whatever', 'epl_single_year.mtl')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
# Try the same test, but without the --config file.
# It should fail, because we no longer include the module's
# config which allows EPL copyright notices.
p = style_checker.run_style_checker('whatever', 'epl_single_year.mtl')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
epl_single_year.mtl:2: Copyright notice is not correctly formatted
It must look like...
Copyright (C) 1992-2017, <copyright holder>
... where <copyright holder> can be any of:
- `AdaCore'
- `Altran Praxis'
- `Altran UK Limited'
- `Free Software Foundation, Inc.'
- `AdaCore, Altran Praxis'
- `AdaCore and Altran UK Limited'
- `AdaCore, Altran UK Limited'
- `AdaCore and Altran UK'
- `AdaCore, Altran UK'
""")
def test_epl_range_mtl(style_checker):
"""Style check test against epl_range.mtl
"""
style_checker.set_year(2017)
p = style_checker.run_style_checker('--config=module_config.yaml',
'whatever', 'epl_range.mtl')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
# Try the same test, but without the --config file.
# It should fail, because we no longer include the module's
# config which allows EPL copyright notices.
p = style_checker.run_style_checker('whatever', 'epl_range.mtl')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
epl_range.mtl:2: Copyright notice is not correctly formatted
It must look like...
Copyright (C) 1992-2017, <copyright holder>
... where <copyright holder> can be any of:
- `AdaCore'
- `Altran Praxis'
- `Altran UK Limited'
- `Free Software Foundation, Inc.'
- `AdaCore, Altran Praxis'
- `AdaCore and Altran UK Limited'
- `AdaCore, Altran UK Limited'
- `AdaCore and Altran UK'
- `AdaCore, Altran UK'
""")
def test_relpath_m(style_checker):
"""Style check test against relpath.m
"""
style_checker.set_year(2017)
p = style_checker.run_style_checker('--config=module_config.yaml',
'whatever', 'relpath.m')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
relpath.m:5: Copyright notice has unexpected copyright holder:
`AdaCore'
Expected either of:
- `Someone Inc'
- `Second Holder SARL'
""")
# Try the same test, but without the --config file.
p = style_checker.run_style_checker('whatever', 'relpath.m')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
def test_deep_notice(style_checker):
"""Style check test against deep_notice.m
"""
style_checker.set_year(2017)
p = style_checker.run_style_checker('--config=module_config.yaml',
'whatever', 'deep_notice.m')
style_checker.assertEqual(p.status, 0, p.image)
style_checker.assertRunOutputEmpty(p)
# Try the same test, but without the --config file.
p = style_checker.run_style_checker('whatever', 'deep_notice.m')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
deep_notice.m:100: Copyright notice must occur before line 24
""")
def test_notice_too_deep_m(style_checker):
"""Style check test against notice_too_deep.m
"""
style_checker.set_year(2017)
p = style_checker.run_style_checker('--config=module_config.yaml',
'whatever', 'notice_too_deep.m')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
notice_too_deep.m:101: Copyright notice must occur before line 100
""")
# Try the same test, but without the --config file.
p = style_checker.run_style_checker('whatever', 'notice_too_deep.m')
style_checker.assertNotEqual(p.status, 0, p.image)
style_checker.assertRunOutputEqual(p, """\
notice_too_deep.m:101: Copyright notice must occur before line 24
""")
| 36.565574
| 74
| 0.680341
| 583
| 4,461
| 5.015437
| 0.154374
| 0.205198
| 0.048906
| 0.05472
| 0.939124
| 0.926471
| 0.888167
| 0.845075
| 0.818399
| 0.818399
| 0
| 0.018362
| 0.206456
| 4,461
| 121
| 75
| 36.867769
| 0.807627
| 0.151984
| 0
| 0.705882
| 0
| 0
| 0.425714
| 0.053614
| 0
| 0
| 0
| 0
| 0.235294
| 1
| 0.058824
| false
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
a6ffdfb151d07c40927ced84e25d5a64a8c701a5
| 18,639
|
py
|
Python
|
src/exojax/spec/atomll.py
|
dcmvdbekerom/exojax
|
9b9305f8e383c73bdb97c1cfb0e276ddafcd75de
|
[
"MIT"
] | null | null | null |
src/exojax/spec/atomll.py
|
dcmvdbekerom/exojax
|
9b9305f8e383c73bdb97c1cfb0e276ddafcd75de
|
[
"MIT"
] | null | null | null |
src/exojax/spec/atomll.py
|
dcmvdbekerom/exojax
|
9b9305f8e383c73bdb97c1cfb0e276ddafcd75de
|
[
"MIT"
] | null | null | null |
import numpy as np
from exojax.spec import atomllapi
from exojax.utils.constants import ccgs, m_u, kB, hcperk, ecgs, hcgs, Rcgs, a0, eV2wn
import jax.numpy as jnp
def Sij0(A, gupper, nu_lines, elower, QTref_284, QTmask, Irwin=False):
"""Reference Line Strength in Tref=296K, S0.
Note:
Tref=296K
Args:
A: Einstein coefficient (s-1)
gupper: the upper state statistical weight
nu_lines: line center wavenumber (cm-1)
elower: elower
QTref_284: partition function Q(Tref)
QTmask: mask to identify a rows of QTref_284 to apply for each line
Irwin: if True(1), the partition functions of Irwin1981 is used, otherwise those of Barklem&Collet2016
Returns:
Sij(T): Line strength (cm)
"""
Tref=296.0
#Assign Q(Tref) for each line
QTref = np.zeros_like(QTmask, dtype=float)
for i, mask in enumerate(QTmask):
QTref[i] = QTref_284[mask]
#Use Irwin_1981 for Fe I (mask==76) #test211013Tako
if Irwin==True:
QTref[jnp.where(QTmask == 76)[0]] = atomllapi.partfn_Fe(Tref)
S0 = -A*gupper*np.exp(-hcperk*elower/Tref)*np.expm1(-hcperk*nu_lines/Tref)\
/(8.0*np.pi*ccgs*nu_lines**2*QTref)
return(S0)
def gamma_vald3(T, PH, PHH, PHe, ielem, iion, \
nu_lines, elower, eupper, atomicmass, ionE, \
gamRad, gamSta, vdWdamp, enh_damp=1.0): #, vdW_meth="V"):
"""HWHM of Lorentzian (cm-1) caluculated as gamma/(4*pi*c) [cm-1] for lines with the van der Waals gamma in the line list (VALD or Kurucz), otherwise estimated according to the Unsoeld (1955)
Args:
T: temperature (K)
PH: hydrogen pressure (bar) #1 bar = 1e6 dyn/cm2
PHH: H2 molecule pressure (bar)
PHe: helium pressure (bar)
ielem: atomic number (e.g., Fe=26)
iion: ionized level (e.g., neutral=1, singly ionized=2, etc.)
nu_lines: transition waveNUMBER in [cm-1] (NOT frequency in [s-1])
elower: excitation potential (lower level) [cm-1]
eupper: excitation potential (upper level) [cm-1]
atomicmass: atomic mass [amu]
ionE: ionization potential [eV]
gamRad: log of gamma of radiation damping (s-1) (https://www.astro.uu.se/valdwiki/Vald3Format)
gamSta: log of gamma of Stark damping (s-1)
vdWdamp: log of (van der Waals damping constant / neutral hydrogen number) (s-1)
enh_damp: empirical "enhancement factor" for classical Unsoeld's damping constant cf.) This coefficient (enh_damp) depends on each species in some codes such as Turbospectrum. #tako210917
chi_lam (=h*nu=1.2398e4/wvl[AA]): energy of a photon in the line (computed)
C6: interaction constant (Eq.11.17 in Gray2005) (computed)
logg6: log(gamma6) (Eq.11.29 in Gray2005) (computed)
gam6H: 17*v**(0.6)*C6**(0.4)*N (computed) (v:relative velocity, N:number density of neutral perturber)
Texp: temperature dependency (gamma6 \sim T**((1-α)/2) ranging 0.3–0.4) (computed)
Returns:
gamma: pressure gamma factor (cm-1)
Note:
"/(4*np.pi*ccgs)" means: damping constant -> HWHM of Lorentzian in [cm^-1]
* Reference of van der Waals damping constant (pressure/collision gamma):
* Unsöld1955: https://ui.adsabs.harvard.edu/abs/1955psmb.book.....U
* Kurucz+1981: https://ui.adsabs.harvard.edu/abs/1981SAOSR.391.....K
* Barklem+1998: https://ui.adsabs.harvard.edu/abs/1998MNRAS.300..863B
* Barklem+2000: https://ui.adsabs.harvard.edu/abs/2000A&AS..142..467B
* Gray+2005: https://ui.adsabs.harvard.edu/abs/2005oasp.book.....G
"""
gamRad = jnp.where(gamRad==0., -99, gamRad)
gamSta = jnp.where(gamSta==0., -99, gamSta)
chi_lam = nu_lines/eV2wn #[cm-1] -> [eV]
chi = elower/eV2wn #[cm-1] -> [eV]
C6 = 0.3e-30 * ((1/(ionE-chi-chi_lam)**2) - (1/(ionE-chi)**2)) #possibly with "ION**2" factor?
gam6H = 1e20 * C6**0.4 * PH*1e6 / T**0.7
gam6He = 1e20 * C6**0.4 * PHe*1e6*0.41336 / T**0.7
gam6HH = 1e20 * C6**0.4 * PHH*1e6*0.85 / T**0.7
gamma6 = enh_damp * (gam6H + gam6He + gam6HH)
gamma_case1 = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
#Avoid nan (appeared by np.log10(negative C6))
gamma_case1 = jnp.where(jnp.isnan(gamma_case1), 0., gamma_case1)
Texp = 0.38 #Barklem+2000
gam6H = 10**vdWdamp * (T/10000.)**Texp * PH*1e6 /(kB*T)
gam6He = 10**vdWdamp * (T/10000.)**Texp * PHe*1e6*0.41336 /(kB*T)
gam6HH = 10**vdWdamp * (T/10000.)**Texp * PHH*1e6*0.85 /(kB*T)
gamma6 = gam6H + gam6He + gam6HH
gamma_case2 = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
#Adopt case2 for lines with vdW in VALD, otherwise Case1
gamma = (gamma_case1 * jnp.where(vdWdamp>=0., 1, 0) + gamma_case2 * jnp.where(vdWdamp<0., 1, 0))
return(gamma)
def gamma_uns(T, PH, PHH, PHe, ielem, iion, \
nu_lines, elower, eupper, atomicmass, ionE, \
gamRad, gamSta, vdWdamp, enh_damp=1.0): #, vdW_meth="U"):
"""HWHM of Lorentzian (cm-1) estimated with the classical approximation by Unsoeld (1955)
Args:
T: temperature (K)
PH: hydrogen pressure (bar) #1 bar = 1e6 dyn/cm2
PHH: H2 molecule pressure (bar)
PHe: helium pressure (bar)
ielem: atomic number (e.g., Fe=26)
iion: ionized level (e.g., neutral=1, singly ionized=2, etc.)
nu_lines: transition waveNUMBER in [cm-1] (NOT frequency in [s-1])
elower: excitation potential (lower level) [cm-1]
eupper: excitation potential (upper level) [cm-1]
atomicmass: atomic mass [amu]
ionE: ionization potential [eV]
gamRad: log of gamma of radiation damping (s-1) #(https://www.astro.uu.se/valdwiki/Vald3Format)
gamSta: log of gamma of Stark damping (s-1)
vdWdamp: log of (van der Waals damping constant / neutral hydrogen number) (s-1)
enh_damp: empirical "enhancement factor" for classical Unsoeld's damping constant cf.) This coefficient (enh_damp) depends on each species in some codes such as Turbospectrum. #tako210917
chi_lam (=h*nu=1.2398e4/wvl[AA]): energy of a photon in the line (computed)
C6: interaction constant (Eq.11.17 in Gray2005) (computed)
logg6: log(gamma6) (Eq.11.29 in Gray2005) (computed)
gam6H: 17*v**(0.6)*C6**(0.4)*N (v:relative velocity, N:number density of neutral perturber) (computed)
Texp: temperature dependency (gamma6 \sim T**((1-α)/2) ranging 0.3–0.4)(computed)
Returns:
gamma: pressure gamma factor (cm-1)
Note:
"/(4*np.pi*ccgs)" means: damping constant -> HWHM of Lorentzian in [cm^-1]
* Reference of van der Waals damping constant (pressure/collision gamma):
* Unsöld1955: https://ui.adsabs.harvard.edu/abs/1955psmb.book.....U
* Kurucz+1981: https://ui.adsabs.harvard.edu/abs/1981SAOSR.391.....K
* Barklem+1998: https://ui.adsabs.harvard.edu/abs/1998MNRAS.300..863B
* Barklem+2000: https://ui.adsabs.harvard.edu/abs/2000A&AS..142..467B
* Gray+2005: https://ui.adsabs.harvard.edu/abs/2005oasp.book.....G
"""
gamRad = jnp.where(gamRad==0., -99, gamRad)
gamSta = jnp.where(gamSta==0., -99, gamSta)
chi_lam = nu_lines/eV2wn #[cm-1] -> [eV]
chi = elower/eV2wn #[cm-1] -> [eV]
C6 = 0.3e-30 * ((1/(ionE-chi-chi_lam)**2) - (1/(ionE-chi)**2)) #possibly with "ION**2" factor?
gam6H = 1e20 * C6**0.4 * PH*1e6 / T**0.7
gam6He = 1e20 * C6**0.4 * PHe*1e6*0.41336 / T**0.7
gam6HH = 1e20 * C6**0.4 * PHH*1e6*0.85 / T**0.7
gamma6 = enh_damp * (gam6H + gam6He + gam6HH)
gamma_case1 = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
#Avoid nan (appeared by np.log10(negative C6))
gamma = jnp.where(jnp.isnan(gamma_case1), 0., gamma_case1)
return(gamma)
def gamma_KA3(T, PH, PHH, PHe, ielem, iion, \
nu_lines, elower, eupper, atomicmass, ionE, \
gamRad, gamSta, vdWdamp, enh_damp=1.0): #, vdW_meth="KA3"):
"""HWHM of Lorentzian (cm-1) caluculated with the 3rd equation in p.4 of Kurucz&Avrett1981
Args:
T: temperature (K)
PH: hydrogen pressure (bar) #1 bar = 1e6 dyn/cm2
PHH: H2 molecule pressure (bar)
PHe: helium pressure (bar)
ielem: atomic number (e.g., Fe=26)
iion: ionized level (e.g., neutral=1, singly ionized=2, etc.)
nu_lines: transition waveNUMBER in [cm-1] (NOT frequency in [s-1])
elower: excitation potential (lower level) [cm-1]
eupper: excitation potential (upper level) [cm-1]
atomicmass: atomic mass [amu]
ionE: ionization potential [eV]
gamRad: log of gamma of radiation damping (s-1) #(https://www.astro.uu.se/valdwiki/Vald3Format)
gamSta: log of gamma of Stark damping (s-1)
vdWdamp: log of (van der Waals damping constant / neutral hydrogen number) (s-1)
enh_damp: empirical "enhancement factor" for classical Unsoeld's damping constant cf.) This coefficient (enh_damp) depends on each species in some codes such as Turbospectrum. #tako210917
chi_lam (=h*nu=1.2398e4/wvl[AA]): energy of a photon in the line (computed)
C6: interaction constant (Eq.11.17 in Gray2005) (computed)
logg6: log(gamma6) (Eq.11.29 in Gray2005) (computed)
gam6H: 17*v**(0.6)*C6**(0.4)*N (v:relative velocity, N:number density of neutral perturber) (computed)
Texp: temperature dependency (gamma6 \sim T**((1-α)/2) ranging 0.3–0.4) (computed)
Returns:
gamma: pressure gamma factor (cm-1)
Note:
"/(4*np.pi*ccgs)" means: damping constant -> HWHM of Lorentzian in [cm^-1]
* Reference of van der Waals damping constant (pressure/collision gamma):
* Kurucz+1981: https://ui.adsabs.harvard.edu/abs/1981SAOSR.391.....K
* Barklem+1998: https://ui.adsabs.harvard.edu/abs/1998MNRAS.300..863B
* Barklem+2000: https://ui.adsabs.harvard.edu/abs/2000A&AS..142..467B
* Gray+2005: https://ui.adsabs.harvard.edu/abs/2005oasp.book.....G
"""
gamRad = jnp.where(gamRad==0., -99, gamRad)
gamSta = jnp.where(gamSta==0., -99, gamSta)
Zeff = iion #effective charge (=1 for Fe I, 2 for Fe II, etc.)
n_eff2_upper = Rcgs * Zeff**2 / (ionE*eV2wn - eupper) #Square of effective quantum number of the upper state
n_eff2_lower = Rcgs * Zeff**2 / (ionE*eV2wn - elower)
#Mean of square of radius (in units of a0, the radius of the first Bohr orbit; p.320 in Aller (1963); https://ui.adsabs.harvard.edu/abs/1963aass.book.....A)
msr_upper_iron = (45-ielem)/Zeff #for iron group elements (5th equation in Kurucz&Avrett1981)
msr_upper_noiron = jnp.where(n_eff2_upper>0., (2.5 * (n_eff2_upper/Zeff)**2), 25) #for other elements (6th equation in Kurucz&Avrett1981)
msr_upper = jnp.where((ielem >= 26) & (ielem <= 28), msr_upper_iron, msr_upper_noiron)
msr_lower = 2.5 * (n_eff2_lower/Zeff)**2
gap_msr = msr_upper - msr_lower
gap_msr_rev = gap_msr * jnp.where(gap_msr < 0, -1., 1.) #Reverse upper and lower if necessary (TBC) #test2109\\\\
gap_msr_rev_cm = a0**2 * gap_msr_rev #[Bohr radius -> cm]
gam6H = 17 * (8*kB*T*(1./atomicmass+1./1.)/(np.pi*m_u))**0.3 \
* (6.63e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PH*1e6 /(kB*T)
gam6He = 17 * (8*kB*T*(1./atomicmass+1./4.)/(np.pi*m_u))**0.3 \
* (2.07e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PHe*1e6 /(kB*T)
gam6HH = 17 * (8*kB*T*(1./atomicmass+1./2.)/(np.pi*m_u))**0.3 \
* (8.04e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PHH*1e6 /(kB*T)
gamma6 = gam6H + gam6He + gam6HH
gamma = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
return(gamma)
def gamma_KA4(T, PH, PHH, PHe, ielem, iion, \
nu_lines, elower, eupper, atomicmass, ionE, \
gamRad, gamSta, vdWdamp, enh_damp=1.0): #, vdW_meth="KA4"):
"""HWHM of Lorentzian (cm-1) caluculated with the 4rd equation in p.4 of Kurucz&Avrett1981
Args:
T: temperature (K)
PH: hydrogen pressure (bar) #1 bar = 1e6 dyn/cm2
PHH: H2 molecule pressure (bar)
PHe: helium pressure (bar)
ielem: atomic number (e.g., Fe=26)
iion: ionized level (e.g., neutral=1, singly ionized=2, etc.)
nu_lines: transition waveNUMBER in [cm-1] (NOT frequency in [s-1])
elower: excitation potential (lower level) [cm-1]
eupper: excitation potential (upper level) [cm-1]
atomicmass: atomic mass [amu]
ionE: ionization potential [eV]
gamRad: log of gamma of radiation damping (s-1) #(https://www.astro.uu.se/valdwiki/Vald3Format)
gamSta: log of gamma of Stark damping (s-1)
vdWdamp: log of (van der Waals damping constant / neutral hydrogen number) (s-1)
enh_damp: empirical "enhancement factor" for classical Unsoeld's damping constant
#cf.) This coefficient (enh_damp) depends on each species in some codes such as Turbospectrum. #tako210917
chi_lam (=h*nu=1.2398e4/wvl[AA]): energy of a photon in the line (computed)
C6: interaction constant (Eq.11.17 in Gray2005) (computed)
logg6: log(gamma6) (Eq.11.29 in Gray2005) (computed)
gam6H: 17*v**(0.6)*C6**(0.4)*N (v:relative velocity, N:number density of neutral perturber) (computed)
Texp: temperature dependency (gamma6 \sim T**((1-α)/2) ranging 0.3–0.4) (computed)
Returns:
gamma: pressure gamma factor (cm-1)
Note:
Approximation of case4 assume "that the atomic weight A is much greater than 4, and that the mean-square-radius of the lower level <r^2>_lo is small compared to <r^2>_up".
"/(4*np.pi*ccgs)" means: damping constant -> HWHM of Lorentzian in [cm^-1]
* Reference of van der Waals damping constant (pressure/collision gamma):
* Kurucz+1981: https://ui.adsabs.harvard.edu/abs/1981SAOSR.391.....K
* Barklem+1998: https://ui.adsabs.harvard.edu/abs/1998MNRAS.300..863B
* Barklem+2000: https://ui.adsabs.harvard.edu/abs/2000A&AS..142..467B
* Gray+2005: https://ui.adsabs.harvard.edu/abs/2005oasp.book.....G
"""
gamRad = jnp.where(gamRad==0., -99, gamRad)
gamSta = jnp.where(gamSta==0., -99, gamSta)
Zeff = iion #effective charge (=1 for Fe I, 2 for Fe II, etc.)
n_eff2_upper = Rcgs * Zeff**2 / (ionE*eV2wn - eupper) #Square of effective quantum number of the upper state
#Mean of square of radius (in units of a0, the radius of the first Bohr orbit; p.320 in Aller (1963); https://ui.adsabs.harvard.edu/abs/1963aass.book.....A)
msr_upper_iron = (45-ielem)/Zeff #for iron group elements (5th equation in Kurucz&Avrett1981)
msr_upper_noiron = jnp.where(n_eff2_upper>0., (2.5 * (n_eff2_upper/Zeff)**2), 25) #for other elements (6th equation in Kurucz&Avrett1981)
msr_upper = jnp.where((ielem >= 26) & (ielem <= 28), msr_upper_iron, msr_upper_noiron)
gamma6 = 4.5e-9 * msr_upper**0.4 \
* ((PH + 0.42*PHe + 0.85*PHH)*1e6/(kB*T)) * (T/10000.)**0.3
gamma = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
return(gamma)
def gamma_KA3s(T, PH, PHH, PHe, ielem, iion, \
nu_lines, elower, eupper, atomicmass, ionE, \
gamRad, gamSta, vdWdamp, enh_damp=1.0): #, vdW_meth="KA3s"): (supplemetary)
"""(supplemetary:) HWHM of Lorentzian (cm-1) caluculated with the 3rd equation in p.4 of Kurucz&Avrett1981 but without discriminating iron group elements
Args:
T: temperature (K)
PH: hydrogen pressure (bar) #1 bar = 1e6 dyn/cm2
PHH: H2 molecule pressure (bar)
PHe: helium pressure (bar)
ielem: atomic number (e.g., Fe=26)
iion: ionized level (e.g., neutral=1, singly ionized=2, etc.)
nu_lines: transition waveNUMBER in [cm-1] (NOT frequency in [s-1])
elower: excitation potential (lower level) [cm-1]
eupper: excitation potential (upper level) [cm-1]
atomicmass: atomic mass [amu]
ionE: ionization potential [eV]
gamRad: log of gamma of radiation damping (s-1) #(https://www.astro.uu.se/valdwiki/Vald3Format)
gamSta: log of gamma of Stark damping (s-1)
vdWdamp: log of (van der Waals damping constant / neutral hydrogen number) (s-1)
enh_damp: empirical "enhancement factor" for classical Unsoeld's damping constant cf.) This coefficient (enh_damp) depends on each species in some codes such as Turbospectrum. #tako210917
chi_lam (=h*nu=1.2398e4/wvl[AA]): energy of a photon in the line (computed)
C6: interaction constant (Eq.11.17 in Gray2005) (computed)
logg6: log(gamma6) (Eq.11.29 in Gray2005) (computed)
gam6H: 17*v**(0.6)*C6**(0.4)*N (v:relative velocity, N:number density of neutral perturber) (computed)
Texp: temperature dependency (gamma6 \sim T**((1-α)/2) ranging 0.3–0.4)(computed)
Returns:
gamma: pressure gamma factor (cm-1)
Note:
"/(4*np.pi*ccgs)" means: damping constant -> HWHM of Lorentzian in [cm^-1]
* Reference of van der Waals damping constant (pressure/collision gamma):
* Kurucz+1981: https://ui.adsabs.harvard.edu/abs/1981SAOSR.391.....K
* Barklem+1998: https://ui.adsabs.harvard.edu/abs/1998MNRAS.300..863B
* Barklem+2000: https://ui.adsabs.harvard.edu/abs/2000A&AS..142..467B
* Gray+2005: https://ui.adsabs.harvard.edu/abs/2005oasp.book.....G
"""
gamRad = jnp.where(gamRad==0., -99, gamRad)
gamSta = jnp.where(gamSta==0., -99, gamSta)
Zeff = iion #effective charge (=1 for Fe I, 2 for Fe II, etc.)
n_eff2_upper = Rcgs * Zeff**2 / (ionE*eV2wn - eupper) #Square of effective quantum number of the upper state
n_eff2_lower = Rcgs * Zeff**2 / (ionE*eV2wn - elower)
#Mean of square of radius (in units of a0, the radius of the first Bohr orbit; p.320 in Aller (1963); https://ui.adsabs.harvard.edu/abs/1963aass.book.....A)
msr_upper_noiron = jnp.where(n_eff2_upper>0., (2.5 * (n_eff2_upper/Zeff)**2), 25) #for other elements (6th equation in Kurucz&Avrett1981)
msr_upper = msr_upper_noiron
msr_lower = 2.5 * (n_eff2_lower/Zeff)**2
gap_msr = msr_upper - msr_lower
gap_msr_rev = gap_msr * jnp.where(gap_msr < 0, -1., 1.) #Reverse upper and lower if necessary (TBC) #test2109\\\\
gap_msr_rev_cm = a0**2 * gap_msr_rev #[Bohr radius -> cm]
gam6H = 17 * (8*kB*T*(1./atomicmass+1./1.)/(np.pi*m_u))**0.3 \
* (6.63e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PH*1e6 /(kB*T)
gam6He = 17 * (8*kB*T*(1./atomicmass+1./4.)/(np.pi*m_u))**0.3 \
* (2.07e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PHe*1e6 /(kB*T)
gam6HH = 17 * (8*kB*T*(1./atomicmass+1./2.)/(np.pi*m_u))**0.3 \
* (8.04e-25*ecgs**2/hcgs*(gap_msr_rev_cm))**0.4 \
* PHH*1e6 /(kB*T)
gamma6 = gam6H + gam6He + gam6HH
gamma = (gamma6 + 10**gamRad + 10**gamSta) /(4*np.pi*ccgs)
return(gamma)
| 50.239892
| 195
| 0.646387
| 2,936
| 18,639
| 4.046662
| 0.115463
| 0.00909
| 0.027355
| 0.042084
| 0.881828
| 0.874253
| 0.868698
| 0.866089
| 0.862975
| 0.850013
| 0
| 0.08367
| 0.203605
| 18,639
| 370
| 196
| 50.375676
| 0.716384
| 0.640056
| 0
| 0.745763
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.050847
| false
| 0
| 0.033898
| 0
| 0.084746
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5b4191235812fe350556a7c709b4d580ffa71c78
| 1,452
|
py
|
Python
|
e/mail-relay/web/apps/mail/migrations/0099_auto_20170522_1050.py
|
zhouli121018/nodejsgm
|
0ccbc8acf61badc812f684dd39253d55c99f08eb
|
[
"MIT"
] | null | null | null |
e/mail-relay/web/apps/mail/migrations/0099_auto_20170522_1050.py
|
zhouli121018/nodejsgm
|
0ccbc8acf61badc812f684dd39253d55c99f08eb
|
[
"MIT"
] | 18
|
2020-06-05T18:17:40.000Z
|
2022-03-11T23:25:21.000Z
|
e/mail-relay/web/apps/mail/migrations/0099_auto_20170522_1050.py
|
zhouli121018/nodejsgm
|
0ccbc8acf61badc812f684dd39253d55c99f08eb
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('mail', '0098_auto_20170522_0940'),
]
operations = [
migrations.AddField(
model_name='checksettings',
name='hrisk_diff_sender_count',
field=models.IntegerField(default=3, help_text='\u4e00\u5929\u5185 \u540c\u4e00\u53d1\u4ef6\u4eba\u540d\u79f0\u4e0d\u540c\u503c\u8d85\u8fc7N\u6b21\uff0c \u5219\u5728\u4ee5\u540e\u7684M\u65f6\u95f4\u5185\u62e6\u622a\u5176\u6240\u6709\u90ae\u4ef6\uff0c\u5e76\u653e\u5165\u201c\u9ad8\u5371\u53d1\u4ef6\u4eba\u201d\u8fdb\u884c\u4eba\u5de5\u5ba1\u6838', verbose_name='\u540d\u79f0\u4e0d\u540c\u7684\u9ad8\u5371\u53d1\u4ef6\u4eba(\u4e0d\u540c\u6b21\u6570)'),
),
migrations.AddField(
model_name='checksettings',
name='hrisk_diff_sender_time',
field=models.IntegerField(default=600, help_text='\u5355\u4f4d:\u5206\u949f, \u4e00\u5929\u5185 \u540c\u4e00\u53d1\u4ef6\u4eba\u540d\u79f0\u4e0d\u540c\u503c\u8d85\u8fc7N\u6b21\uff0c \u5219\u5728\u4ee5\u540e\u7684M\u65f6\u95f4\u5185\u62e6\u622a\u5176\u6240\u6709\u90ae\u4ef6\uff0c\u5e76\u653e\u5165\u201c\u9ad8\u5371\u53d1\u4ef6\u4eba\u201d\u8fdb\u884c\u4eba\u5de5\u5ba1\u6838', verbose_name='\u540d\u79f0\u4e0d\u540c\u7684\u9ad8\u5371\u53d1\u4ef6\u4eba(\u62e6\u622a\u65f6\u95f4)'),
),
]
| 58.08
| 493
| 0.727961
| 193
| 1,452
| 5.373057
| 0.435233
| 0.057859
| 0.086789
| 0.077146
| 0.707811
| 0.707811
| 0.707811
| 0.707811
| 0.707811
| 0.594021
| 0
| 0.302983
| 0.12259
| 1,452
| 24
| 494
| 60.5
| 0.510989
| 0.014463
| 0
| 0.333333
| 0
| 0.222222
| 0.624913
| 0.575227
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.277778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5b65fe986703c88dc6c6311604c63bde04922d18
| 156
|
py
|
Python
|
src/utils/__init__.py
|
SgtMilk/stock-prediction
|
2fa9cf851b536ea1cd4fbcf9f767581b36ee38ad
|
[
"MIT"
] | null | null | null |
src/utils/__init__.py
|
SgtMilk/stock-prediction
|
2fa9cf851b536ea1cd4fbcf9f767581b36ee38ad
|
[
"MIT"
] | null | null | null |
src/utils/__init__.py
|
SgtMilk/stock-prediction
|
2fa9cf851b536ea1cd4fbcf9f767581b36ee38ad
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2021 Alix Routhier-Lalonde. Licence included in root of package.
from .print_colors import Colors
from .get_base_path import get_base_path
| 31.2
| 80
| 0.814103
| 25
| 156
| 4.88
| 0.76
| 0.114754
| 0.180328
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02963
| 0.134615
| 156
| 4
| 81
| 39
| 0.874074
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
|
0
| 7
|
5b69199ebae324de3e7475ef77bae21f2ca8255e
| 14,026
|
py
|
Python
|
optimade-python-tools/tests/validator/test_utils.py
|
attlevafritt/tfya92-groupa-optimade-python-tools
|
43e462ce70cf50a20f21a0aefb15d39db265773b
|
[
"MIT"
] | null | null | null |
optimade-python-tools/tests/validator/test_utils.py
|
attlevafritt/tfya92-groupa-optimade-python-tools
|
43e462ce70cf50a20f21a0aefb15d39db265773b
|
[
"MIT"
] | null | null | null |
optimade-python-tools/tests/validator/test_utils.py
|
attlevafritt/tfya92-groupa-optimade-python-tools
|
43e462ce70cf50a20f21a0aefb15d39db265773b
|
[
"MIT"
] | null | null | null |
import pytest
from optimade.validator.utils import test_case as validator_test_case
from optimade.validator.utils import ResponseError
from optimade.validator.validator import ImplementationValidator
try:
import simplejson as json
except ImportError:
import json
@validator_test_case
def dummy_test_case(_, returns, raise_exception=None):
"""Dummy function that returns what is passed it,
optionally raising an exception.
"""
if raise_exception:
raise raise_exception
return returns
def test_normal_test_case():
"""Check test_case under normal conditions."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
output = dummy_test_case(validator, ([1, 2, 3], "message"), request="test_request")
assert validator.results.success_count == 1
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] == [1, 2, 3]
assert output[1] == "message"
def test_optional_test_case():
"""Check test_case for optional case."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
output = dummy_test_case(
validator, ("string response", "message"), request="test_request", optional=True
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 1
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] == "string response"
assert output[1] == "message"
def test_ignored_test_case():
"""Check test_case is ignored when receiving `None`."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
# Test returns None, so should not increment success/failure
output = dummy_test_case(validator, (None, "message"), request="test_request")
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "message"
def test_skip_optional_test_case():
"""Check test_case skips a test when optional."""
validator = ImplementationValidator(
base_url="http://example.org", verbosity=0, run_optional_tests=False
)
# Test is optional and validator should not be running optional tests, so it should
# return hardcoded (None, "skipping optional").
output = dummy_test_case(
validator, ({"test": "dict"}, "message"), request="test_request", optional=True
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "skipping optional"
# Now check that the same test returns the correct values when not marked as optional
output = dummy_test_case(
validator, ({"test": "dict"}, "message"), request="test_request", optional=False
)
assert validator.results.success_count == 1
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] == {"test": "dict"}
assert output[1] == "message"
def test_expected_failure_test_case():
"""Check test_case reports a "failure" when `ResponseError` is raised."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
# Test is optional and validator should not be running optional tests, so it should
# return hardcoded (None, "skipping optional").
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=ResponseError("Dummy error"),
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "ResponseError: Dummy error"
assert (
validator.results.failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with error"
)
assert validator.results.failure_messages[-1][1] == "ResponseError: Dummy error"
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=ResponseError("Dummy error"),
optional=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 1
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "ResponseError: Dummy error"
assert (
validator.results.optional_failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with error"
)
assert (
validator.results.optional_failure_messages[-1][1]
== "ResponseError: Dummy error"
)
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=json.JSONDecodeError("Dummy JSON error", "{}", 0),
optional=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 2
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert (
output[1]
== "Critical: unable to parse server response as JSON. JSONDecodeError: Dummy JSON error: line 1 column 1 (char 0)"
)
assert (
validator.results.optional_failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with error"
)
assert (
validator.results.optional_failure_messages[-1][1]
== "Critical: unable to parse server response as JSON. JSONDecodeError: Dummy JSON error: line 1 column 1 (char 0)"
)
def test_unexpected_failure_test_case():
"""Check test_case catches unexpected errors as internal failures."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
# Raise some unexpected exception and make sure it is logged as an internal error
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=FileNotFoundError("Unexpected error"),
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 1
assert output[0] is None
assert output[1] == "FileNotFoundError: Unexpected error"
assert (
validator.results.internal_failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with internal error"
)
assert (
validator.results.internal_failure_messages[-1][1]
== "FileNotFoundError: Unexpected error"
)
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=FileNotFoundError("Unexpected error"),
optional=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 2
assert output[0] is None
assert output[1] == "FileNotFoundError: Unexpected error"
assert (
validator.results.internal_failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with internal error"
)
assert (
validator.results.internal_failure_messages[-1][1]
== "FileNotFoundError: Unexpected error"
)
def test_multistage_test_case():
"""Check test_case's `multistage` functionality works as expected."""
validator = ImplementationValidator(base_url="http://example.org", verbosity=0)
# Test that multistage requests do nothing but return unless they've failed
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
multistage=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] == {"test": "dict"}
assert output[1] == "message"
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=ResponseError("Stage of test failed"),
multistage=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "ResponseError: Stage of test failed"
assert (
validator.results.failure_messages[-1][0]
== "http://example.org/test_request - dummy_test_case - failed with error"
)
assert (
validator.results.failure_messages[-1][1]
== "ResponseError: Stage of test failed"
)
def test_fail_fast_test_case():
"""Check test_case's `fail_fast` feature works as intended."""
validator = ImplementationValidator(
base_url="http://example.org", verbosity=0, fail_fast=True
)
# Check that optional failures do not trigger fail fast
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=ResponseError("Optional test failed"),
optional=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 1
assert validator.results.internal_failure_count == 0
assert output[0] is None
assert output[1] == "ResponseError: Optional test failed"
assert validator.results.optional_failure_messages[-1][0] == (
"http://example.org/test_request - dummy_test_case - failed with error"
)
assert (
validator.results.optional_failure_messages[-1][1]
== "ResponseError: Optional test failed"
)
# Check that the same non-optional failures do trigger fail fast
with pytest.raises(SystemExit):
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=ResponseError("Non-optional test failed"),
optional=False,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 1
assert validator.results.internal_failure_count == 0
assert validator.results.failure_messages[-1][0] == (
"http://example.org/test_request - dummy_test_case - failed with error"
)
assert (
validator.results.failure_messages[-1][1]
== "ResponseError: Non-optional test failed"
)
# Check that an internal error also triggers fast
with pytest.raises(SystemExit):
output = dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=FileNotFoundError("Internal error"),
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 1
assert validator.results.optional_failure_count == 1
assert validator.results.internal_failure_count == 1
assert validator.results.internal_failure_messages[-1][0] == (
"http://example.org/test_request - dummy_test_case - failed with internal error"
)
assert (
validator.results.internal_failure_messages[-1][1]
== "FileNotFoundError: Internal error"
)
def test_that_system_exit_is_fatal_in_test_case():
"""Check that test_case treats `SystemExit` as fatal."""
validator = ImplementationValidator(
base_url="http://example.org", verbosity=0, fail_fast=False
)
with pytest.raises(SystemExit, match="Fatal error"):
dummy_test_case(
validator,
({"test": "dict"}, "message"),
request="test_request",
raise_exception=SystemExit("Fatal error"),
optional=True,
)
assert validator.results.success_count == 0
assert validator.results.optional_success_count == 0
assert validator.results.failure_count == 0
assert validator.results.optional_failure_count == 0
assert validator.results.internal_failure_count == 0
| 37.603217
| 123
| 0.69143
| 1,636
| 14,026
| 5.736553
| 0.085575
| 0.156633
| 0.229728
| 0.127437
| 0.868194
| 0.837507
| 0.80895
| 0.807033
| 0.806819
| 0.788066
| 0
| 0.014687
| 0.203907
| 14,026
| 372
| 124
| 37.704301
| 0.825811
| 0.090689
| 0
| 0.688963
| 0
| 0.006689
| 0.170622
| 0
| 0
| 0
| 0
| 0
| 0.414716
| 1
| 0.033445
| false
| 0
| 0.023411
| 0
| 0.060201
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
5b8360063197b68bfffda4364be639d818907f54
| 6,851
|
py
|
Python
|
tests/suite/test_virtual_server_tls_redirect.py
|
saptagiri1983/kubernetes-ingress
|
de8d38465db60f76436a8c391096b296670baa7b
|
[
"Apache-2.0"
] | 1
|
2021-03-14T20:03:36.000Z
|
2021-03-14T20:03:36.000Z
|
tests/suite/test_virtual_server_tls_redirect.py
|
SpenZerX/kubernetes-ingress
|
389302d00f19c68867df0aecab610b3e0ed37da4
|
[
"Apache-2.0"
] | null | null | null |
tests/suite/test_virtual_server_tls_redirect.py
|
SpenZerX/kubernetes-ingress
|
389302d00f19c68867df0aecab610b3e0ed37da4
|
[
"Apache-2.0"
] | 12
|
2020-02-27T07:17:12.000Z
|
2022-03-09T00:56:58.000Z
|
import pytest
import requests
from settings import TEST_DATA
from suite.custom_resources_utils import patch_virtual_server_from_yaml
from suite.resources_utils import wait_before_test
@pytest.mark.vs
@pytest.mark.parametrize('crd_ingress_controller, virtual_server_setup',
[({"type": "complete", "extra_args": [f"-enable-custom-resources"]},
{"example": "virtual-server-tls-redirect", "app_type": "simple"})],
indirect=True)
class TestVirtualServerTLSRedirect:
def test_tls_redirect_defaults(self, kube_apis, crd_ingress_controller, virtual_server_setup):
patch_virtual_server_from_yaml(kube_apis.custom_objects,
virtual_server_setup.vs_name,
f"{TEST_DATA}/virtual-server-tls-redirect/virtual-server-default-redirect.yaml",
virtual_server_setup.namespace)
wait_before_test(1)
resp_1 = requests.get(virtual_server_setup.backend_1_url,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False)
resp_2 = requests.get(virtual_server_setup.backend_2_url,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False)
assert resp_1.status_code == 301, "Expected: a redirect for scheme=http"
assert resp_2.status_code == 301, "Expected: a redirect for scheme=http"
resp_3 = requests.get(virtual_server_setup.backend_1_url_ssl,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False, verify=False)
resp_4 = requests.get(virtual_server_setup.backend_2_url_ssl,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False, verify=False)
assert resp_3.status_code == 200, "Expected: no redirect for scheme=https"
assert resp_4.status_code == 200, "Expected: no redirect for scheme=https"
def test_tls_redirect_based_on_header(self, kube_apis, crd_ingress_controller, virtual_server_setup):
patch_virtual_server_from_yaml(kube_apis.custom_objects,
virtual_server_setup.vs_name,
f"{TEST_DATA}/virtual-server-tls-redirect/virtual-server-header-redirect.yaml",
virtual_server_setup.namespace)
wait_before_test(1)
resp_1 = requests.get(virtual_server_setup.backend_1_url,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "http"},
allow_redirects=False)
resp_2 = requests.get(virtual_server_setup.backend_2_url,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "http"},
allow_redirects=False)
assert resp_1.status_code == 308, "Expected: a redirect for x-forwarded-proto=http"
assert resp_2.status_code == 308, "Expected: a redirect for x-forwarded-proto=http"
resp_3 = requests.get(virtual_server_setup.backend_1_url_ssl,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "http"},
allow_redirects=False, verify=False)
resp_4 = requests.get(virtual_server_setup.backend_2_url_ssl,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "http"},
allow_redirects=False, verify=False)
assert resp_3.status_code == 308, "Expected: a redirect for x-forwarded-proto=http"
assert resp_4.status_code == 308, "Expected: a redirect for x-forwarded-proto=http"
resp_5 = requests.get(virtual_server_setup.backend_1_url,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "https"},
allow_redirects=False)
resp_6 = requests.get(virtual_server_setup.backend_2_url,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "https"},
allow_redirects=False)
assert resp_5.status_code == 200, "Expected: no redirect for x-forwarded-proto=https"
assert resp_6.status_code == 200, "Expected: no redirect for x-forwarded-proto=https"
resp_7 = requests.get(virtual_server_setup.backend_1_url_ssl,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "https"},
allow_redirects=False, verify=False)
resp_8 = requests.get(virtual_server_setup.backend_2_url_ssl,
headers={"host": virtual_server_setup.vs_host, "x-forwarded-proto": "https"},
allow_redirects=False, verify=False)
assert resp_7.status_code == 200, "Expected: no redirect for x-forwarded-proto=https"
assert resp_8.status_code == 200, "Expected: no redirect for x-forwarded-proto=https"
def test_tls_redirect_based_on_scheme(self, kube_apis, crd_ingress_controller, virtual_server_setup):
patch_virtual_server_from_yaml(kube_apis.custom_objects,
virtual_server_setup.vs_name,
f"{TEST_DATA}/virtual-server-tls-redirect/virtual-server-scheme-redirect.yaml",
virtual_server_setup.namespace)
wait_before_test(1)
resp_1 = requests.get(virtual_server_setup.backend_1_url,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False)
resp_2 = requests.get(virtual_server_setup.backend_2_url,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False)
assert resp_1.status_code == 302, "Expected: a redirect for scheme=http"
assert resp_2.status_code == 302, "Expected: a redirect for scheme=http"
resp_3 = requests.get(virtual_server_setup.backend_1_url_ssl,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False, verify=False)
resp_4 = requests.get(virtual_server_setup.backend_2_url_ssl,
headers={"host": virtual_server_setup.vs_host},
allow_redirects=False, verify=False)
assert resp_3.status_code == 200, "Expected: no redirect for scheme=https"
assert resp_4.status_code == 200, "Expected: no redirect for scheme=https"
| 64.028037
| 119
| 0.613487
| 792
| 6,851
| 4.965909
| 0.109848
| 0.175184
| 0.19222
| 0.096618
| 0.906433
| 0.897025
| 0.886092
| 0.870837
| 0.86804
| 0.864989
| 0
| 0.020582
| 0.297913
| 6,851
| 106
| 120
| 64.632075
| 0.797089
| 0
| 0
| 0.645161
| 0
| 0
| 0.186834
| 0.070063
| 0
| 0
| 0
| 0
| 0.172043
| 1
| 0.032258
| false
| 0
| 0.053763
| 0
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
5be9cb017a3e7ec061eec9d798e5f658dd9d2d9b
| 62,539
|
py
|
Python
|
kryp/dist2/dist/pytransform/__init__.py
|
Kemixd3/Updated-streamlit-app
|
d113321f692737bcd6422b239694866d4c1a1979
|
[
"Apache-2.0"
] | null | null | null |
kryp/dist2/dist/pytransform/__init__.py
|
Kemixd3/Updated-streamlit-app
|
d113321f692737bcd6422b239694866d4c1a1979
|
[
"Apache-2.0"
] | null | null | null |
kryp/dist2/dist/pytransform/__init__.py
|
Kemixd3/Updated-streamlit-app
|
d113321f692737bcd6422b239694866d4c1a1979
|
[
"Apache-2.0"
] | null | null | null |
__pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x09\x00\x61\x0d\x0d\x0a\x08\x2d\xa0\x01\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\xc9\x3c\x00\x00\x00\x00\x00\x10\x97\x40\x02\x87\xaa\xb9\x2e\xee\x02\x16\x50\x2b\xda\xfb\xde\x7d\x00\x00\x00\x00\x00\x00\x00\x00\xe4\xf8\x92\xef\xbb\x9d\xc8\x6f\x1e\x9f\x51\x2e\x84\x88\x9a\x6a\xd6\x8d\x57\xdf\x35\x1c\xda\x88\xfa\x7b\x54\xc2\xe7\xa0\xf6\x9c\x19\x61\x23\x71\x9e\x80\x1b\xf1\xf1\x78\x99\xcc\x00\xf4\x51\x67\x3a\xde\x9a\x46\xf6\x1d\xd0\x71\x56\xf0\x86\x94\xe9\x0b\x86\x98\xbe\xdc\x2d\xc9\xf6\x31\xb2\x5b\xeb\xf4\x8b\x41\xa5\x42\x86\x7a\x76\x10\xfc\x0c\xf9\x8e\xe7\x86\x07\xb8\xd5\x45\x82\xb0\xc2\x47\x0d\x62\x6e\x56\x11\xd9\xe3\x1a\xe9\x19\x18\xdf\x97\x03\x5a\x9e\x72\xf7\x55\x14\x07\xfa\x82\x87\x02\xf4\xa5\x20\xe0\xfb\x4c\x2c\x46\xa4\xd2\xfb\xa7\xa6\xed\xa9\xc3\xb4\xbc\x64\x56\x0d\x67\xd3\x15\x28\xaf\xc6\xa3\x6f\x24\xc6\x94\x72\xe0\xb4\xdc\xe3\x97\x9e\xce\xc6\x88\xb7\x5c\x84\xa7\x6c\x62\x21\xad\x73\xe2\xf9\x93\xd6\xa0\xb6\x53\xd9\x4f\x78\x70\xb1\x26\xb2\x93\xc5\x23\xf9\x99\xea\x16\xd3\x25\x59\x29\x21\x78\x5e\xd5\x2e\x74\x87\x0f\xc8\x12\x7d\xc5\x7c\xde\x5a\xce\x4d\xc8\xee\x71\x5f\x0b\x66\x4b\x39\x22\x95\xef\xa3\x2d\xeb\x40\x86\x5b\xb4\x78\xcd\x45\x5f\xd1\x99\xa6\x16\x89\xb0\xfc\xb6\x8a\xdf\x82\xaa\x4b\xff\x7a\xda\x64\xf3\xef\x1f\x9a\x7e\x17\x5c\xb7\x57\xe2\xd1\x1b\x56\x19\x64\x17\x25\xb8\x80\x4e\xb2\x4f\x67\x96\xcf\x3b\xb6\x12\xed\xbe\xa0\x0f\x1c\x40\x17\x00\xda\x13\xce\x4c\x47\xad\x34\x79\x93\xab\x19\x32\x12\x12\x76\xe4\x9b\x38\xf8\xdf\xa9\x3e\x3c\x69\xf2\xaa\x56\x48\x68\x73\x98\x6e\xa6\xb3\x3b\xdb\x41\x2a\x34\xd6\xa7\x78\xed\x7d\x44\x4c\xd2\x89\x14\x83\x5f\x41\x54\xe4\x09\x3b\xec\xc0\xc7\x3a\xfb\x92\x06\x7c\xdf\xe7\x58\x6b\xa3\x13\x54\xd9\xe0\x7e\x86\xa7\x7a\x7a\xf5\xb7\x13\xf4\xce\xf3\x55\xc5\x32\x37\x8c\x84\xa0\xeb\x2e\x7c\x8b\x86\x7b\xdf\xbd\x4d\xa9\x1b\x6e\xba\x4c\x10\x5e\xfd\x1f\xbe\xff\x14\x77\xa7\xeb\x0c\x25\xc1\xe9\x2f\xc0\xd3\x49\x56\xbd\x9d\xe9\x79\xaa\x36\xaf\x62\xe7\xb3\x60\xcc\xac\xc3\x4d\x8d\xbd\xc4\x81\xef\x71\xd8\xa3\x67\x02\x6c\x88\x90\xad\x27\x1b\x20\x54\x94\xb7\x5d\xc6\xd8\x27\x9e\x6e\x72\xaa\xce\x19\xb1\xc6\xf7\xf1\xac\x6d\x35\x51\xa6\xf7\xcb\xc4\xd6\xb0\x80\x1f\x65\x3b\x5d\x55\x42\x5e\x05\x96\x5a\x1b\x17\x46\x25\x9d\xf1\x86\x6a\x3e\x88\x27\xd7\x3b\xbe\xc5\xe3\x78\xcd\xce\xdc\x28\x6e\x9f\x56\x0e\x91\x59\x57\x3f\x85\x60\x6e\xc9\x8d\x49\x19\x26\x79\xf6\x10\x09\xce\x9e\x87\xb6\xfe\x18\x42\x16\xed\x65\x69\x66\x55\x0a\xf2\x6a\x13\x7e\xd8\x4f\xac\x6f\x17\x39\x47\x30\xd3\x6e\x52\x67\xc7\x05\xac\xc4\xe1\x9c\x9b\x2d\xaa\xb8\x7a\x87\x7c\x7b\x9b\xa1\x57\x2b\x78\x60\xe8\x67\x65\xab\xa8\x12\xd2\x0a\x37\xbf\xaa\x48\x5d\x6a\x25\x54\xbe\x74\x55\x00\x55\xb8\x15\x55\x70\x05\xfa\xa2\x42\x3b\x58\xf7\x6b\x0c\xc6\x63\x7b\x21\x4a\x85\xd9\xdd\x94\x21\xee\x02\x99\xc3\x66\x7c\x06\x4a\x06\x06\xbf\x3f\xce\x99\x56\xe3\x0e\x57\x9d\x15\x0e\x07\x96\xda\xeb\xb6\x04\x2b\x5f\x1d\xa3\xda\xc6\x72\x75\xd6\x34\x45\x3d\x1f\x3b\x07\x86\xfd\x77\x23\xe1\xe4\xe1\x74\x47\xfe\xcc\x59\x90\x3f\x59\x3c\xd8\xcb\xe3\xae\xae\xcc\x08\xe6\x42\xe3\x89\x5c\xc0\x24\xd0\x91\x12\x6d\x75\xb7\x77\xee\xdd\x23\xff\xc0\x75\xd8\x4d\x1a\xf4\x62\x4e\xef\xf9\x31\xc7\x5e\x75\x91\x72\x62\xea\x7a\x04\x67\x00\xbd\xec\x6a\x38\x4d\x73\xf9\xbc\xfc\x18\x12\x40\x8d\xd6\x60\x8b\x85\x56\x00\xf2\x50\x59\xcb\x7e\x51\x9b\x58\x6f\x4c\x25\xf9\x20\xae\x6d\x18\x82\x1e\x4d\xb9\x94\x75\x86\xdc\x8a\x55\xfc\x4f\x84\x0a\xc6\x9e\xee\x73\xf5\x65\xf8\x9c\xf0\x10\x29\x1c\x54\x08\xfa\xed\x31\x4d\x62\x3a\xf0\x42\x98\xdb\xd4\xb0\x55\x67\xd3\xdc\xb2\x2d\x65\x8d\xa3\x74\xef\x50\x8a\xf4\xc5\x3a\xe9\x24\x83\xc9\x93\x22\x6c\x6f\xea\x0b\xe7\xa5\xb7\x59\x4c\x55\x35\x3c\xcf\xd7\x26\x21\x1a\x15\x71\x22\x9a\x00\xdd\xb6\xbd\x8a\xb9\xf1\xfc\xf8\xbf\xa2\xda\x48\x98\x18\x4d\xe0\x2b\xf6\xba\x2f\xdc\xd9\x2e\x64\x33\xf6\x0b\xd6\x5c\x0f\x81\x61\xba\xac\x29\x6c\xc1\x89\x14\x5f\x8d\x20\xc1\x42\x3b\x31\xd3\xba\x01\x3e\xb0\xdc\xa1\xff\x2d\x1e\x7e\x84\x00\x14\x40\x45\xb5\x5c\x84\x1f\xa3\x06\xe4\xb6\xbf\x7a\x61\xab\xf9\x12\xf6\x00\xac\x4a\x25\x6d\x94\x58\xe1\xe0\x8c\x09\x3e\xfb\x95\x1a\xa8\x82\xda\x03\x11\x00\x64\x33\xe3\xf6\xb6\xfc\xfe\xe8\xed\x2c\xe3\xa5\x38\x52\x30\x47\x12\xf0\x1f\x20\xbd\x6d\xcd\x53\x9f\x9f\x85\x55\x94\x77\x9c\x35\x09\xde\x81\xb8\x44\xbf\x52\x27\x88\x32\xf8\x5f\xa6\xfd\xac\x34\x4e\xdb\xf4\xc1\x99\x2b\x3e\xb3\xae\x4d\xc0\x42\x71\x41\x5c\x3d\x46\x23\x78\x00\xe8\x75\xdf\x19\x0c\x10\xb3\x81\x4b\x2b\x6a\x0d\x93\x58\x82\xf5\xfe\xd8\xbd\x34\xf4\xd9\x69\xb4\xed\x4d\xd9\xeb\xe3\x84\x8f\x78\x24\xe3\x78\xf2\xdb\x9b\x37\xf6\x5a\x36\xec\xaa\x5a\xc9\x53\x11\x19\xf7\xf9\x14\x56\x54\x7a\xc1\x57\x67\x0d\xe7\x4f\x00\x17\xe7\xa7\x44\xd8\x04\x94\x0e\xa4\x65\x9e\x67\xd3\xbe\xe5\xbd\xb8\x2d\x7a\x7e\xeb\xb4\x01\xf1\x53\xc8\xe2\x72\xf3\x13\xbc\x96\x02\xf2\x24\xbb\x29\xfb\xf3\xe8\x1c\xa8\x9f\x66\x75\x9e\x9a\xe6\xdf\x5f\x4c\xf6\x75\x06\x2f\x63\x86\x77\x36\xd3\xd6\x0d\xa8\x63\xd7\xa6\x07\x13\x70\xe8\xbf\x75\x46\xa6\x5f\xe1\xf6\xb8\x20\xb3\xcd\x6d\x23\xde\x71\xda\xcc\xde\x99\x88\x01\x60\x7d\x15\xf9\x19\x6f\x22\x44\x33\x96\x33\x4c\x4f\xdf\xc4\x9f\x65\xf8\x3c\xfb\xfe\x62\xb3\xcf\x8b\x22\x47\x87\x91\xfd\xa6\x2d\x66\x37\xce\xc2\x91\xfc\x07\xaf\xce\xe8\xb1\xb8\x72\x76\x04\x60\x8e\x00\x4e\x0e\xb3\x8f\x04\xed\xcf\x4d\xa4\xc9\x97\x55\x36\x3d\xec\xcd\xed\xb0\xb1\x7e\x8e\x93\xaf\x95\xfd\x31\x2d\x3b\xc1\x22\xb1\x29\xb2\x99\xd6\xd2\xb5\x0c\x3e\x2d\x0a\x58\xa7\x50\xd1\xf8\xa2\x5f\x88\xdf\x06\xb4\xd4\xd6\x39\xf2\xd9\x24\x9d\x3b\xd0\x8a\xed\xee\x2a\xc6\x0f\x88\x5f\x97\xb4\xbd\x8e\x78\x37\xa5\x4b\xd2\xb8\x7d\x15\xf0\xd7\xa9\x16\xf4\x32\x8a\x25\x13\x92\xbe\xdd\x9e\x80\x4a\xc1\x35\x9b\x82\xc1\xd3\xd0\x57\xc8\x2d\x0d\x06\x39\x26\x0b\x42\xa7\x80\x9d\x19\xe7\x5c\xa0\xea\x8c\x88\xcd\x7c\x87\x11\x16\x8c\x62\x76\xab\xf7\x6c\xbb\x16\xfe\x4c\xa1\x63\xca\xf8\x61\x71\x92\xce\xf6\x98\x46\x62\xce\x48\xf1\x49\x73\xd2\x5f\x99\x39\x93\xc1\x95\xbf\xee\x81\x12\x90\xde\x53\xe8\xd2\x3b\x3f\x38\xbf\xaf\x98\xca\x2d\xd3\x4f\xef\x68\x99\xb9\x6f\x0f\x84\x31\xa5\x55\xad\x7a\x70\x33\xe5\x2a\x0a\x39\xf4\x62\x32\xd0\x51\x6a\xaa\x41\x62\x78\x10\x30\x94\xd2\x44\xbf\x49\xc1\xa3\x1b\xe8\x98\x54\xc6\xb6\x13\xf1\xb7\xdc\x15\xa6\x23\x9e\xf4\xcb\xd5\x29\x88\xdb\x42\xc1\xd3\x3b\xb0\x40\x17\x0d\x77\x4d\xb7\x6e\xe4\x84\xcb\x59\xed\x20\x73\x00\xff\x09\xd2\x07\x8f\x55\xc6\xe7\x83\xf9\xc6\xe6\x1e\xbc\x3d\x3e\xe5\x7e\x07\x07\x2d\xc5\x67\xd1\x1d\xca\x9f\xaa\x57\x3d\x0a\x51\x8e\x2f\x0c\xf2\xa5\x0d\xef\x06\xeb\x58\x45\x4c\x04\x15\x6d\xc4\x1a\x2d\x2f\xf7\x89\x65\x80\x1c\xbc\xa9\xb4\xe9\x3f\x5d\x56\xfe\xf1\x7a\x39\x3a\x54\xcc\x0d\x93\x97\x5c\xe9\x10\xc1\x02\x19\xe0\x5b\xe0\x20\x19\x6a\xb4\xdc\x7d\xcd\x93\xd7\xd9\x8f\x61\x02\x44\x2b\xcf\x1d\x82\x4f\xdc\x92\x0b\xd5\x18\x9e\xa6\xdf\xa3\x63\x74\x11\x9c\x60\xc0\xd4\xc8\x4f\x48\x14\x29\x4d\xc8\x21\xcb\xd7\xfb\x9b\x2e\xc4\xc8\x41\xab\x6e\x18\x3e\xd1\x56\xfa\xfb\xaf\x63\x0f\x52\x85\x5e\xc5\x1e\x30\x6f\x30\x2e\x5d\x55\x04\x39\x96\x00\x34\x3c\x3f\x76\x67\xda\x07\x3b\xb1\x9d\xc7\x33\xae\x47\xdb\x4c\x68\x5f\xc1\xa4\x30\x0f\x69\x2b\x94\x41\xde\xe9\x7a\x71\xcd\xf0\xa8\x2b\x57\xa8\xc9\xfb\xb2\xe6\x42\x6f\x74\xa1\x3a\x72\xb4\xeb\x56\xbf\xaa\x6a\x85\x67\x27\xd2\x76\xd6\x6d\xe5\x41\x96\xb4\x24\xa5\xfd\xa5\xca\x2a\x99\x4a\x5c\x9d\xa8\x5d\xf0\x47\x39\xc9\xd5\xe3\x95\xc0\xe8\xae\xd3\x39\xa9\x2a\x33\x2e\x78\x6e\xc3\xe3\x71\x8b\xf7\x79\x23\xff\x56\xdc\xdc\xc5\x77\x7b\x0f\x22\x74\x47\x5f\x15\xfd\x06\x06\x0f\xc8\xa3\x09\x47\x52\xe6\x56\x3b\xf1\xc6\x38\x48\x5b\x83\xd5\xb1\x13\x51\xc5\xd0\xc9\x9d\xc7\x40\xa8\x66\xd9\x6b\xa2\xf7\x8f\x2c\x23\x16\x5c\x53\x6c\xcd\x9d\xd6\x51\x9f\x1d\x22\x2d\x38\x8d\xa5\x73\x40\xd1\x6e\x70\x92\x21\x90\x40\x52\x38\xcd\xd4\x32\x73\xc8\x8b\x62\x68\x99\xda\xa4\x35\xcf\xd2\x2f\x5a\x7c\xcb\x3c\x92\x73\x9b\x25\xa7\x1b\x05\x12\x79\x56\xa1\x07\x8e\x0f\xf3\xc0\x01\xef\xe4\xfc\x20\xa4\xad\xb9\xfb\xd6\x51\xc9\x56\x45\xfd\x48\x8a\x40\x20\xcd\xc4\x98\xad\x3c\xd2\x73\xf8\xf4\xbe\xe9\x17\x4a\x89\xa8\x5a\x30\xa6\xfe\x1c\xf5\xfc\xb8\x8b\xc8\x58\x09\x02\x74\xe1\xd1\x8e\x4d\xa2\x79\xb5\x41\xdf\xa8\xa7\x1d\x7c\x04\x71\xd7\x12\xf0\xa9\x83\x36\x40\xec\xcd\xa6\x82\x65\x20\x26\xd2\x94\xb9\x8b\xc4\x4a\x24\xf6\x10\x95\xe4\xf4\x80\xc5\xa2\x23\x9e\x56\xa9\x32\xc5\xd8\xf4\xd0\xdc\x56\x68\x55\x9a\xcf\x13\x49\xbe\x8d\x35\x6f\x55\xef\xb2\x00\x65\xad\x94\x6a\xa5\x16\xd7\x17\x58\xc2\x05\x6a\xd6\x96\x1d\x75\xa9\xd5\xdd\xf9\x10\x57\xae\x16\x22\x9b\xf4\x1e\xef\xe1\xa2\xb5\x1f\xa2\x65\x7e\x8c\xfd\xd1\x03\x08\x52\x3f\x18\x10\xa9\x5c\x67\x66\x58\xe9\xcd\xf7\xca\x50\x18\x07\x68\xb8\x1c\xb3\x39\x6d\xfa\x87\x4b\x40\x6a\x00\xe7\xb7\x43\x35\x62\xd1\x24\xd3\x1b\xd8\xb2\xf2\x00\xc1\x5c\x04\x51\xe1\xba\x20\x8f\x6a\xba\x56\x11\x58\x92\x1b\x37\x5b\x85\xfd\x36\xae\x7d\x57\x08\xb4\xe3\xf1\x60\x80\x18\x3a\x7b\xc5\xe6\x5e\x17\x79\xde\x8a\x47\x0d\xe5\x63\x69\xcc\xc8\x1d\xc4\x25\x3c\xf8\xd0\xdf\x8d\x5b\x12\xa5\x7a\xdd\xa5\x1c\x74\x6f\xc9\x18\xa3\x9e\x1d\xe1\x5d\x17\x2b\xb6\x3d\x9f\xb7\xcb\x1c\xf8\x47\xb9\x85\x8f\x63\x12\x13\x8e\xa5\xf9\xe1\xf9\x6e\xe6\xb7\x1a\xa0\x52\x24\x29\x21\x50\xbb\x80\xc7\xdc\x69\x98\xe9\x9f\xb0\xc4\x44\xcb\x9a\x98\x23\x5f\xd4\xe6\xda\xed\x43\x45\xbe\x94\x7a\x20\x1b\x0a\xd8\xa7\xdc\x1a\x18\x4c\x46\x31\xd2\xbd\xc0\x5e\x28\x76\xa7\x5e\xfa\x5b\xf9\x39\x01\x75\x85\xc6\x14\x7a\xca\x57\xa3\x69\x2c\x3a\x30\xa4\x00\xe3\xdc\x66\xc7\xab\xa3\x18\xfb\xb1\xcf\x8c\xe3\xa8\xd7\xcc\x92\x66\x94\x3e\x34\x73\x4b\xd3\xb9\x33\x1c\x24\xa6\x3b\x28\x0e\x0c\x54\xec\xbf\xd9\xb4\x26\xb0\xab\xb8\xae\x74\xcf\x63\x2d\x02\x1a\x62\x3e\xc6\x93\xc8\xf4\x32\xd4\x82\x3c\xd9\xba\xd3\x0a\xf0\xec\x87\x37\x8d\x99\xbd\x8e\x42\x62\xb6\xea\xe8\xf2\x48\xef\xaf\x53\xee\xa2\x38\xb7\xde\xd1\x6f\xf4\xc9\xb1\xa6\x8a\x38\xbc\x08\x6e\xb5\x3d\x7e\x4e\x72\xcb\x67\x12\xd8\x00\x23\xc8\xfb\x64\xe6\x61\x27\x03\x94\x80\x17\x71\x87\x2a\xc4\x04\x1b\xd2\x98\x85\xd8\x8c\x63\x2e\x62\xe3\xfe\x71\x44\xf9\xbe\x87\xe4\x16\x73\xae\x5d\xd8\x74\x00\x92\x58\x41\x95\x2d\x5f\x59\x4f\x0a\x69\xa7\xa7\xc7\x72\x07\x49\x09\xab\xdc\xc2\xd5\x44\x5b\x38\x4a\x0e\x15\x2b\x83\x1c\x87\x2c\xda\x98\x0e\x5c\x00\x5e\x70\xd8\xfa\xc2\x97\xdb\xcf\x7f\x0a\x34\x8d\x95\x8e\x69\xb1\xa3\x61\x1a\x22\x85\x17\x03\x96\x8e\xb9\x6a\xd9\xa0\x0a\x92\x17\xdd\x7d\xcc\x92\xdd\x99\x8a\x2e\xac\x11\x96\xed\xe8\xd8\xfe\x97\x25\xd7\x3b\x89\x7a\x56\xf5\x25\xab\x2f\x59\x1d\x59\xb9\x73\xc9\x13\x7d\xd5\xa2\xf8\xc0\x9b\x1e\xe3\xd1\x90\xac\xf3\xab\x32\x37\xfd\xd2\x08\xb9\xb8\xac\x20\xe8\x44\xb6\xcc\x07\x8d\x36\x09\xa2\x74\xf6\x85\xe2\x41\x7f\x5a\x74\x70\x1d\x6c\xee\x3d\x27\x44\xe8\x47\xf7\x36\x20\xec\x15\x5c\x51\x66\xa4\x5d\x22\x7a\x47\xa1\x5d\x00\x39\x60\xab\x2e\x98\xec\x7c\x7d\x37\x00\x5a\xdb\xa5\xaa\x12\xe7\xce\x03\x22\x08\xd9\x85\x30\x15\xcf\x7d\x15\xde\xb9\xf2\xf2\x87\x5e\x8a\x0f\xee\xbc\xfc\x92\x4a\xf8\x3e\xee\xca\x3e\xa8\x15\xc2\x0b\x05\x8a\x1d\xf6\x02\xe9\xdf\xd8\x29\x41\xe5\x62\x35\xe0\x94\x3e\x89\x81\x15\x67\xe9\x5e\x4c\x8f\x1f\x6d\xcc\x23\x9d\x27\x57\xf8\x49\x23\xef\x64\x48\x72\x33\xdd\xce\x08\x5f\xa0\xac\x3f\x29\xb0\x5f\xb2\x7c\xa1\x58\x5c\x6c\x80\x20\xf2\x36\x45\xe7\x3a\xb9\x48\x3d\x2f\x64\xbc\xdc\x87\x75\xd5\x17\xd5\x5c\x8e\x45\x58\x00\xc5\xf0\x99\xc6\x33\xdb\xbb\x01\x25\x95\xe1\x21\x9a\x4f\xf3\x09\xad\x0d\x3c\x9e\xa6\xbb\x27\x52\x33\x49\x25\x1f\x0c\x39\x67\xc7\xd6\x23\x3b\xc5\xf9\x31\x54\x2b\x9b\x6f\x0e\xc6\x85\x48\xc0\x25\x91\x1c\xc9\xab\x8a\x8d\xca\x9e\xcc\x41\x79\xeb\x0d\x0c\xb1\x59\xe5\x54\x3a\xfe\x7b\x5a\x6f\xc0\x9d\x7a\xac\x40\x20\x5e\xb9\xd4\x18\xf5\xb0\xc8\x75\x53\x81\xdc\xee\xb8\xcc\x51\x6a\xc9\x51\x85\x19\x31\x4b\xc8\x89\x79\xc7\xeb\x2e\xe4\x46\x67\x1c\x2c\x75\x3a\x53\xb0\x2b\x2f\xe8\x48\xbf\x7a\xe3\x3d\x2b\xe9\x78\x07\xb9\x91\x18\xb5\x35\xad\x0e\xb1\x86\x61\xa0\xc7\x49\xb8\xb2\x78\xc3\xa9\x28\x0a\xb4\x84\xf5\x1b\xa9\x2c\xc2\xb4\x87\x75\xa2\x0c\xa3\x18\xb2\x92\xfb\x40\x62\x5a\x27\x6d\x12\x92\x60\x16\x82\x02\x72\x8d\x6b\x40\xfd\x4d\x12\xa3\x11\x1b\x31\x86\x63\x61\x94\x97\x2d\xb7\x3c\xb6\xc8\x1d\xdf\x48\xe3\x68\x2d\x3b\xe0\x45\x11\x45\xa5\x01\xbb\x83\x27\x08\x7c\xab\xc4\x73\x60\x93\x6f\x40\x06\x4a\xfd\x91\xe4\xbb\x01\xee\x30\x69\x67\x6b\x79\xd6\xd9\x69\xd9\xc5\x8d\x22\x8a\x34\xf0\x50\x65\x0a\x33\x2c\x28\x5b\x80\xfb\x95\xe1\x14\x94\x54\xfe\x43\xfb\x54\x83\x03\xd0\xaf\x4b\xba\x16\x77\xf1\x01\xb0\x19\x58\xfe\x2c\xa6\x16\x2b\x1a\xea\xcb\xb0\x8a\x89\xe9\x4d\x14\x27\xf6\x8e\xe3\x1f\x61\x7e\x0a\x3f\xe2\xd5\x05\x62\x53\x1e\xf2\x29\x96\xbb\x2a\x7b\x7d\x54\x12\xc9\x0d\xcc\x04\x2e\x2f\x06\x7d\x15\x25\x94\x56\x27\x20\x63\x30\x04\xcf\xfe\x1b\xaf\xc1\x0d\xa8\xdc\xd4\x19\xa2\xf3\xae\xcf\xa3\x1b\xae\x5f\xaf\xf3\x5f\x8d\x69\xae\xd8\xd6\x61\xd9\xc5\xa3\xb8\x9a\xc6\x98\xf1\x1b\x65\x07\x37\xe1\xd9\x2e\x43\x59\xf0\x8b\x45\x99\x60\x5b\xb8\xb8\xa1\x28\x0d\x58\xee\xee\xae\x85\x7b\x95\x5d\xfb\x38\xea\xab\xae\x95\x92\xca\x2a\x77\x8c\x5a\xf9\xa2\xfe\x4b\x1e\x26\x71\x4d\x88\x8d\x85\x9c\x6f\xc0\xec\x3b\x60\xcf\xc9\xd3\x1a\xdc\xd9\x3b\x24\x99\xa2\x1a\xa3\xf5\xa5\x04\x90\x36\xc9\x6e\xcb\xd7\x8b\x84\xb2\xf2\xbb\x8e\x89\xd3\x49\x47\x90\xc0\x22\x5f\x52\xb7\x1f\xc6\xf4\x5d\xd9\x48\xf2\x84\x53\xfe\x20\x02\x85\xa3\x96\xfa\x65\x7c\xbe\xfa\x8d\x34\x0d\x7e\x73\x70\x20\x4f\x14\x12\xc6\x7d\x33\x84\x1d\x41\xe3\x48\x93\x22\x6a\xe9\x38\xd5\x69\x00\x56\xa8\xef\x43\xf3\xa0\x88\x5a\xfe\x26\xe3\x66\x0b\x7a\x8b\xdc\x3e\xd8\xa7\x99\xe0\xc3\xe5\x63\xb5\xe0\x6a\x31\xa6\x92\x7d\xc7\x98\xdb\x33\x7b\x7c\xfa\x5a\xff\x66\x06\x33\xe5\xc3\x28\x1f\x3d\x5a\x42\xdb\x79\x0e\x2f\x6b\x6d\x32\xae\x61\xa3\x9e\x45\xb3\xf8\x83\x7b\xc9\x0f\xb9\x8c\x9b\x0e\xf2\x78\x12\x71\xc8\x63\x15\xab\x1e\x94\x87\xcf\xc7\xf3\x83\x21\x88\x87\x2e\xf7\x43\xef\x6a\xd1\xc4\xb7\x35\x05\x66\xc4\xba\x41\xeb\x78\x19\xf1\xf5\x13\x13\xe7\xd8\xf9\x72\x14\x8d\xa6\x17\x58\x85\xd4\x6d\x2b\x9a\x1c\x7e\x72\xed\x91\xa5\x7c\xaf\x9b\xbd\x48\xde\x11\x03\xb9\x97\x5f\x15\x30\x32\x3d\xd0\xf4\x83\x17\x34\x30\xa1\xc2\x72\xf9\x03\x89\x2e\x75\xb1\xf1\x5e\xd8\x35\xab\x5d\x57\x60\xd7\xdb\x4d\x28\x0b\x6a\xcf\x96\x7b\xaf\xda\x39\x11\xd8\xbe\x75\x83\xff\x53\x67\xf7\x37\x43\x67\x7e\x8b\xe1\xa8\x90\xcf\x2a\x02\xc1\x86\x0f\x00\xaa\xc3\x47\xec\xa0\x95\xbb\xf4\x90\x8c\x40\x74\x7c\xd9\xbb\x35\xe5\xed\x08\x08\x04\x66\xe5\xc6\x80\xd2\x84\x49\x30\x0d\x12\x9c\xd0\x3f\x62\xa7\x5e\xdf\xe9\xad\xff\xd8\xfb\x53\x8f\x7d\x70\x05\xbc\xa1\x9f\xa4\xcc\x2e\x4b\x25\x11\x35\x03\xa8\x49\x03\x21\x69\xfe\x89\x36\x39\x3c\x5c\x1e\x40\x2b\x3f\x80\x1d\xd2\x4e\x1e\x4f\x32\x1b\xd3\x90\x69\xc5\x01\xa0\x30\xca\x81\xad\x19\x66\x00\x7b\x75\xb0\xf2\x88\xd2\x73\x00\xd3\x14\x57\x28\x9c\x9b\x4f\xf7\x15\x0d\x7d\xef\xfd\x6d\xff\x28\xbe\x89\x82\x2b\x5e\x41\x58\x9c\x31\xd5\xfa\xea\xf2\xe4\xe9\xff\xa8\x54\x5a\x66\x31\x07\xbf\xea\xa5\x2a\x6e\x64\x75\x61\x32\x89\xa2\x54\x0d\x4d\x3c\x08\x1a\x31\xaf\x5c\xb6\xd5\xa1\xc8\xfd\x88\x8c\x7e\x57\x9c\x2c\x9c\x7e\x07\xae\xf9\xe1\x60\xdf\xf3\x66\x09\x99\x97\x51\xe5\x76\x76\xce\xdb\xc2\x65\x55\x19\x62\x06\x47\xc8\x69\xf8\x83\x03\x2d\xe1\xce\x47\xb8\x88\x2f\x3e\xbd\xb7\xf0\xb5\x14\x5c\xd6\xc8\x8a\x20\x5a\x67\xea\xa1\xa5\xce\xd3\xcb\x2d\x83\x15\xd8\xa8\xbe\x55\xad\x7d\x9c\x18\xbd\x71\x7a\x96\xd1\x96\x68\x13\x65\xbe\x59\x48\x46\xcc\x64\xf9\x30\x9a\x45\xc6\xc4\x73\xbb\x26\x5b\x50\x10\x39\x6d\x5a\x62\xa1\x9d\x24\xc2\xf3\xfc\x6d\x2f\xd3\xd0\x02\x72\x96\x16\x3c\xef\xc6\x1a\x2d\xcb\xe8\x14\x68\xd1\xaf\x89\x26\x30\xd2\xff\x16\xc5\x5b\xbd\xbb\x53\x04\x1b\x41\x5e\xe7\x2f\xeb\xf9\x78\x2c\xd3\xaf\xe6\x8c\x52\x27\x21\x7b\x6e\xf8\x0a\x0b\xb5\xe8\x6c\xd7\xd6\x42\xae\x7c\x5a\x78\xb7\x2c\xca\xcc\x9f\x80\xae\x1e\x7e\x3c\x77\xdf\xd3\xac\x04\xb8\xeb\xd5\xa9\x61\x52\xc1\x72\x73\x63\x06\xe6\x44\x25\xd4\x25\x04\x07\x8a\xc6\x73\x41\xd6\xb9\x37\x34\x26\x8c\x78\x3c\x92\x69\x2d\x58\x57\x36\xc0\x8a\x45\x5c\x6e\xcb\xd7\xfb\x4e\xa1\x34\x5b\x60\xda\x64\x5c\x06\xd6\x75\x0d\xb5\x0b\xfd\xe6\x61\xda\x28\x71\xf8\xd0\xde\x83\xd2\xbd\x4a\x91\x63\x78\xf7\x01\xce\x30\x09\x88\x01\x25\x5c\xfe\x7a\xa2\x7d\x05\x82\x3f\x8d\xaa\x2c\x14\x35\x5c\xa1\x65\xfd\x39\x60\x2f\xf1\x42\x94\x67\xe1\x96\x1e\x01\x75\x25\x1a\xc7\x32\x8b\x38\x1f\xa3\x67\xe3\xfc\xcf\x6d\xef\xd8\x08\xc3\x61\x0d\xc6\x41\x90\x71\x6d\x12\x51\xdb\xd1\xa1\xc6\x54\x59\x88\x46\xf1\x57\xcc\x3e\x87\xd1\xc2\x14\xe1\x54\x24\xd0\xf0\x69\xce\xee\x92\x88\xb4\xa7\x39\x2b\x2b\x12\xc2\x7c\xdf\x42\xa2\xb6\x94\x07\xb9\x2a\x43\x67\x4a\x0d\xe6\x01\x4a\xcf\x4c\x40\x0d\x77\xe3\xde\x85\x77\x96\x56\xb2\x20\xb0\x6a\x86\xf5\xab\xd2\x7e\x79\x9e\x03\x37\x37\xac\x48\x6b\xa3\xa8\xce\x78\x8e\x79\x33\xa4\xec\x6a\x33\x56\x27\x44\x06\x53\x9f\x30\xff\x27\xd4\xf1\x66\x38\x25\x83\xd8\x82\xab\xa2\xfc\x2e\x52\x24\x87\xbf\x02\xc9\x09\xbf\xd1\x2f\xf8\x64\xa2\x15\x22\x15\xad\x6b\x62\x3a\x8e\x03\xa4\x95\xd6\xf7\xc8\xe4\x2e\x50\x20\xcb\xa1\xf2\xb1\xd9\x79\x51\x5e\x06\x82\xfa\x7c\x33\x2a\x5c\x96\x3c\x90\xc7\xd6\x8d\x01\x88\x9e\xeb\x10\xe4\x0d\xf2\xe9\x98\xff\x2e\x56\x3a\xfa\x72\xbb\x63\xb8\xad\x3e\x88\x25\xd8\xcf\x07\xd2\x74\x03\x34\xec\x83\xc6\x07\x84\x41\xa3\x91\xa8\xfb\x4c\x00\x22\x17\x24\xeb\xa2\x7e\xe8\xad\x03\xdb\x97\x7a\x58\xfa\x65\xac\xc3\x4d\x55\x6b\xb9\x85\x2d\xdf\xc9\xa2\x42\xd4\x36\x87\x6d\xc5\x01\xe3\xb5\x78\x56\x59\xe7\xda\x59\x57\x02\x0e\x61\xde\x71\xbb\xfe\x75\xde\x5a\x21\xd4\x45\x67\x0f\x88\x54\x00\xc1\xac\xf5\x19\xf9\x98\xe9\x1b\x62\xb6\x03\x8a\x86\x51\x83\x50\xa4\x92\x4b\x78\xe1\x64\x1d\xfd\x08\x81\x2f\x6e\xdf\x2b\x84\xf0\x76\x4c\x3a\xb1\xd1\xc6\x5f\xb3\x6e\x95\x80\xe5\x87\x2e\xc3\xbc\x4e\x08\x0f\xb7\x1f\x33\x61\x3a\x2f\x9f\x98\xe3\x65\x08\x45\x81\xdc\x66\x54\x91\x34\xf6\xd4\xf4\x2f\xa3\x55\xa5\x5d\xf2\xda\x7b\x12\x6e\x64\xb3\x1e\xbc\x13\x41\xd9\xf2\xd3\xf6\xaf\xe8\xdd\xa0\xc8\xec\x61\x97\x97\x8f\x30\x9d\x05\xa1\x78\xb7\xfd\x4f\x8d\x0a\xb3\x46\x2b\xd9\xb0\xf3\x54\x0a\xb6\x41\x67\x60\x11\x09\xd1\x56\x97\xe3\xb9\xb4\x0a\x73\x08\xe6\xea\xef\x20\x3e\xf1\x1d\xa3\x76\x30\xb5\xca\xf4\x4e\x85\x42\x34\x0a\x00\x01\x0e\x6e\x74\xa6\x34\xf2\xaa\xf5\xdc\x68\xa5\x45\x28\xe9\x51\xa8\xc5\x63\xb2\xcf\x79\x01\x73\x2a\xed\x20\x86\x3b\xfc\x77\xc3\xa0\x5b\xaa\x0d\x96\x32\x5e\x0e\xd4\xbb\x72\xe2\x8f\xc5\x77\x89\x7e\x2d\x5f\xbb\xb1\x75\x6f\x6e\x78\xd5\xc8\x9a\xd4\xea\xfe\x3f\x10\xcb\xaa\x4a\xf4\xf9\x65\x76\x82\xd6\xfd\x39\x5f\x38\xec\x0c\x94\x9b\xae\xce\x66\x4c\x1e\x0e\xb5\x3e\x79\xf7\x9d\xfd\x6c\x00\x61\xa4\x88\x17\x0f\xcb\x87\x36\x35\xba\x07\x11\x40\xa4\xc0\x64\x8a\x21\xb9\x92\x6f\x6b\xe1\x03\xa4\xd3\xc3\xcd\xf2\x50\xe1\xfa\x70\xc1\xd3\x45\x80\xbf\x3b\x88\x50\xba\x92\xd1\xde\xc1\x18\x1b\x35\x17\x86\xaa\xc1\xb8\xd5\x26\x70\xc2\x04\x4b\x72\xee\xa4\xc3\x3b\x31\xca\xfc\xd7\xdd\xaf\x14\xb0\x21\x62\x90\x53\xa6\xde\xec\x57\x02\xe3\x8f\x8b\x93\x5a\x9d\x39\xa0\xce\xb9\xa3\x5e\xb5\x9d\xdc\x1b\x61\xfa\xb8\xa9\xb4\x34\x49\xb5\xa0\x4c\xe4\xff\x0e\xc6\x57\x04\x5a\x14\x30\x32\xbd\x6f\xfd\x22\x3c\xf6\x26\x78\x1c\x30\x94\x04\x47\x1d\x12\xaa\xf2\x58\x27\x52\x9a\xbc\xfa\xa4\x9c\x9c\x64\x01\x9a\x5e\x04\x40\x8c\xe5\xd6\x98\x6b\x7c\x6b\x4a\xe9\x9b\x5a\xe5\x4b\x2d\x00\x40\x9d\x84\x37\x7d\xb6\x81\xf8\xcc\xae\x2b\x49\x78\xc0\x0b\x0b\x96\x88\xaf\xcd\x87\xec\xc0\x62\x0a\x3a\x5b\x53\x74\xf6\x2c\x72\xf0\x29\x41\x6b\x82\x91\x0d\x57\xd9\xb5\x14\x6f\x0a\xa8\xa2\x92\xe3\x59\x2e\x3b\xb7\xa9\x9b\xbf\x5b\x8e\x18\x8e\x8a\xe3\x06\x85\x82\xa5\xfe\xe8\x2c\x00\xaf\x75\x45\xf7\x1d\xcd\x70\x8c\x97\x42\x69\xf0\xd3\x85\x98\x40\xbf\x5c\xf6\x98\x65\x59\xee\x8e\xa8\x1f\x3a\x1a\xf3\x56\x16\x76\xb2\x80\xa0\xe4\xd2\x69\x87\x6a\x67\x5f\x0d\xc1\xb9\xae\x82\x98\x9c\x72\x79\x6d\xaa\x22\x9b\xd0\x15\x82\x65\x10\xe3\xa5\x2b\xbd\x25\x3b\xc1\x3a\xcb\xc5\x8a\xf3\x7d\x92\x67\x8c\xeb\x42\x11\xec\x52\xbe\x1b\xa5\x29\x77\x69\xd9\x18\xdb\x80\x8d\xc1\x05\xfe\x7f\x2f\x12\xa9\x33\x9b\x45\x50\x26\x82\x9f\xd0\x72\xba\x33\x03\xdd\x19\x5d\x23\x07\xa2\x3b\x60\xc7\xe3\x63\x79\xb8\x85\x44\xbb\xe8\xcd\x45\xdb\x26\x7b\x6b\xbd\xac\xfe\x81\xfc\xbb\x7b\x20\x45\xf6\x16\x4d\x79\xc3\xad\x80\xac\x49\x68\x82\x10\x2f\xc3\x41\x0e\x67\xf4\xb3\x06\x68\x60\xe4\x77\x61\x28\x8a\xf3\xfb\x13\x9b\x8d\x8c\x4f\x4b\x79\x92\x7d\x38\x84\xe0\x5a\xd3\x5d\xe0\x12\xa7\xc5\x5e\xbe\x85\x53\x17\x81\xa4\x81\x6c\x57\xa8\xf7\x6d\xf8\x4a\xd9\x29\xc9\x87\x17\x44\x7c\x27\xf0\x18\xea\x1f\x8c\x10\x2e\x68\x50\xc1\x8d\x46\x0c\x56\xa7\x07\xaa\x32\x0e\xe5\x04\xad\xa2\xec\x0d\xf0\xa2\x5f\x61\x72\x72\x03\xa8\xbd\x6e\xd4\x0c\xa2\xd9\x2e\x28\x42\xea\x56\xc2\x18\x0d\x6b\x38\x6d\x65\x8e\xc7\xa9\x8b\x66\x6e\xce\x9f\x29\xfa\x46\x2e\x75\xfa\xc3\x4b\x87\xa0\xf3\x55\x2c\x8c\x11\x42\xf4\xea\xda\x55\x36\x80\x0c\xf9\x87\x11\x59\xb0\x47\x3d\xbe\xfe\xe6\x57\x0a\x31\x61\x03\x60\x92\x5b\xea\x32\xc0\xae\xee\x77\x29\xc1\x17\xc5\x36\x4e\x0b\x9b\x5d\x93\xb8\x44\x3c\x99\xb8\xf0\x05\xac\x97\xfa\x88\xb5\xfe\x60\xbc\x59\xc6\xb0\x58\x5a\x6c\x55\xbd\x24\x46\x32\x96\x40\xd5\x3a\x26\x38\xd7\x4a\x6a\x5c\xef\x85\xb6\xfc\xdd\x10\x7c\x8d\x2d\x40\x02\x3b\x23\x06\x73\x5a\x09\xad\x96\x51\xbf\x9e\x7e\xf4\x9c\xb2\xd9\x54\xb1\xe3\xc2\x33\xa8\x78\x73\xd4\x4f\x9d\x4f\x59\x6c\xaa\x16\x78\x16\x9a\x64\xae\x42\x56\xf0\x0b\xa1\xa3\xae\x8a\xc3\x4a\x46\xd0\xeb\x6b\x09\xb0\x73\xdd\x33\xcb\xa0\x39\xd0\x67\x76\x1f\x7a\xdf\xfc\x04\x89\x2d\x26\x04\x6a\x40\xde\x28\xad\xdb\x72\xcb\x62\xbb\xdd\xc0\x1c\x84\x5e\xfa\x0a\xb3\x7a\x37\x5c\x25\x76\xdc\xe4\x02\x57\xd7\x0d\x3c\x0d\x3b\x4e\x70\x53\xf0\x65\x4b\xe5\x9a\x5e\x55\x45\x8c\xc5\xb7\xec\xc4\x20\x1f\x3d\x03\xc2\xc2\xae\x04\x0c\xde\xac\x7e\xb2\xe4\x43\xc4\x7e\xb7\xde\x22\x56\xbb\x31\xed\xc9\xbb\x96\x6f\x65\xb2\xd8\x3e\x7c\x4a\x14\xef\xde\x6f\x72\x19\x97\x86\x20\x62\xb7\xe6\xef\x1b\x6c\x2c\x1c\x74\x6b\xb1\xe0\x83\xb3\xf0\x43\x61\x75\x44\x3f\xf6\x88\xe7\x9a\x11\x56\x5a\xf5\x8b\x92\x97\xcb\x75\x9b\xd9\x57\x17\x16\x8d\xbb\x7c\xff\xd1\xcb\x6f\xa6\x7e\x09\xad\xf2\xec\xfb\x3a\x51\xe2\xd8\xe7\x6a\xee\xfa\x0c\x7d\x01\x4e\xcc\xb4\x15\x4a\xd0\xfa\xcb\x4a\x22\xf1\xac\x34\x9d\x5c\x22\x49\x12\x57\x09\xa1\xb2\x07\x90\xde\x4d\xb4\x83\x6a\xa0\x8e\x90\x3e\x56\xf5\x0b\xbf\x20\xeb\xc9\x4a\xee\x16\x80\xaa\x3f\x6d\x81\xdf\x2e\x76\x6f\xd2\x03\x82\x0f\xbc\x4e\x0c\xbd\xdd\x42\xaf\xc4\x91\xe5\x14\x32\x72\x9a\x5e\x27\xce\xd9\x40\x6e\xdc\x2c\x02\x0a\x1a\x43\xa9\xfd\x1e\xd2\x53\xbf\xd3\xc9\x71\xd1\x0a\xb6\xe3\x67\xe5\x68\xb3\xae\x32\x3b\xc7\x31\xc0\x2e\x90\xd4\xfb\x9b\x6e\xa2\x0e\x28\x2f\x46\x4a\x70\x1a\x1f\xa0\x23\x6f\x5e\x5a\xf9\x08\xa7\x15\x7c\xb0\xd7\x30\x09\x86\x32\x58\xcc\x51\xbe\xf3\x19\xaf\xa5\x52\xae\x5b\xe3\x56\xef\xa1\x93\xf5\x38\x68\xd1\xf6\x57\xd8\x64\x9b\xa9\x2c\xa0\xa2\x76\x47\x0f\xcb\xbb\x06\xff\xa2\x3e\xd9\x35\x40\x63\x51\xf2\x6f\x30\x7f\xad\x9e\x98\xc8\xef\xeb\xe1\x55\x7f\x1d\xf6\xb4\x36\xe5\x6d\x31\x3a\x00\xea\xe9\x63\x7c\x9f\x98\x86\x48\x3e\xf8\x33\xab\xb0\xc5\xb4\x2e\xcf\xd6\x3c\xb4\x57\xd9\x49\xd0\x37\x0f\x31\x71\x27\x07\x2e\xb5\xff\x9c\x13\x44\x71\x7f\x8f\x6c\x39\x6f\x4f\x45\x0c\x82\xd3\x84\x68\x2f\xc5\x0a\x00\x86\x4a\x2f\x2b\x4b\xcb\xc2\x11\xb5\xe0\x8b\x1c\x63\xd9\x2e\x28\x8c\x5a\x7f\x24\xf7\x3b\xe0\xb1\xad\x2c\x4b\x67\x1f\xc1\x30\x63\xc8\xbf\xc9\x44\xd3\x74\xee\x9d\x20\x38\xb8\x7c\x34\x0d\x5f\xea\xbb\x92\xfa\xee\x2a\xd7\x02\x7e\x05\xee\x96\x01\x96\xa5\xf2\x60\xa0\xe8\xaf\xaa\xf7\x53\xee\xac\x17\x2b\xd6\x90\xab\xfd\xb9\x6e\x5f\x47\xfa\x4f\xd6\xa3\x70\xe1\x67\xcb\x4c\x38\xea\xd8\x53\xfe\x88\xfc\x37\xf6\xec\xa5\x76\x2f\xb1\x20\xfc\x28\x17\xfe\x79\x96\x2b\x1b\x94\x74\x91\xee\x99\x4a\x65\xdf\x92\xcd\x9b\xc6\x09\x49\x52\x34\x26\xd3\xab\xb3\xfe\x57\xbb\x9f\x6f\x48\x66\xaf\xd6\x17\x37\xbb\x56\x59\x4c\xad\xfa\x82\xca\x2d\x1e\x4f\xf0\x42\x2c\x85\xd4\x3c\x53\x5b\x91\x8d\x36\x05\x39\x73\xa7\xe9\x61\x3d\x19\x56\x35\x7d\x7a\xd9\x26\xa2\x6b\xb1\xa8\x3a\x05\xb5\x7a\x7e\xb5\x59\x16\xc5\xf4\xfc\xca\xb8\x90\xe9\xa8\x2e\x5a\x32\xa9\x6d\x9a\x17\x82\xbf\x2e\xb8\x72\x57\xa5\xea\x37\xa1\x4e\x97\x71\xa9\x84\x10\x88\x62\xd6\xe4\x44\x5d\x95\xa8\x48\xc5\x36\x5d\x56\x97\xc0\x34\xef\xe2\xec\x6d\x47\xdd\x8e\x95\xeb\xd1\x66\x6f\x37\xfc\xec\x2e\x28\x39\x64\x9b\xe7\x77\xff\x3f\x21\xc7\x61\x6f\xda\xba\x68\x56\x02\x12\x80\x21\x3f\x4f\x63\x64\xbe\x68\xd6\x06\x3c\x52\x07\xec\xe8\x46\x36\x01\x0a\x60\x31\x48\x7d\x7f\xfc\x83\xb4\xa8\xe1\xf3\x8e\xc4\x6c\x74\x5e\x5c\x97\x96\x04\x11\x70\x8a\x2e\xab\x2e\x3f\xb8\x50\xc4\xf9\x42\xb9\xdb\xe9\x02\x24\x4d\xec\x88\x53\xc6\x28\xe7\x11\xc2\x28\x4d\x31\xd9\xd8\x3a\x89\xd7\x3a\x9e\xec\x5a\x60\x5d\x1e\x14\xbd\xd9\x97\x8c\x88\x0f\x0c\x3a\x62\x60\x76\xbe\xca\x95\xba\x9f\xe5\xba\x61\x17\x4d\x05\x58\xba\xbb\x80\x91\x21\x44\x2f\x26\x37\x72\x1c\xd3\x07\x57\x1c\x54\x89\xf2\x33\x42\xcc\x98\x9a\xa8\x0d\x1c\xb6\x22\x4a\x4f\x2b\x07\x93\x56\x64\x41\x57\xeb\xe6\x0f\x68\x5b\xcf\x7e\xf6\xe7\x07\xb1\xd1\x24\x43\x77\x68\x1d\xd8\xe0\x2c\x84\xe1\xef\xa4\x0c\x68\xac\x77\x5f\x7a\x8c\xa8\x22\xb8\x7c\xe8\xd7\x8d\x93\xa2\xb8\x26\x0d\xf0\x04\x5f\x49\x17\xaa\xc2\x43\xa3\x94\x89\x04\x23\x75\xa4\x28\x9f\xd2\x66\xd0\xf7\xc6\xa4\x19\x08\x3a\x92\xe9\x4c\x23\xab\xfe\xe2\x0b\xcf\xb6\x6b\x66\x6e\x5c\xc4\xa6\x2e\x75\x33\xdb\x52\x91\xe7\x3a\x06\xc2\x54\x57\xab\xdc\xc0\xe3\xd4\x92\xc4\xa1\x05\xeb\xcd\x20\xe8\x5f\x5f\xbb\xa8\xf4\x8c\x93\x80\xfd\x38\x6d\x67\xb9\xe6\x02\x22\xc2\x4d\x07\x07\x31\x54\xad\x64\xc1\x9e\xd8\x30\xbe\x2e\x8b\x74\x7d\x02\x3c\x1e\x00\xc5\x1e\x3b\xd8\x62\xd0\x73\xd6\x99\x6b\xc8\x29\xc9\xac\x11\x9b\xda\xe8\xca\x98\xda\x92\xb8\x16\x4a\xc5\x45\x1e\x36\x4d\x36\x7f\xa7\xc7\xf5\x08\xd9\x82\xd8\x30\xb4\x02\xfb\x8a\x89\x59\xe8\x8d\x69\x49\xd1\x47\xf8\x09\xd3\xb2\x7f\x60\x99\xb3\x76\x02\xf7\xbe\x4e\x96\xab\x39\x79\xee\x94\x69\xc6\xff\x73\x3b\x37\xc4\x4a\x4b\x47\x5a\x4f\x8a\x55\x20\xbe\x66\x1b\x6e\xf3\x15\x88\x41\xa4\x07\x39\x13\xbd\x5e\x42\x70\xec\x40\x74\x42\x92\x6f\x75\xa4\xf3\xf6\x51\x60\x65\x44\x7a\x50\xdc\x9c\xaa\x8e\x80\x2b\xc5\x21\x8e\xbf\x69\xa5\x33\xc1\x21\xf3\xff\x24\x99\x33\x2a\xe7\x47\x6e\x71\x06\x57\xe8\x29\x7a\xfd\xbe\x8d\xdd\xd2\x1a\xe7\x4d\xe6\x3b\x29\x82\x2b\x8e\x4e\xb7\xb4\x41\x60\xdf\x9c\x9e\xa6\x60\x11\xed\xf2\xa4\x3a\xd0\xc4\x09\x39\x04\xc4\x2d\x04\x86\xb7\x0c\x20\xe2\x65\xe5\x7c\x8e\x70\xf9\xdd\xc7\x47\xfe\x01\x04\x6d\xec\xbd\x74\x82\xf6\x12\x0c\xe2\x73\xb4\x9f\x2c\xbd\x15\x27\x6c\x16\xe5\xb3\x51\x1f\x44\x1e\x9b\xc1\x35\xcd\xbc\xec\xc3\x41\x8c\x9b\x30\xd5\xe3\x3b\x6f\x0c\x39\xad\xeb\x66\x5b\xab\xd1\x29\x04\x13\x20\xa8\x63\x16\x90\x69\xd6\xd2\x38\xdf\x9e\x8a\x79\xd9\xf4\x05\x45\xdd\x9f\x04\xe7\xd6\xcc\x99\x92\xe7\x61\x0e\x6e\xd9\x65\xa7\x80\x8e\x96\x23\xf4\x32\x19\x4e\x89\x20\xa2\x6d\x24\xf3\x34\xef\x69\x7e\x87\x25\x11\x39\x54\x0f\xff\x40\x0b\xe8\x60\xd6\x03\xce\xc4\x2f\xbd\x16\xb1\x6e\x8b\xcc\x84\x97\x0d\xd5\xb7\x17\x03\x21\x65\xc0\x8d\xbd\xd5\x4d\x6b\x62\xd2\x79\x6b\xf2\xd4\xa1\x06\x7b\xf7\xd5\x36\x10\xdf\x97\xb2\x69\x32\x79\xa0\x5c\x39\xe8\xef\x32\xbb\xaf\xb1\x7c\xc6\x2c\x1b\x75\x1f\x32\xd0\xe7\xda\xee\x8d\x07\x83\x85\xda\x3c\x35\x77\x86\x1f\x5b\x47\x16\xa5\xef\x03\xa3\x1b\xe4\xe6\x6b\xa3\x68\x31\x1e\x38\xf4\x2c\x26\x85\x22\x72\x17\x6e\x7a\x9f\x25\x9c\x29\x5b\x06\xbe\x8d\xea\xca\xe6\xa5\xc2\xbd\x1d\x2a\xe8\x6f\x45\x40\xb7\x8c\x50\xbf\x1a\xf5\xb4\xc8\xea\x1c\x61\xf0\x24\x65\xfd\x0f\x10\xeb\xdc\x5f\xfc\x20\x22\x8e\xb6\x38\xcf\x9c\x2a\x9c\xff\x33\x36\x77\xf1\xd1\x28\x7c\xf1\xb3\x52\x3f\x72\xec\x35\x94\x71\xaf\xb3\xda\xbe\x82\xb4\xb4\xcc\x57\xd0\xff\x29\x74\x49\xab\x8b\x2e\xf5\x32\xc4\x72\x6e\x34\xd9\x7d\x63\xd7\xa4\x32\x3d\x35\xc8\x3d\xb9\x97\x48\xe1\xaa\x6e\xfc\x7a\x13\xc6\x5f\x05\xb5\xb4\xeb\xbf\xdf\xa6\x01\xbc\xca\x49\x11\x2d\xb5\x15\x32\x4e\x2f\xd4\xbe\x39\xe9\x2e\x33\x82\xc7\x75\x07\x3a\xc4\x4f\x0f\x54\x65\x48\x79\x29\x84\xff\xef\xe5\x96\x85\x4e\x3a\x3b\xc5\xdd\xa9\x89\xb5\xcf\xa9\x43\x8f\xde\x4b\xe4\x8c\x79\x85\x21\x6d\x04\x7d\x6c\x9a\x61\x94\x6d\x38\xc0\x45\x47\xee\x61\x36\x8d\x30\x26\x22\x83\xf1\x69\x1a\x82\x33\x56\xca\x06\x63\xfb\xa9\xc2\x5c\xfd\xd5\x85\xbf\x9e\xbe\x68\x30\xd7\xdb\xb8\x45\x92\x02\xec\x60\x90\x60\x68\xef\x2f\xf3\x08\x47\xc9\xf8\xd4\x31\xcb\x1d\xf6\x8e\xed\xde\x5b\xbf\x19\x02\x51\x6b\xb4\xf6\xb9\xbb\xd2\x8c\x59\x66\x3f\x3c\x56\x59\x04\xd5\x56\xb7\xeb\xfd\xf9\x17\x88\xa2\x9b\x61\xcc\x5e\x6a\x54\x89\x19\x88\x72\x61\x09\xdb\xa9\xc9\x7a\x73\x4e\x38\xf7\x4f\x6e\xec\xf0\x45\x26\x67\xca\xa7\xdc\x23\xbf\xaa\xee\x8f\xff\xac\xd8\xb2\x27\xe5\xa0\xa0\x62\xe9\xb9\x8f\xb6\x23\xaa\xdf\x21\x96\x30\xc4\x1f\x23\x5b\x03\x93\xd4\x50\x4d\x33\x2f\x60\xae\x14\x91\x89\x79\xe5\x6e\x45\xea\x1a\xb7\x2a\x1f\x4e\xfa\x93\x7b\xb6\xc2\x3e\x77\xad\x31\x01\x11\xdb\x54\xc2\x72\x42\x9a\xca\xf3\x5b\xee\x30\x39\xf8\x71\x14\x51\xcd\x0d\x1d\xcf\x7f\xa5\xe1\x99\x36\x59\xf1\x1a\x9b\xda\x3f\x23\x3d\x5c\x4b\x50\x63\xd0\xec\xf7\xf4\xce\xf6\xc3\x77\x2f\x4a\x1b\x25\xe7\x6e\x4f\x13\x93\x03\x22\xc1\xbe\x8b\xe6\xb7\x71\xd9\xbd\x6e\x47\xba\x19\x28\x4c\xba\x39\x98\x26\x40\xe4\x0a\xc9\xbb\x22\xc3\x8d\x7b\xe8\x06\x58\xde\x57\x81\xa3\x70\xea\x07\xe4\x54\x63\x76\x7e\x8e\xd9\x7d\xec\x98\x10\xa2\xea\x27\xed\x95\xa2\x21\xec\x7c\x57\xdd\xf2\x3e\x81\xd0\x01\xf5\x1a\xb9\xbd\x89\x89\x77\x39\x76\x22\xa3\xf8\x6b\x65\xc6\x95\xe1\xce\x73\xdd\x28\x78\xa3\x2f\x44\x63\x23\x88\xe7\x5c\x30\x30\x35\xba\xea\xbf\xa2\x4f\x8b\x9e\xcf\x88\x30\x3d\xf3\x1e\x49\x6d\xc9\x2d\x7b\x9e\x70\xb8\x0c\xf3\xc4\xd2\xbf\x54\x84\x2b\x0f\x19\x09\x56\x21\xcf\x20\x97\xd8\x62\x0d\xbb\x25\x22\x47\x76\x62\xee\xf9\x95\x36\x34\x3a\xbd\xf5\x5c\xa2\x39\x6a\xdd\xfb\xc9\xeb\x0d\xd3\x4f\x9f\x39\xa8\x77\xb9\x24\x51\x8c\x86\xe8\xe9\x7e\xf2\xee\x90\xab\x9a\x0c\x57\xf5\xe2\x32\x43\x0b\xd7\xa2\xc3\x53\x15\x92\x32\x68\x43\x88\xd5\xb1\x86\x6b\xfe\x8d\x88\xdf\xc0\x52\x93\x4f\xbb\x86\x3b\x57\x3b\xf0\x62\x62\x3c\x0b\x65\x75\xc6\x48\x34\xf9\xf6\x70\x67\xa8\xbb\x66\x52\xbc\x45\x99\x2d\xdb\x96\x17\xf3\x32\xe1\xac\x92\x15\x54\x15\x37\xf4\xe2\x1b\xb8\x4e\xa6\xac\xa5\x48\xd6\xd5\xe3\xf7\x75\xae\x01\x62\xf6\xc1\x33\xc6\xc0\x9b\x3e\xf0\xf1\x4e\x29\x62\xfe\x7d\x52\xfe\x5e\xd2\x68\x87\xf8\xc7\x12\x9f\x82\x75\x02\x1b\x6d\x6d\x11\xdc\x06\x27\x90\x8a\xee\xa7\x23\x2c\xa7\x1e\xe9\x4b\x94\x51\x06\x18\x14\x4b\x1a\x63\x9f\x05\x4b\x99\x4f\x70\x45\xe3\x2f\x7a\x7b\xb0\x92\xe1\x90\x26\xf5\xfb\xb4\xcb\xaa\xd3\xd8\xd3\x00\x54\xec\x0b\x06\x64\xcc\xa6\xad\x64\x79\x87\xf8\x55\x93\x64\x1a\xb7\xfe\x2e\x0b\xbb\x2c\x1f\x38\xa8\x1a\x1c\x46\x13\x54\x6a\x61\xcd\xa8\x40\x8e\x80\xf7\x6f\xc0\x83\xe8\x6f\xb9\xb9\x4d\xdf\x9c\x35\x92\xed\xd3\x38\xb9\x50\x5b\xea\x08\xd8\xb5\x42\xa7\xed\xfd\xcc\x4f\xc5\x97\xd7\x6c\xcf\x9b\x5f\x29\x77\xc1\x83\x42\xdf\x43\x9f\x09\xa1\x82\xc8\x06\x76\xd4\x74\x58\xa5\x90\x08\x67\x62\x86\x6c\x56\x7e\xba\xe8\x7e\xf0\x52\x2f\xcb\xf1\xcb\x6b\x3e\x9a\xaf\x29\x06\xd7\xf4\x3a\x46\x59\x22\x5c\x0d\x77\xaf\xaa\x10\xbc\x4c\xd1\x29\xec\xc3\x49\x58\xb9\xab\xff\x34\x92\xaf\xc0\x46\x00\xd6\x97\xab\x21\x67\xa4\x20\xd7\x75\xd9\x69\x09\xb8\xf0\x96\xf4\x1b\xd5\x5c\x11\x95\x75\x93\xc4\x60\xe4\xac\xd9\xcb\x7f\xb0\xaa\x11\x5a\xa6\xa5\xa9\x2c\xee\x15\xff\x1d\x84\x87\x60\xcf\x83\x12\x25\x31\xeb\xbc\xbb\x90\x27\xab\x32\xe8\x6e\x8a\x15\x64\x18\x49\xe7\x69\xb5\x30\x29\x14\xe8\x51\x49\xcf\x69\x80\x7b\xc5\xc0\x84\xdc\x88\x05\xeb\x9d\x3e\x9b\xec\xe9\xe3\x7a\xc2\x44\x75\xd4\x63\xfd\x6c\x8e\xa5\x59\x3e\x12\x5f\xff\x81\x30\xee\xad\xd7\x98\xdf\xb7\x10\x86\x35\xa5\xef\x29\x4b\xbe\x6b\xbf\xef\x27\x3c\xdc\xbc\x10\x46\x15\x10\x87\xcb\x16\x90\x8f\xbe\x2b\xe2\x18\xcf\xe6\x4d\x9f\x4b\x71\xf8\x9d\x95\x5e\xf8\x13\xe1\xd8\x63\x15\xaa\x11\xb9\x65\x98\x32\x06\xfa\xe9\xe3\x38\x36\x42\x23\x57\x6e\x27\xeb\x68\x8e\x50\xb5\x51\x45\x27\xc0\xc7\xdd\x83\xf5\x92\x80\x2b\xdd\x5c\x33\x33\xc7\x2c\x06\xff\x6f\x20\xd1\x4f\x54\x5c\x3e\x8b\xb0\xa6\x81\x8e\x6b\x38\xdb\x04\x0a\x50\xf2\xfa\x7c\xa2\x77\x24\x91\xee\x0b\xe4\xa0\xa8\x4a\xed\x6f\x6d\x2f\xa2\x7e\x03\x7e\x34\x05\x04\xe3\x86\x09\x7e\x8a\x09\x92\xe4\x0f\x98\x61\x44\xde\x52\x79\x45\x5d\x34\x7a\x57\xd9\x59\x66\x76\x62\x90\x7a\x28\x75\xbe\xce\xdb\x13\xb2\x78\x89\xee\x58\xec\x25\x77\x4c\x61\xf2\xc6\x72\x85\x79\x12\x79\xf1\xb3\xbf\x39\x7d\x2e\x6a\xb5\xb9\xa5\xe0\xe6\xe4\x4b\x52\x67\x96\x1f\x01\xd2\x8c\xd5\x1f\x52\xd0\xd9\x8b\xb6\x98\xc9\xbc\xb4\x1a\x08\xf3\x9f\x8f\x71\xc8\xf8\xd1\x2f\x48\x90\xf4\x78\x52\x34\xa6\xa2\xe7\x56\xd2\x53\x6a\x2b\x66\x29\xe4\xf1\x6f\xb4\x87\xcd\xdf\xa0\xd6\x14\x2b\xe8\xb0\x12\xaf\x11\x99\xf7\x0e\xfd\x1b\x8a\x2d\x94\xef\x12\xa3\x11\xf5\x40\x89\x2d\xfb\xe2\x65\x5d\xda\xd0\xfa\x77\xc8\x45\x38\x80\x23\x85\xd2\x8d\xca\x46\xc2\x17\x3d\x9f\x3a\x27\xb3\x8e\x69\x29\x22\xfe\x2d\x45\xb8\xb0\x41\x25\xde\xdb\x68\x4e\xba\xe1\xd9\x9e\xd7\x2d\x78\x7e\x0e\x4f\xc2\x41\x8d\xfd\x61\x23\x62\xa2\xb1\x6c\xdd\x69\x02\x3a\x12\x4f\x95\xb0\x68\x4f\xee\x2a\xf3\x10\xc0\xfd\x94\xe2\x08\x5f\xbe\xec\xae\x08\x3f\xd3\x9f\x2b\x2f\x36\x06\x8d\xdb\x02\x76\xe7\xc4\x4b\xe9\x07\x47\xe2\xa3\x1f\x69\xb1\x66\xce\xdd\x98\xb5\x97\xfd\xd5\xb4\x6f\x47\xdc\x49\x53\x6c\xed\x32\x27\x28\xf2\xbf\xa6\x74\x69\x2f\x7f\x0a\xae\x60\xfb\xdb\x34\x81\xa4\x65\x04\x27\x3b\x59\x51\x2d\xe5\x27\x13\x07\x5e\x44\x49\x94\x09\x43\x93\x97\xe2\x36\x37\x3b\x8e\xcc\x28\x38\xc7\x16\xa0\xb0\x3a\xd1\x0c\x78\xf2\x36\x83\xc3\x5d\xec\x57\x3c\x0b\xa6\xa8\xbf\x7f\x23\xfb\xc8\xf6\xca\x7b\xfc\x7a\xed\xf5\x1e\x0a\x30\x5e\x2a\x2f\xb6\x08\xeb\x37\x8e\xb3\xd5\xce\x27\x2d\xaf\x41\x09\x6e\x1e\x1f\x87\x9b\xde\xa9\x75\xb2\xce\x30\x68\xc9\x52\x19\x3a\x45\x18\xc5\x23\x3f\x73\x64\x7c\x92\x1e\x42\x73\x76\x3f\x1c\x83\x5a\x38\xd6\xb8\x51\xb5\x59\x45\xbd\x53\x9d\x0d\x0d\x33\x8f\xba\x90\xd0\x4c\x60\xfc\xf2\x8c\xda\x67\xb5\xc8\x08\x31\x4f\x3c\xbd\x21\x3c\xab\x2d\xca\xb5\xe6\x80\x7c\xfb\x15\x74\x50\x3d\x13\xd8\x54\xfb\x93\xb2\x40\xf1\x4e\x2b\xfa\x47\x2e\x73\x96\x57\xb4\x6f\xbe\x68\xe0\x3d\x24\x25\x3d\x1e\x4d\xd6\xc7\x2e\x33\xd4\xac\x81\x0e\xf1\x36\xb6\x07\xf1\x9c\x1d\x28\xc4\xff\x7d\x06\x54\x51\xb9\x7c\xe8\x11\x7a\x0b\x43\xee\x4b\x41\x9a\x94\xd2\x34\x8b\xb5\x05\x3a\x74\xda\xb9\x92\x7e\x15\x27\xc9\xa8\xc5\x65\xa3\x14\x39\x83\x12\xb5\x7e\xba\x68\x96\xe0\x6d\x0b\xf3\xea\x81\x3a\x32\x7b\x4a\x42\x27\x5b\x2e\x91\x48\x97\x27\xca\x64\x6c\x67\xfc\xc3\xe5\xb6\x76\x72\xc4\x1f\xd1\x9e\xc3\xe7\xb3\xf8\x26\x53\x94\x44\x05\xd5\x32\x7c\x80\xc2\x62\x8f\x8e\x13\xe6\xad\xfc\x0c\x5f\x59\xe0\x19\x45\xd6\x91\x79\xd3\x86\xb4\x34\xae\xc6\xe8\xbd\xac\x43\x0f\x15\x4e\x46\x1d\x5b\x27\x22\x8c\x69\x27\xc6\xed\xa0\x0c\xbf\x03\xd7\xeb\x6f\x80\x16\x6d\xa1\x61\xf8\x05\x91\x74\xf4\x5b\x8a\x29\x86\xcc\x9a\xf0\xa1\xdd\x93\xa5\x48\x6e\x70\xab\xf0\x1f\x57\x1b\x92\x24\x40\x6c\xb9\xba\x09\x2f\xcf\xd7\xe0\x59\xec\x56\x45\x0d\xdc\xa0\xf5\x15\x3d\x59\xb6\x93\xf7\x63\xfc\x58\x78\x4c\xee\x23\x92\x6b\xac\xc8\xbc\x11\x98\x5c\x29\xb2\xc7\xd7\x87\x19\xd6\xff\xb3\x93\xeb\x46\x22\x1b\xe3\x68\xad\x15\xcd\xc2\x22\x5f\x4c\x9e\x71\x21\xa8\x82\x96\xb8\x52\x2d\xb5\x83\xc7\x15\x6e\x9a\xe7\xfc\xd1\xdc\x0f\xcf\x7a\x98\xd3\x2b\x0b\x41\x3b\xcc\x6a\x6c\x31\xd0\x5e\x6a\x51\x4c\xa4\x4a\x78\xcd\xc0\x26\x2c\xe2\xce\xed\x3f\xea\x90\xf4\x83\x79\x29\x44\x75\x57\xcc\xc8\xd5\x1a\x8e\x36\xda\xed\x74\xae\xac\x64\xcb\x8f\xa2\x49\x9d\xaf\xcb\x25\xa2\xad\x68\xca\x90\x3b\x7f\xd5\x28\xd9\xd9\x57\xcc\xc8\x5e\xef\xd1\x34\xa6\x6f\x57\xb4\x18\xaa\xfb\x7e\x4b\xe7\x7d\xe0\x74\x08\x10\xb3\xb0\xd2\xfd\xd5\xc3\x00\xea\xfe\x26\xd8\xc0\x7f\x94\x39\x63\xb7\x5e\x8f\x5d\xe5\x85\x80\x71\x05\xf1\xd8\x40\xa7\x5b\x88\x54\x04\xd4\xa2\xf3\x69\x17\x64\xc7\xd9\xe8\xab\x18\xb0\x53\x49\x5e\x42\x8a\x11\x45\xe7\x7b\x81\xe3\x24\x3e\xfe\xd6\x6b\xe0\x18\x2f\x35\xb1\xeb\x66\x4d\xc4\x73\x59\xf4\xaf\xfb\x48\x10\x4a\x0b\x18\x91\x78\x93\x16\xf0\xd5\xd9\xe8\x71\x47\x96\x96\x4b\x0c\xd6\xd8\x84\x0a\x85\xc4\x98\x7d\xa0\x5a\x8e\x42\x5c\x46\x3c\xee\x6d\x97\xa1\x02\xfc\x8c\xa9\x96\x10\x50\xc3\x4d\x26\x25\xbf\x87\x90\x65\x0a\xf6\x9b\x2c\x99\x94\xd3\x00\x7d\xa0\x18\xf2\xa3\xbe\xc4\x97\x27\x7e\xd5\x61\x80\x95\xfd\xb7\x4e\x75\x70\x3d\x65\x8a\xd9\x42\x84\xd0\x47\x1f\x8d\xa2\x6e\x02\x27\x14\x2e\x69\x54\x87\x59\xb2\x01\x8d\xcb\x50\x52\xd7\x03\x82\x3c\xba\x5c\xbc\x06\xd2\x44\x8e\x43\x0a\x9d\xdd\xd8\xe0\xc5\xfc\x6b\x4e\x5d\x34\xb0\x5c\x38\x2d\xb8\xcd\x3c\x50\xa9\xc2\x5b\xc7\x43\xf7\x13\xd7\x70\xaf\x34\xa5\x69\x04\xfd\x7d\xb2\x81\x36\xd2\x88\x08\x84\x7d\x09\xb8\x1d\xd8\x95\x1a\xef\xe1\xde\xf6\xc0\xe3\x3f\xff\xad\xb5\x4a\xac\xad\xbe\xbe\x3c\x2f\x19\x0c\x33\xe5\x35\x9b\x91\xc6\x8e\x08\xc4\xaa\x21\xe9\xc1\x14\x08\x87\x68\xf2\xd3\x0c\x3d\x1d\x83\xa7\x47\x8a\xed\x24\xd3\x21\x2d\xe7\x60\xb1\x52\x1d\xcd\xbd\xf8\x33\xa1\x7d\xde\x27\xae\x26\xe3\x12\xe6\xa4\xfd\xa9\x3f\x61\x5d\x33\x4c\x59\xad\x22\xf4\x3c\x20\x62\x11\x27\x6a\x07\x0b\x9c\x63\x36\xf4\x66\x0b\x33\x5a\x13\x71\xb4\x2c\x6a\xa4\x7c\xb1\x26\x62\xab\xb0\x07\x9a\x12\x84\x0d\x94\xae\x87\xcb\xe0\x50\x17\xcb\xa8\xdc\x50\xfa\x4a\xc3\x22\x49\xc6\x54\x14\xc3\x56\xfd\xa8\x00\xce\x1e\xd5\x36\x8a\x8b\x2a\xea\x00\xe2\xf5\xc2\x5d\xe6\xd9\x0f\x9e\x88\xdd\x61\x9a\x41\x44\x03\x30\x43\x98\xf6\x63\x3f\xfb\x93\x78\x24\x47\xc6\x49\x3c\x08\x7f\xb1\x6e\xda\x58\x5a\xf5\x28\x6a\xd0\x1e\xe6\x58\xa3\x6a\x21\xf8\x56\x2c\x5a\x4d\x3b\x83\x9e\x7e\x40\xf2\x1a\x77\xe6\x55\x4d\x6a\x16\x13\xfd\x13\xec\x2a\x44\x13\x23\x76\xc3\xe8\x79\x1b\x97\x81\x44\x2b\x8e\xd3\x28\x47\x67\x5c\x44\x3c\xba\x60\x01\x87\x5f\x72\xbe\x7e\x4a\xd0\xad\x56\xba\x55\xab\x36\x55\x53\x5d\x64\x56\x08\xf8\x7b\x5e\x65\x4c\x19\x7e\x9a\x1c\xf6\xd6\x51\x85\x12\xf3\xa3\x69\x02\x53\x94\x4d\x68\x81\xb2\x67\x94\xf2\x8a\x37\xb7\x4b\x60\x33\xfb\x75\x0b\x95\x85\x54\xc8\x0f\x65\x2b\x6c\x48\x5a\x08\x34\x4f\xeb\xf9\x2b\x37\x43\x1c\x8b\x4e\xe0\x3c\xff\xe5\xed\xa0\x4f\xa8\xe5\x81\x1f\x9f\x80\x50\x5d\xaa\x3d\x5f\xe9\x99\x5e\x00\xf6\x4f\x0e\x1d\x74\x25\x7e\x3e\x71\x97\x12\x5d\xc0\x51\x26\xa7\xef\x74\xf9\xa5\xa0\xb5\x49\x7b\xb3\x8b\x91\x68\x66\xf4\xfc\x96\xf3\x79\xf9\xfc\xac\x2c\x08\x39\x6e\xa9\x1c\xf5\xd7\xd2\xe2\xd1\x6a\x55\x7d\xcf\x5d\x3c\xfa\xb6\xe6\xb6\x1d\x3d\x48\x81\x15\x31\xef\xc1\xd5\x6c\x43\xc1\x28\xfd\x24\x69\x87\x4e\x6f\x69\x88\xbf\x87\x02\x3e\x45\x62\x51\x27\xa7\xa8\x6b\xe7\x12\xff\xc6\x8c\xc3\x4a\xd1\x7e\x5f\xcd\x3b\x90\xb0\xa7\x17\x44\x47\xe3\x16\xe1\x7d\x6e\x0e\xf1\x8b\x07\xa0\x72\x86\x4f\x64\x59\xf7\x97\x12\x92\x07\x4e\xa2\x17\xf6\x89\xc9\xcb\x58\x73\xe7\x6c\x48\x70\xdc\x93\x03\x0e\xc6\x38\xb3\xec\xe6\xb6\xfe\x63\x04\xe2\x12\x7e\x94\xe9\x10\x72\x7c\x09\x7d\x19\xc9\x6c\xee\x36\x05\x21\x94\x2d\x83\x84\x9b\x4b\x6a\x97\x42\x07\x2c\xc0\xf0\x8b\xd1\x7b\x8d\xfe\x11\x3b\x10\x66\x43\x36\xc0\x55\xf7\x26\x10\xf0\xb2\xab\xdd\x8c\xe7\x95\x3e\x1f\xfc\xb6\xf4\xe8\x85\x08\x53\xf6\xaf\x41\x07\xad\xa4\xd5\xa8\x8c\x81\x29\x49\x7d\x82\x93\x60\x97\xfb\x38\x8d\x20\x78\xe0\x58\x3f\xba\x8f\x06\xe9\xc1\x0c\x88\x4f\x17\x42\x2f\x99\xd1\xdd\xbd\x73\x7b\xc2\x67\x50\x6c\x38\x77\x13\xa6\x62\x8e\x27\x7c\xcd\x71\x4a\xfa\x49\x73\xdd\x2e\xd3\x2f\x2b\xd9\x10\x2a\xd9\xf9\xd3\x39\x62\xd9\x7a\x0e\xd2\x7c\x03\xcd\xb6\x66\x03\x5a\x47\x57\xe2\xdf\xb5\x5c\xa8\xc4\xe2\x84\xe5\xc1\x55\x1c\xf6\x28\x74\xd6\xf5\xb8\xd2\x37\x20\x64\x16\x51\xa0\xf5\x2e\xec\xc7\xfb\x75\xbc\xba\xe6\x87\xdc\x6c\x71\xe8\x0f\xf5\x07\x2f\xfd\x1d\x4a\xae\xb4\xe4\x7b\x7b\x42\xae\x23\x75\xea\xdd\xf9\x55\x3a\xe3\xf2\xa9\x02\xfd\xb9\x1c\xc2\xb2\xfe\x84\x66\xa5\x21\x5d\x5f\x56\x86\x12\x15\x3b\x41\x0f\x04\xf7\xc4\x00\xe3\x63\x86\xe8\x35\xeb\x14\x0d\x14\xac\x08\xbf\x0b\x87\xd5\x4d\xe8\x66\x8d\xca\x1f\x56\x92\x2b\x69\xa5\x31\x57\x56\xac\xa4\xb1\x72\x9f\x07\x6f\x23\x34\x20\x8d\x53\xed\xe2\x09\x85\x4f\xcd\xf2\xeb\x40\x50\xa1\xbd\x4e\xf4\x61\x51\xce\x27\x7d\xa5\x17\x90\xbe\xc3\xf8\x23\x72\x25\x4d\x5e\xb2\xb5\x9b\x0b\xcd\x69\xfd\x95\xff\x78\x58\x0c\xd6\x96\x37\x04\x28\x47\xea\x9b\x95\xbe\x30\x56\xfe\xfe\x9a\x35\x43\xb3\xd5\xb4\x66\x4c\xcc\x18\x67\x08\xc5\xdd\x38\x50\xfd\xda\x59\xab\x26\xdf\xb6\x31\xc8\x6a\x1b\xa2\x48\xe6\x46\xb1\xe7\xdc\x5f\xf1\xda\x23\x32\x89\x76\xc5\xda\x48\x52\xe3\x44\x1c\xcb\x73\x46\x0e\x60\x73\x0b\xf7\xf5\xa3\x69\xd8\x9f\x93\x6f\xbc\x90\xd6\x1e\x0d\xac\x3e\x2d\x7a\x02\x81\x80\x46\x3c\x68\xfc\xd9\x85\xc4\xca\x42\x21\x27\xbd\xf6\xa3\x16\x74\x81\xf8\x05\x0b\x65\xf2\x55\x6a\x63\x99\xa1\xb8\xba\xc1\x95\x5b\xdd\xc7\xdb\xa2\x60\xa0\x3a\x18\x61\xeb\xe5\xce\x05\x92\x09\x51\x67\xd2\xe2\x6d\x34\x42\xd6\xb9\x94\x7a\x18\x3b\x73\xa9\xc6\xce\x17\x54\x8b\xff\xde\xf6\x2a\x7e\x25\x5d\x90\x15\x52\xba\x6c\x1e\xfe\x86\x71\x6b\xca\x7a\x13\x49\x36\xa2\x9c\x87\x83\x90\x2b\xd1\x1c\xcd\xa7\x89\xfc\xd6\x99\xc7\x29\x49\x33\xa6\xba\x0c\x23\xc3\xfd\xa0\x2e\x2e\x8f\x80\x08\x3c\xaa\x82\x40\x33\x3d\xe3\x47\x8a\xe4\x50\xeb\xd2\x53\xca\xdf\xde\xcc\x7e\x3d\x48\xa0\x03\x10\x03\x07\xc0\x24\x30\x5e\xa8\x7a\xff\x1c\xfd\xa6\x54\x61\x7b\x42\xdc\x68\xc2\x97\x25\x4c\xeb\x6a\xa3\x86\x0c\x13\x82\xcb\x27\x06\x17\xd0\x7f\xa7\xb6\x7f\x85\x03\x70\x74\x76\x61\xfe\x13\xed\x71\x3b\xc2\xb6\xce\x7a\x5d\x9b\x72\x51\xb3\x0e\x44\x38\x25\x72\xa5\xb3\xb9\xbe\x8c\x57\x2f\xaa\x44\x9a\x68\x8b\x74\x83\xc1\xc2\x13\x3e\xf2\xf8\x34\xc1\xf9\xe0\x58\xfc\x78\x4a\x4d\x10\xb0\x58\x75\xdd\xf7\xf1\x91\xd2\xf3\x7e\x78\xda\x08\xff\x0a\x21\x07\x18\xeb\x5e\x84\x50\xf1\x0e\x43\x04\xed\x61\xa9\xb0\x36\x4d\x75\x17\x95\x6d\xaf\x19\x71\xbd\xa4\x9f\x68\x0b\x6c\x51\xd0\x8b\x24\x24\xe2\x17\xc7\x90\xd4\x75\x2c\x67\xe0\xed\x87\xf0\x9a\x08\xba\x59\xe4\x0e\xaa\xcf\x4b\xd2\x3f\xfa\x41\xef\xf1\x1c\xab\x19\x76\x07\xeb\xb7\xf1\x9b\x1f\xef\x08\x52\x48\x06\x19\x67\xfa\xca\x21\x46\x47\x7c\x40\x60\xdf\xa2\x5e\xec\x1c\xe9\x79\xc1\x0d\x5a\x31\xea\xd1\xa6\x13\x5d\x4b\x36\x9c\xeb\x27\x63\xc8\xf0\x8e\x0f\x13\x75\xc0\x21\xcc\x82\xa0\x4c\xc2\xdb\xae\x58\xa3\x8c\x71\xf3\x96\x4e\xa5\x92\x10\x82\x88\x44\x1b\x4c\x55\x09\x62\x39\x14\xeb\x13\x75\x2b\xd7\x1e\x9c\x58\x73\x3e\x20\x4a\x1f\x52\xd0\x96\xc7\x17\xe5\xf8\xfa\x3f\xf5\x64\xfd\x0b\xe2\xc2\xb2\xee\x9b\xe1\xa8\x20\x3d\xba\x0c\xa2\x15\x64\x29\x89\xae\x60\xf0\x38\xd5\x77\xe5\x58\xbf\x0a\x61\xd6\xcd\x8d\x10\x3e\x9c\x24\x27\x87\x8d\x13\x28\xd0\xe8\x54\x7a\xa2\xb6\xeb\xc5\xcf\x4c\xab\xb8\xba\xdf\x90\x34\x7d\x66\xbb\x4a\x8d\x97\xc9\x1e\xe4\x38\x01\xdf\x3c\xcd\xab\x13\xf0\xb2\xa9\x23\xb5\x17\x95\x96\x5a\xf5\x5c\xf7\xea\xcc\x54\x53\xbf\xa7\x33\x76\x4f\x44\x27\xb5\x3d\x2d\x81\x6d\x5a\x3f\x75\xbe\xc9\x56\x56\xa0\x76\xe3\x24\x69\x2a\xc8\xb5\x0d\x13\xb8\xaf\x66\xfe\xc5\x37\x5d\x35\xba\xaf\xfd\x5c\x35\xad\x03\x4c\x1b\xa5\x18\x34\x70\x9f\xd0\x1f\xf5\x80\x66\xf2\x6a\x09\xad\x97\x25\x72\xd5\xf2\xae\xb8\x78\x41\xae\x46\x7b\x4d\x57\xf4\x64\x9a\xfe\x33\x13\x08\x80\x1f\x9a\x89\xae\xd5\x33\x91\xef\xf6\xfb\xc3\xf4\x1c\xd8\x4b\x6f\x78\xe1\x71\x59\xa9\x22\x89\xf4\x70\x67\xa4\x71\x58\x0d\x39\x88\x02\xdc\x9b\x1e\xec\xf3\x4f\xf8\xc5\x44\x63\xe4\x26\x45\xfa\x83\x7e\x84\x04\x78\x91\x15\x54\xab\x9e\xb1\xc0\x35\xb1\xa3\x41\x38\x4c\x97\x03\xfd\xff\x81\xc1\xc3\x0d\xef\xcb\xdb\x03\x9b\x2c\x95\x84\x04\x70\xfe\xa3\xf8\xb2\x06\x16\xd9\x6c\xcc\x3e\xd0\xb1\x1c\x32\x3d\x79\x22\x98\xef\x7f\xf0\x00\x12\xa1\xa9\xee\xed\xf2\x1a\xfb\x57\xf4\x18\xa5\x69\x6d\x2b\xdd\xb2\xba\x9e\x3d\x96\x0f\xbc\xee\xf3\x20\x81\x73\xbc\x79\xe5\x7d\x18\xb2\x4a\xac\x86\xcf\x78\xfc\x4d\x3a\xe1\x87\xda\xcc\x99\x9a\xb0\x4c\x76\xde\xae\x53\x0b\xd7\x57\x5f\xb2\xb5\x74\x7f\x6d\x1e\x81\x0e\x22\x81\x9c\x2f\xd7\xcc\xc4\xcb\x69\x79\xd9\x39\xdc\x4f\x55\xbb\xc1\x0a\xd5\xaa\x58\x5b\x66\x6f\x16\x1e\x70\xc1\x79\xb5\x73\xf7\x31\x06\x31\x5a\x50\x50\x63\x66\x68\xf3\x6a\x7f\xf3\x75\x75\xff\x3e\xb3\x5d\x7d\xdd\xea\xc7\x96\xb2\x0b\x20\xa2\x7a\x7c\x65\xf4\x0b\xe4\x38\x53\x2c\x12\x32\x24\x50\x3a\xf1\x3f\x80\x24\xa2\x39\x2d\x78\x78\x15\xd2\xd5\x9d\x7c\x1a\x78\xa0\x4c\x44\xc3\xd3\x36\xc8\xde\x1b\x0b\x62\xb8\xb2\x7d\x57\xd5\x8f\x82\x4f\x0e\xf6\x36\xdc\x12\xaa\xc4\x8b\x1f\xe6\xe5\x4c\x19\xd4\x6c\xa5\xdd\x2b\x94\x59\xd7\x3e\x9b\xc5\xfe\x27\x24\x30\xb1\x0f\x63\x35\xa1\xb4\x74\x71\x32\xd2\xaa\x9e\x0e\x78\x89\xee\xf8\x78\x25\x9c\xaf\x19\x27\xe2\x41\x50\x8c\x45\x14\xa7\x21\x63\x7b\xd5\x72\x0a\x68\x05\x41\x30\x01\x52\x8a\x71\x13\x9c\x53\x54\x00\xed\xa9\x31\x55\xba\xdd\xcb\x59\x19\x6a\x8d\xd7\x4a\xa2\x6f\xa2\xa5\x66\x75\x37\x71\xac\x1d\x2d\xf7\xd9\x3e\x21\x92\x05\x80\x08\xf8\xfc\x35\xfa\x52\xbb\x2d\xd4\x94\xea\x0f\x08\x15\x5a\x03\x79\xf8\xd2\xb4\x6b\xd5\x54\x22\xb4\x85\xf6\xab\x90\x66\xee\xf1\xfd\x5c\xfd\x54\xd9\xe4\xc9\x58\xf4\x7a\x99\xf9\x3a\x85\x6f\xa8\xdc\x32\x2f\xd1\xd5\x15\x59\x7d\xf1\x4a\x72\x77\x95\xaf\x3a\xd7\x41\x43\x9d\xcb\x67\x9d\x73\x3a\x1e\x34\x0f\x06\xc7\x4f\x19\xde\x62\xaa\xaf\xa2\xac\x6e\xbf\x71\x09\x2e\x79\xc0\x78\xbd\xe7\x28\xf3\x8c\x7d\xfc\x54\x5e\x51\xef\x19\x36\xce\x34\x08\x7a\x96\x8a\xbd\xf4\xde\x41\xc8\x3f\x91\x49\x7b\xeb\xf0\x4e\x1c\xa5\xe5\xa4\xcc\xae\x52\x71\x57\x71\xe3\xd0\xa9\x20\xdc\x78\x0f\x36\x80\x8e\xbd\xd8\x0d\xb0\xcd\xab\x37\xce\x6c\x21\xca\xa6\xfc\xf2\xc3\xcb\x78\x4d\x79\x98\xb1\xae\x17\xe4\x33\xf4\x14\x18\x07\x0d\xe1\x33\x37\x34\x51\x16\x99\x44\xc3\x20\xf0\x4c\xc3\x04\x76\x9e\xbd\x3d\x9c\x2e\xe6\x86\x32\xa6\x28\xa4\x98\x45\x1a\x5a\xb5\xc2\x34\x9a\x65\xca\x4d\x2f\x22\x03\x1a\x61\x1e\x83\x36\x94\x24\x48\xb6\x07\xf8\x78\xde\x46\x18\x7c\x35\x1d\xeb\x4f\xf7\x5b\x54\xac\xf8\x27\x28\x71\xa4\xea\x48\xfc\x9a\xc9\xec\xa5\x53\x2d\xdf\x99\x75\xda\xac\x39\xce\x0a\xee\xd9\x8a\xed\x4b\x76\x61\x69\x04\xa2\x66\x58\x02\x56\x45\xe6\xfa\xa8\x2b\xb6\xad\x28\x87\xf2\x99\xd7\x5e\x11\x63\x79\x58\xb4\x53\x54\x6b\xaf\x9e\xe5\x1d\xc3\xfe\xe4\x8b\x98\xfc\x8e\x03\x03\x07\xe8\xa2\xb0\xb3\x9e\x85\x36\x39\xf5\x37\x4b\x21\x93\x63\x9c\xe4\x82\x67\x84\x20\xba\xfa\x49\xc3\xf6\x5f\x65\xa6\x42\x6f\x96\x72\x6a\x49\xfa\xbf\xd1\x7a\x3f\xc3\x33\x1c\x8e\x37\x8e\x36\x34\x17\x73\x87\x94\x5d\x8a\x26\xd8\x11\x2c\x57\x22\x8b\xe8\xe1\xd0\xa0\x96\x7c\x52\xbf\xc8\xd7\x56\xec\xd1\xe5\x0d\x32\x92\x5f\x2d\x70\xb5\x6a\xb8\xa4\x96\xfd\x64\x11\xae\x03\x8b\xea\xea\xec\x31\x7f\x3f\x9e\x74\x3c\xdf\x5c\x7d\x81\xf8\xe7\xdc\xf5\x42\x96\x15\xc9\x60\xec\xee\x5e\x92\x7e\x68\x1d\xbe\x0d\x16\x22\xf1\x85\x18\xaa\x33\xab\x0f\x4e\x0e\xe0\xfd\xb1\x43\x52\x9b\x3e\xb7\x5a\x7e\x00\xf6\xe3\x5f\xf9\x4b\xda\xb0\xc2\x8d\xa7\xef\xc2\xf6\x78\xd6\xd8\x9a\x0e\x22\x9b\xc7\xb4\xb9\x53\xa1\x6f\x8b\xb2\x61\xe0\xaa\x8d\x1c\xb0\xed\x72\x01\xbe\x39\x2a\xce\x6b\xe3\xf3\x37\xd3\xc1\x0c\x7e\x34\xc0\x44\x6f\x93\x54\x63\x90\x30\x9d\xaf\xb5\x29\xaa\xe0\x23\x6d\x47\xc3\xa7\x40\xd1\x9e\x55\xfa\x6b\xd3\x3b\x96\xf2\x12\x25\xf8\xdc\x3e\x9d\x68\x8b\x06\x1a\xe3\x5f\x06\x24\x8c\x98\x2a\xd4\x46\x8e\x4c\x7b\xbf\x99\x4a\x6b\xcd\x68\x7b\xee\xa8\x1e\x86\xcf\xd2\x54\x70\xa6\xac\x5e\x0d\x5e\x6c\xf7\x35\x17\xd3\xd1\x4d\x9e\x92\x94\x22\xd3\x72\x8c\xad\x37\x9f\x40\x92\xa2\xfe\x81\x19\x1f\xb2\x35\x44\x2e\x28\x28\xff\x4c\x5d\xbe\x54\x5b\x1b\x40\x1a\xb9\x1a\x13\xca\x03\xfa\x09\x4a\xda\xfc\x08\x26\xe6\xf2\x0b\x7e\x9f\x28\xe2\x82\xa1\xf5\x78\x32\x29\x18\x65\xe2\xe6\x7b\xc2\xb2\xbb\x71\xc6\x38\xa4\x6b\x9a\x74\x2d\x05\x4e\x19\xfa\xd3\x35\xc0\xd1\x78\x04\x16\xb4\x7b\x14\xa1\x92\x6d\x84\x8f\xe6\xb0\xeb\x9c\x57\xa1\xe8\x5b\x59\xb3\x42\x58\x8a\x90\xd5\xac\xf9\x79\xc5\xd3\x1c\xeb\x82\xf1\x62\xad\x83\x09\xbb\xc9\x3d\x6d\x1b\x4d\xf2\x68\x1e\x28\xf8\xe3\xc7\x17\xab\x95\x99\x9e\x6a\xc7\x7e\x8d\xb7\x75\xeb\xa2\x44\x44\xfb\xed\x33\x76\x9b\x1f\x42\xdc\x2e\xed\xe5\x68\x94\x58\x74\x73\x59\xdd\xae\x2f\x13\x08\xfb\x88\x3c\x4b\x2d\x91\x89\x96\xff\x86\xd9\xf9\xed\x15\x64\x61\x33\x07\xc8\xb7\x22\x5b\xbc\xdf\xe4\x7d\x2d\xa9\x53\x7d\xd0\x0d\x05\x1f\x12\x31\x3d\x76\x65\x24\x20\x46\x3a\x36\x91\x4e\xc7\xe9\xad\x77\xdd\x32\x11\xdf\x6d\xe2\xe9\xf2\x5c\xee\x1b\xb5\x6d\x04\x9a\xe5\x30\x75\x6d\x7c\x04\xa8\xb5\x29\x6c\x68\xc2\x8b\x33\x5f\x59\xa3\xa6\xfc\xd5\x52\x8b\xc1\x62\x70\xc5\x6b\x02\xf2\xc5\x48\xd2\xe1\x6a\xcd\xc9\x06\x89\x88\x86\x8c\xcc\x3f\x9d\xc3\x47\xe8\x3f\xa4\xa7\x36\x90\x88\x8a\xfd\x1e\xb0\x68\xec\x52\x4b\x5c\x46\xcf\xc6\x98\xd5\x28\x07\x27\x59\x4d\x39\xe7\xf5\xfe\x29\xad\xc5\xd8\xd1\x0b\xd9\xd7\x9a\x13\x12\x85\xff\x45\xe1\x7f\x27\x82\x21\x6e\x49\x99\xb7\xe0\x5a\x89\xfe\x2e\x09\x0b\x23\xd9\xf8\x9c\x7c\x5c\x79\x19\x8b\xe8\x5e\x2e\xb4\xc1\x2f\x57\xe9\xaf\xe3\xbf\x12\xa7\xd2\xd7\x73\xf3\x7d\xa6\xbc\x8c\x30\x73\x07\x28\x57\xe4\x53\x44\x0f\x79\x61\xd0\x25\x65\x91\xdd\x63\xb0\x45\x33\x21\xc9\x4b\xc4\xd5\xf4\x46\xbf\x17\xaf\x8a\x00\x3d\x79\xea\xad\x63\x17\xf9\x80\x1a\xc5\xe3\x6e\xc6\xd5\x9f\xcd\x98\x9f\xe0\xaf\x8c\x9a\xa2\xde\x3a\x1e\x6f\x24\xcd\x38\x64\xda\x63\x21\xda\x71\x98\xc2\x73\xc6\x27\x4b\x11\x99\xf2\xde\x3e\x2a\x43\xf5\x68\xda\x57\xd4\x05\x3b\x31\x9c\x74\xfd\x41\x73\xfe\xc6\x1f\x67\xae\x8a\x38\x58\x16\x3a\xb3\x80\x27\x8f\x08\x4b\xaf\x66\xe7\xce\x25\x9b\x4f\xd5\x67\xf0\x16\x4f\xc0\x9f\xbd\x5e\x37\x0a\xb5\x28\xff\x73\xe0\x2e\x4e\x90\x2b\xe8\x51\xf4\x00\x1f\xd7\x91\x7c\xc0\xe7\x67\xe0\x54\xd7\x72\x58\x05\xe4\xbb\x67\x18\x78\xb2\xcd\xda\xce\x94\x2b\x6a\x4c\x3e\x8e\x98\x69\xcf\xe5\xf3\x3f\xb4\x25\x5e\xe8\x48\x35\x3a\x36\xe3\x46\x94\xa6\x09\x25\xcb\x03\x86\xb4\xcf\x2e\x1d\x93\x22\xac\x31\x8d\x52\xa4\xe3\x74\x2d\xc5\x26\xdf\x58\xdb\xd8\xd5\xf5\xa3\xa4\xc6\x25\xd8\x8e\xeb\xf0\x2f\x3d\xb5\xf4\xd5\x98\xa3\x7b\x45\x35\x53\xf7\x4f\x9d\xa5\xc3\x35\xc5\x5f\x3d\xab\x18\x9b\xc5\xac\x9e\xe6\xc0\x39\x38\xcd\xff\xbe\x8f\x27\xd5\x73\xc3\x2d\xcc\x11\x34\x83\x7a\x17\xc9\x21\x75\xb5\x4a\x97\x22\x89\xf4\xd3\xfc\x02\x01\x92\x1e\xd1\xba\x95\xe5\xe8\xf2\x18\xad\x90\xd9\xfa\x09\x23\x23\x4e\xea\xfe\xac\x34\x68\xa4\x08\xe1\xb8\xb2\x2e\x3b\x38\xce\x9c\xdb\x0a\x49\x49\x80\xba\x44\x5d\x36\xb7\xb8\xcb\x6c\x99\x34\x53\xfc\xdf\x18\x36\xc8\x42\x8f\xb2\x74\x91\x34\x02\x9a\xd3\x99\x83\xbb\xfa\xdd\xae\x5c\x90\xa5\x57\x12\xf4\x5c\x6a\x0f\xbd\x0f\x37\x5b\xc8\xa4\x00\x08\x2f\x38\xd2\x71\x3e\xdc\x47\x2d\xad\x66\x70\x77\xf7\xdc\x06\xe1\x73\xeb\x44\xff\x3a\x27\x72\xf8\xaa\xe9\xb1\x26\x7f\x7b\xee\xb3\xa3\xd5\xc3\x28\x78\x70\x2c\xa7\x4e\xaf\x07\x04\x80\xba\xd4\x28\xfd\x48\x28\xaf\x90\x46\x6b\xee\x4c\xa9\xc9\xd3\x80\x19\xe4\x65\x1f\xce\x28\x8b\xc5\xc7\x00\xd4\xa8\x8e\x39\x5c\xb8\xb9\x9f\xe5\x18\x04\xa5\xa2\x87\x8d\x7e\x68\xc5\x59\xe6\xda\xd4\x18\xc5\x8e\xe3\x09\xec\xe2\xf0\xf3\x49\x77\x69\x8a\x03\xa5\xe5\x20\x56\xb8\x15\xad\xf6\x18\x96\x3d\xd9\x3c\x9e\x9d\x0c\x0a\x18\xbc\x8f\x59\xbe\x41\x66\x15\x89\x03\xa1\x5c\xf9\x3e\xbd\x4e\x9a\x4c\x4e\xad\x48\xda\xd1\x8f\x13\xff\xfa\xcd\x1e\xf9\x5a\x27\x60\x46\x68\xed\xf3\x17\x80\x6f\xb1\x61\x88\xbf\x41\xb1\x55\x6e\x33\x99\xce\xa8\x58\x83\xe4\xd5\xc1\x89\xd7\x86\xe8\x91\xee\x2b\x6f\xb3\x16\x7e\xae\x6e\x43\xec\x2e\xa7\x1a\x21\xac\x15\x9a\x13\x2f\xd8\xd0\xd1\x97\xb5\x37\xab\xb3\x54\xc5\xae\x46\xbd\x1c\x40\xb3\x52\x59\x8f\x5d\xe1\x9a\xc3\xae\xce\x63\xf3\x0a\x65\x5c\x4b\x74\x60\x45\x14\x97\x13\x14\xe6\x30\x44\x40\x08\x74\x34\x04\x4e\x44\xaa\x1e\x85\xf8\x90\xf8\x6b\xc8\xe7\x71\x9d\x70\x08\x00\xa6\xb0\x67\x82\x62\x76\xdf\x26\x6a\x64\x94\xe2\xab\x9c\xe5\x02\x84\x37\xb9\x8a\xcc\xca\x4e\xc9\x5e\x76\x0f\x89\x48\x36\x6c\x34\x85\x90\x3b\x5a\x6f\x7a\x57\xce\x10\x7c\xa1\xe8\x5d\xa5\x5f\xd0\xd2\x83\x89\xce\xe2\x91\x8c\x29\x34\xc4\x17\x29\xb6\xaa\x2d\xce\xc4\x47\xfc\x44\x51\x80\x99\xe5\x5f\xf9\xa5\x75\xc2\xd4\x35\x05\xdb\x89\x81\x99\x39\xd1\xab\x79\x0c\x7b\x65\x10\xf6\x7d\x20\x3b\x9d\x31\xf9\xf2\x7d\x72\x74\xac\x08\xfc\x8e\x9b\x1f\xe9\xc9\x48\x21\xae\x56\x01\xee\x53\x63\xd7\xd2\x70\x91\x5b\x14\x58\xa0\xdc\x8c\xbe\xe6\x03\x37\x7e\xf3\x63\x26\xb5\x7a\x30\xde\x5e\x04\x62\xb0\x9d\x89\xcf\x52\xed\x59\xce\x02\xa3\xf2\x89\x39\x21\x61\xe3\x40\xb2\x87\x29\xe6\x28\xb7\x79\x0f\x45\x74\x61\x60\xf5\xeb\x0f\x5e\x20\xb3\x37\x77\x58\x5c\x3e\x88\x6d\xef\xd7\x80\xa2\xdf\x31\x65\x5c\xb9\x5c\x59\x53\x82\x17\x29\x65\xd5\x7a\xc1\xe4\xd4\x08\xfd\x9a\xfd\x65\x18\x59\x10\x0a\xd8\x21\xca\x63\x18\xc6\xe8\xba\xf3\xa0\x4f\x87\xc7\x8c\x86\x6f\x17\x35\xfc\x43\xb0\xcd\xb7\x25\x80\xce\x61\x06\x3b\xc8\x6e\xe5\x3e\xe9\x7e\x87\x97\xa1\xf6\x62\xdb\xf8\xa8\xe4\xd8\x70\x31\x7e\x77\x97\xd3\x57\xd6\xb8\x1c\x55\x18\x23\xb8\x05\x91\xc6\xe1\xfc\xa0\xc4\x5e\xcd\x38\x12\x58\xf9\xed\x49\xba\xb3\xa9\x98\x9d\x6d\x3f\xc3\x8a\x2b\x72\xbf\x78\x87\x05\x01\x77\x42\x00\x7e\x86\xe0\x18\xd8\x79\x80\xe9\xd5\xf1\x2d\x55\xd7\x9a\xb0\x50\x23\xfe\x42\x0e\x4e\xb7\x88\xa2\x2c\x70\xf7\x9e\x64\xd3\x79\xbe\x42\xf3\x6d\xd8\x62\x4a\xdf\x4f\xf9\xfc\x4f\x47\xf4\xa6\x1b\x8f\x72\x3f\xd9\x73\x44\x33\x0e\x0f\x1f\xd9\x96\x22\x9a\x79\x03\x78\xb7\x04\xb9\x6b\x1f\xd6\x45\x8f\x07\x3a\x41\x5e\xe3\x77\x24\x32\x9a\x14\xb8\xe1\x64\x07\xa8\xd7\xd5\x1b\x1c\xd5\xaa\x81\x93\xeb\x5d\xc6\x3f\x1d\x79\xe7\x4c\x3b\x11\x3e\x0c\x90\x0e\xa7\x64\x05\xa4\xd8\x39\xd5\x44\x5c\x4a\xff\x8b\xb8\xd3\xef\xf5\x0d\x69\x33\x9e\xf6\xf2\x7a\x19\x3b\xfd\xd3\x36\xad\x15\xfa\x64\xb2\x63\x17\x62\xf9\xaf\x19\x0d\x81\xbc\xfa\xea\xa8\xa9\xb2\xaf\xd7\x3a\x11\xab\x34\x92\x93\x9f\x92\xe2\xe3\x7f\x3b\xfd\xf4\x62\xff\x9d\xd7\x4a\xe4\x1c\xd9\xa1\xc5\x88\x0f\xd5\x0e\x7e\x9f\x62\xd1\x70\x37\xcc\xa6\x8c\xe1\xda\x8e\xc2\x76\x01\x6c\xce\xa7\x05\x3d\x29\x4a\x4b\x66\x03\xde\xbd\x01\xf4\xdc\xbc\xe8\x2c\xeb\x33\x94\x6f\x6b\xf2\x54\x9e\x3a\xcb\x60\x06\x3b\x41\x61\xce\xec\x0a\xc8\xfb\xfc\x7e\x17\xf2\x04\xc1\xe8\x8f\xaf\xb0\x7f\xf6\x84\xf1\x60\xa9\x39\x00\x0e\xc9\xa4\x68\x27\x5a\xcf\x5e\xb8\x21\x8b\x67\xd7\x83\x4f\x17\x07\x91\xb7\x5a\x41\xf0\x3c\x7b\xbb\xbe\x73\x3c\x6b\xbd\xaf\x0e\x87\x25\xf7\xaa\x6a\x62\x36\x28\x31\x0c\x3d\x3f\x01\x13\x66\xf9\xdf\x7c\x19\x74\x1b\xd8\x1f\x10\xcf\x83\x34\x32\xb7\x0a\x6d\x68\x72\x37\x4a\xf5\xd9\x0c\x5e\x59\x7a\xc2\xb3\x80\xe2\x62\x70\x54\xc9\x56\xec\xc2\x14\xa6\x7b\xe2\x45\x42\x0f\xfb\x0d\xb8\xc0\xe9\x55\xdd\x99\x0e\xe1\xa8\x20\xdb\x6b\xd1\x5c\x4d\x39\x67\x3d\xba\x5c\x16\x8b\x96\x87\x82\x62\xbb\x3c\xed\x3d\x2b\x42\xa9\x01\xaa\xe6\x25\x88\xa4\x88\xb3\x76\xe9\xcc\x33\xa6\xce\xba\x4e\x0f\x89\xcd\xca\xa8\xb4\xaa\xd2\xb0\xbf\x3f\x5b\x24\x37\xec\xdb\x2a\x26\xee\xbf\xf7\x62\xcd\x84\x04\xb9\x8a\x09\x4b\x16\xdb\xe2\x16\xa8\xa4\xd1\x91\xeb\xbd\xcb\x22\x34\xf3\xe5\x4b\xcc\xe9\x1f\xe5\xbc\x14\x26\x8a\xad\xaf\x9a\x65\xd0\x1b\xf5\x45\x5e\x47\xf1\x01\x1b\x4f\x2f\x8c\x38\x16\x05\xab\xa7\x4f\x05\x0a\x65\x29\x90\x02\x9a\x7a\x8c\xe9\x81\xef\x44\x35\x0e\x5b\x3f\x14\xb6\xec\x31\xde\x43\x71\x69\x8a\x50\x80\x21\x03\xf3\xf7\x36\xcc\x3b\x4c\x25\xd2\x2a\x5c\xd0\x95\xef\x4d\x73\xe3\x78\x4d\xa0\x17\x62\x8a\xa1\x5d\xb0\xb7\x97\xea\x7b\x11\x20\xd8\x8f\x37\x35\xfb\xa3\x60\xe6\xf3\x43\x05\x09\x3e\xad\xab\x40\x37\x02\xfa\x53\x32\xbd\xa2\x39\x54\xc8\x9b\xc5\x4a\xe9\x88\x72\x5b\x46\x8c\x1d\x53\x4c\xdb\x75\xe0\xc3\x3c\xb8\x93\x3f\xe6\x44\xfc\x0e\x52\xe6\xec\xda\xe2\x5f\x7c\xa2\xfd\x48\x1b\xab\xd5\xde\xfd\x83\x69\x65\xe1\x8a\xcd\x95\x70\x1b\x34\x7c\x20\xcf\x61\x21\x2d\x2a\xa6\xd7\x81\x58\x46\x52\xe4\x6f\x72\x11\x54\x38\xe5\xfb\x4c\x91\x1c\x95\x21\x0b\xd5\xa8\x5a\x00\x21\xf3\x37\x38\x2c\xd7\xfe\x34\x18\xc5\x7f\x0f\x2b\x5f\xe5\x63\x9d\xd0\xe7\x43\xa2\x06\x10\x71\x2a\xb5\xad\x7d\x3b\xda\xe2\xef\x5b\x74\xc9\x47\x47\xdb\xa2\x87\x41\xfb\x19\x25\xa4\xaf\x13\xdc\xbe\x1f\x3c\x45\x1c\xd8\x0d\x09\x67\xd1\xbd\x9d\xd6\x81\xbe\xdf\xbf\x3f\xf9\x5c\x11\xa6\xa1\xee\x13\xc1\xb1\x63\x2d\x34\xa1\x98\x26\x8f\x9c\xd0\x22\x75\x27\x98\xec\x29\x3b\x03\x01\xa2\x08\x4d\xf6\x6d\xa9\xd5\x92\x78\x95\x25\x65\xeb\x27\x33\x23\x64\xe6\x8e\x60\x84\xb8\x62\x7c\x83\xe5\x7c\x94\x39\x79\x7f\xd7\xfc\x6f\x24\xb4\x19\x82\x2d\x2f\x5a\x31\xc8\x23\x44\x26\x4c\x81\x2d\x60\xf2\x88\x15\x86\x3b\xcf\x6d\xf9\x01\x79\x12\x86\xaf\x99\x47\x54\xf2\x43\xf2\x52\x90\xa0\x4f\x4b\x75\x5f\x38\x05\x2d\xc1\xbf\x8d\x05\xc4\x9e\xae\x4a\x7e\xab\x3f\xfa\xc7\x69\xc8\x1a\xca\x39\x7a\x1c\xab\xc7\xc6\xa8\x8a\x76\xfd\xef\xf7\xb2\x8d\x90\x04\x3b\xac\xe3\x67\x4b\x0d\x6a\x25\x7c\x75\x15\x67\xd0\xde\x63\x56\xca\xd4\x26\x6a\xda\x11\xd8\x0a\xb3\x34\x5f\x9d\xde\x2f\x42\x45\x1d\x1d\xdd\x2b\x79\x82\x9d\x52\x47\x82\x1a\x25\x31\x8a\x48\x3b\xdc\xa1\x22\x89\xf9\x24\x9e\xa1\x87\xdb\x79\x80\x87\x5c\xd2\x7b\x89\x20\x85\xa3\x10\x53\x72\x26\x2f\xa0\x5c\x88\x7c\x78\x55\x1f\x78\x4a\xab\xb0\x49\x52\x97\x8a\x26\x3a\x72\xf1\x19\x00\xff\x43\xa1\x08\x0b\x9d\x3a\xd9\xd5\x61\xa1\x78\xf7\xf7\x1b\x5c\xb4\xf3\x3d\xf4\x55\x2e\xcd\x09\x28\x88\xc8\x66\xb0\xe4\x2c\xf9\x54\xf8\x4e\x4c\x18\xa9\xdf\x79\x50\x51\xb3\x9b\xc0\x9f\x0e\x2c\xe4\xfe\xe4\x9b\x11\x37\x5f\x9d\x12\x15\x10\xd8\xae\x1a\x5f\x87\xb2\x9a\x75\x61\xd8\xe1\x3f\x63\x3e\x5f\xcc\x48\xbb\xdf\xd2\x37\xb4\xa0\xb0\x80\x2b\x5e\xae\x2e\x4b\xf5\xa5\xd0\x12\x74\xac\xa5\x9d\x8a\x6e\x43\x34\x8f\x49\xba\x37\x37\x30\xa6\x38\x98\x07\xd3\xae\x7e\xca\x82\x1a\x82\xa0\x12\xd5\x0e\x16\x8e\x58\x66\xad\x4c\x08\x72\x30\x32\xac\xa5\x54\xfc\x5e\x09\x99\x0f\x74\xff\x8e\xa7\x6a\xb5\xde\x75\x4a\x49\xe6\x4d\x7a\x8a\xf7\xc6\x8f\x54\x96\x92\xae\xe6\xc2\x9d\x2d\xb5\x9d\xc0\xa2\xc8\x60\xd5\x0e\xb9\x2c\x28\x5b\x8f\x1b\xf5\xe8\xfd\x5f\x9c\x2c\xd3\xe4\xd5\x95\xfd\x3f\xbd\x75\xa6\x80\xba\x0a\xb7\x3f\x01\x1d\xd7\xe6\x61\x30\xbf\x4c\xb5\x29\xc4\xb3\xcd\x9b\xd5\xf0\x69\x6d\x65\x53\xd3\xf6\xec\x4d\x3a\xc1\x02\x0c\x6f\x89\x4f\x28\x8f\xc6\xc6\x9b\xf6\x87\x61\x07\x7c\xea\x6d\x24\x68\x43\xd1\xe9\x25\xeb\x98\xfa\x1b\x82\x09\xc7\xab\xf6\xa7\xf5\x9b\xed\xb0\xc2\x7d\x8b\x50\xfa\x6c\x88\xc2\x55\x1e\x57\x6f\x81\xeb\x89\x06\xa7\x27\x3c\xb4\x52\x59\xfd\x88\x0d\xea\x5b\x79\xa1\x3f\xa3\x81\xc4\x23\x28\xeb\x3a\x05\x7d\x90\x49\x22\x49\x23\xa2\xce\x68\xa0\x3b\xc5\x8a\xfe\xff\x75\x92\x73\xea\xbd\xcb\xe7\x00\xf5\xda\xd5\x82\x47\x76\x3d\x51\xbe\x9a\x81\xb0\xa9\x67\xec\x37\x89\xd1\xef\x52\xa6\xb5\xdf\xfb\x93\x3a\xdf\x6e\x01\x8b\xde\x9a\x61\x58\x3f\x33\x74\x3a\xac\x26\xae\x14\x51\x7d\x8c\x79\x29\x2a\xe4\x62\x41\xe1\x07\x19\x98\xb0\x10\x41\x2f\x93\x50\x66\x3d\x24\xe8\xe3\xbe\xfd\xae\xbc\x74\x1f\x7c\xea\x00\xb1\x99\x50\x2d\x63\x17\x11\x54\x44\x5e\x9c\xb6\x23\x7d\xc6\x96\x74\x1b\xb3\xdb\x7e\x7c\x61\xb8\xf0\x8e\x80\x36\x2c\x4c\xb9\x75\x41\xd0\xce\x62\xb9\xf1\x0d\xb5\xa1\x6e\x82\x6a\x21\xfc\x8c\x53\xce\xe0\x44\x8f\xad\xa4\x7e\x3e\xe4\x23\xb3\x2c\xc1\xfc\x7b\x25\xbf\x6b\x16\xb8\x6d\xe7\xa5\xef\x89\x8e\x69\x20\x64\x09\x85\x01\xba\xc7\x1a\xe2\x36\x15\x4e\x9b\x6e\xba\x5a\xc1\x4d\xde\x70\xdd\x9b\x2c\x3f\x00\x61\xe6\x8f\xf1\x9f\x7a\xe6\x11\x6f\x8b\x0f\x6e\x63\x57\x2f\x08\x7f\xd0\x66\xf4\x81\xea\xcb\x6c\x5f\x36\xe4\x84\xbf\xf4\x0d\x63\x6a\xd5\x99\x18\xa4\x16\x96\x82\x13\xe6\xfd\xcc\xba\x7d\x8a\xa7\x13\xc5\xb3\xcf\xcb\xbe\x83\x0f\x38\x8e\x07\x5e\x8d\x46\x00\xa0\x76\x32\xc4\xca\xd1\xa3\x99\x9b\x78\x1e\xa2\x72\xc2\x49\x8d\xb8\x39\x2d\x1e\xe9\xaf\x5b\x15\xa3\x45\x84\x3d\xd5\xe5\xea\x86\x72\x2d\xbf\xa0\x2c\xe8\xc0\xc8\x21\x82\x56\x0f\x68\x8a\x3f\x2d\x5c\xa5\xe3\xaf\xf9\xd4\xa7\x3e\xd3\xde\x85\x97\xcc\xb0\xc6\xc8\x5f\xf7\xb5\x0a\x1a\xdd\x42\xfc\x88\x00\x07\x2c\x82\xb4\xf5\x07\x9c\x0b\x3c\xed\x6e\xa1\x0d\xb5\x7d\xed\xbb\xf0\x2c\xd7\x91\xce\xd4\x8b\x00\x57\x3a\x21\x06\x50\x90\x59\x7c\xf6\xd7\x97\x24\x6f\xfd\x43\xd0\x17\x68\x0d\xc6\x10\x9b\xd1\xc1\x23\x0a\x1f\x12\x94\x5f\x60\xed\x31\x53\xfa\x0c\xa2\x0f\xc6\x53\x22\x74\x95\x04\xd8\x45\x6d\x75\xa6\x69\x35\x46\xf9\x18\xa8\x23\x7f\x9f\x10\x33\x2a\x42\xf9\xdb\x06\xe9\x5f\x71\x2d\x7b\x51\x3d\x68\xde\x84\x7c\x51\x16\x2f\x24\x91\xf5\x32\x23\xf4\x68\x0a\xc9\x87\xcc\x4d\xf9\x15\xe7\x36\x3b\x72\x5a\x26\x25\x0a\xcd\x08\xb5\x7c\x5f\x04\xf1\x2a\xc2\x27\xaf\x99\x40\x88\x91\x8c\x7a\x7f\x3b\x5e\x5b\x77\x57\x91\x9c\xe2\xac\xa9\x51\xe2\xd1\x10\x3e\x64\x10\xae\x86\x0c\x84\xf8\x24\x80\xd9\xf2\xda\xde\xe4\xf1\xea\x29\xc9\xc9\xf2\x05\xa1\x8f\xb5\x59\x64\x6d\x49\x5d\x34\x54\xaa\x5e\xd2\x3e\x4a\x04\xd7\xac\x06\x3a\xb1\xf1\x56\x86\xc7\xa7\xca\x6b\x9b\x7a\xa5\xdc\x0f\x8b\xe9\x62\x9a\x6c\x74\x51\x8d\xb0\xad\xe5\xaf\x9a\xc0\xd4\xb0\x62\xf3\x95\x1b\x08\xe5\x31\x2c\xb5\x2f\x00\xca\x5a\xd3\x48\xb8\xae\x26\xde\x4b\x63\xce\x7c\x35\x83\x3d\x6d\xb8\x1a\x41\x0a\xc0\xfb\x04\x6a\xdc\xb3\xb9\xcf\xa5\x07\x8b\x1a\xf9\x6e\x75\x10\x9e\x9e\x6e\x98\xd6\x04\x5e\xef\x12\xf0\xff\xa1\x94\xa0\xea\x3a\x2d\xc0\xf4\xed\xce\x11\xa7\x81\x0c\x45\x6e\x50\xe9\x32\x2f\xec\xdf\xaf\x25\x05\xc7\x6f\xbc\x31\xb3\xd5\x62\xdb\xb0\x87\x44\x6f\xf2\x9b\x00\x13\x63\x28\x84\x88\x5b\x0c\x57\x08\x4f\x79\xea\x36\x1a\x7d\x41\xc8\x9c\x96\xce\x42\xb8\x4f\xe3\x93\x71\xb0\x28\x3a\x9f\xcc\xe1\xcf\xd6\xe7\x75\x26\xe3\x09\x06\x11\x03\x14\x20\xf8\xb5\xe9\x2a\xde\x79\xe6\x70\x1e\xfb\xc6\x1a\x20\x7d\x3c\x96\xf5\x98\xc8\x1e\xa2\xa8\x24\x28\x21\x01\xe3\x04\x23\xa0\xc7\x71\x05\xcc\x13\xe1\x44\xbe\xbe\x82\x0e\x15\x4b\xeb\xa5\x79\x50\x2f\xcb\x4b\x64\x08\xfe\x58\x13\x69\xc9\x72\xf1\x5a\xa9\xcb\xdf\x78\x3b\x88\x29\x7e\x18\x03\xc1\x05\x53\x77\xeb\xa0\xe0\x7c\xb0\x76\xa7\x2e\xb0\xbf\xeb\xc3\x2a\xcb\x01\xe4\x8f\x2f\xa1\xf8\xc2\xc9\x04\x00\x77\x46\x08\x11\xa7\x9d\xc1\x87\x84\x31\x4a\xed\x54\x75\xb2\xae\xc4\x62\xb8\x81\x1f\x7d\x97\x95\x83\x53\x00\xce\x5c\x21\xf1\xf7\x93\x5c\x75\x5e\x7e\x4d\x55\x55\x92\x38\x69\x64\xfd\x15\x5f\x45\xc1\x46\xfc\x50\x93\xd5\x4e\xa5\xda\x6f\x3e\x32\x24\xa8\x93\x86\x6f\xed\x69\xa8\xeb\x66\x81\xef\xb5\x72\x55\xa7\x2a\x19\x6c\xc0\x83\x81\xa9\x5d\xfb\x85\xe0\xb6\x30\xc3\xfd\x42\x48\xcc\x7f\x0e\x53\xea\x13\x3c\x60\xbf\x46\xa3\x2a\xc0\x09\x18\x9f\xe3\x3e\xb9\xa4\x7e\x0b\x71\x54\xf8\x80\x7a\x00\x65\xb2\x7a\xc7\xbf\x9f\x00\x4b\x13\xa6\x0b\x58\xfc\x57\x59\xad\x99\xab\x23\xd4\x22\x0f\x51\x34\xf9\xe3\xaa\x94\x23\x60\x24\xa2\x37\xd0\x17\x76\xe3\x68\x21\x70\x6e\x56\x2c\x97\x91\x70\xcd\xaf\x2a\x3c\x68\x86\x9b\x7a\x5b\xd3\x2b\xf6\x3d\x87\x9d\xe9\x00\x92\x21\x5e\x31\x98\xa4\x7e\x95\x31\x6d\xae\xa5\x07\x79\xd5\x58\x38\x99\x08\x27\xda\xbe\xa1\x85\x33\x3c\xfb\x7d\x21\x1e\x9a\x26\xdd\xe2\xe5\x2d\xa4\x6a\xff\xb8\x61\x05\x44\xe7\x72\x3d\xef\xb0\xac\xae\xfe\x44\x0b\x04\x5d\xe9\x21\x4f\x27\x61\xcf\xc4\x1e\xa9\x8f\x1f\x4f\x4a\x4a\xcc\x7f\x04\x07\x97\x71\xe2\xd1\x1f\xe5\xf4\xdd\xd4\x58\x0b\x71\x30\x6a\xe3\xd3\x8c\x17\x41\x5b\x96\x4e\x7b\x82\xf0\x9b\x66\xb5\xec\x6a\xe0\xdd\x62\x21\x24\x76\xb7\x57\x01\xae\x36\xfa\xa5\x97\x3b\x9a\xc0\x80\x39\xc7\x32\x7b\x5b\xc4\xa2\xa4\xc1\x5f\xb1\x1d\x77\xae\x38\x92\xcd\x9e\xbe\x48\x76\xb7\xc6\x6f\x27\xdc\xd5\x6f\x22\x0d\x38\x21\x8d\x2e\x33\x5b\x90\x2a\xbc\x4b\x97\x25\xe5\xf7\x4a\xe7\x3e\xcf\x4b\x53\x51\xbe\xc4\xb2\xb4\xce\x40\xde\xe9\x89\x97\xeb\x2f\xfd\xfe\x01\xeb\x8d\x18\x0f\x78\x8a\xae\xa9\x84\x38\xcb\x8b\x9a\x3a\xd9\x50\xa6\xdc\xc2\x94\xdc\x2f\xee\x88\x65\xa5\x60\x8b\x2d\x43\xea\x4a\x3e\xf9\x7c\x17\x4e\x18\xcd\x51\x04\xad\x32\xdb\xf8\x23\xe8\xe2\xf8\xff\x9a\x50\x35\xe3\xd1\x79\x67\x9c\xaf\x36\xbf\xba\xeb\x45\x0f\x61\xc8\x70\xec\xf8\x31\xe5\xd6\x19\xbe\x48\xab\x80\xb2\x9c\x93\xfc\x26\x10\xdd\xd7\x73\x2c\x74\x11\xb4\x24\x6d\x02\xe7\x8b\x9d\x11\x8c\xc9\xff\xfb\x97\xe8\x72\xc6\x84\x13\x89\xdb\x78\xaa\xf9\xdb\xc0\x7b\xcc\xb3\x24\xda\x8b\xfa\x12\xb4\x91\x28\x4c\x87\x62\x3f\x79\xb5\x74\x42\x0b\x5d\x74\x2f\xd7\x7e\x8f\x23\xf7\xc8\xa4\xd2\xaf\xc3\x1e\x22\xc9\x2e\xaa\xad\x2e\x91\x6f\x69\x57\x0f\x87\x7a\x76\xb8\xff\xc6\xe3\x4b\xd5\x72\x43\xdd\xe7\xbb\xe6\x0f\x2c\xdf\x6b\x0c\xf7\xb3\x33\xbb\xfd\x9b\x24\xa5\x5a\x66\x84\x86\xa9\x86\x2f\xe0\x38\x3c\x04\x53\x8c\x5c\x37\xc7\x76\x64\xcb\xfd\x1d\x3a\xc9\x48\x98\xa2\xc5\x17\xe1\x62\x21\xfa\x60\xe2\x65\xa0\x80\x1c\xaf\x1f\xe5\x40\x48\x52\xe2\x53\x32\xd6\xe2\x38\x10\xba\xb3\xf1\x68\x7e\x02\x2c\x4c\x5b\xd1\xbc\x72\x6f\xd1\x99\x71\x96\x8a\x8f\x29\xce\xac\x5c\x8b\xd1\x35\x72\x46\xe2\x9b\x99\x38\x72\xf9\x94\x80\x8d\x52\xb4\x64\x42\x9b\x2a\x47\xa4\x71\x96\x8a\x6f\x5b\x91\x49\xd2\xd7\xd0\xda\x65\x80\xdc\xd7\xe3\x16\xf2\x2e\x02\x83\x10\xf0\x78\xf6\xf1\x05\xc1\xad\x34\x31\x4a\x86\xc6\x6b\x5f\x35\x43\x5c\xd1\xac\x8d\x44\x9f\x2b\x49\x05\x3d\x75\x29\xc3\x89\xd6\x30\xfc\x12\x73\x55\x96\x49\x1d\x08\x39\xfd\x59\xe2\x23\xca\x83\x17\x76\x8e\x9a\xe3\x48\x44\x7f\x2f\x07\x95\x80\x92\xcd\x95\xeb\xc2\xfa\x8f\xa9\x0f\x75\x86\xd5\x12\x8e\x8d\x59\x5c\x6b\x44\xe7\xa1\x48\xc3\x9e\xb2\x39\xa5\xda\x7c\x19\xae\xa1\x83\x4b\x74\x9d\x73\x1f\x5c\x66\xb5\xff\xfb\x6c\xf2\x2d\x05\x50\x3a\x9d\x26\xc9\xad\xb8\xbd\xd5\xcc\x0d\x2e\x1b\xd4\x62\x4e\x0a\xe0\x86\x3a\xae\x2c\xaf\x28\x1f\x8f\x50\x58\xe4\xa2\xa0\xa5\xd5\xa2\xae\x35\x53\xad\x0a\x7e\x30\x42\x93\x47\x02\x2f\x51\x8d\x62\xb5\x56\xbe\x64\xf3\xbb\xd8\x8d\xd5\xd0\xb3\x16\x85\xc3\x4b\xdd\x34\x31\x15\xb4\x75\x0c\x4b\xfe\x2c\x2c\xfc\xf4\x84\xb2\x0f\x19\x05\x29\x5f\x3b\x03\x10\x3b\xe7\xff\x8e\x02\x08\x80\x25\x0b\x59\x49\xd5\x61\x41\x13\xfe\x61\x31\x0e\xb5\x47\x7c\xac\x08\xa0\xfc\x0d\x69\xdb\x14\x95\x42\xbe\x17\xf0\xcd\x20\xfd\x1e\x83\xa3\x47\xe1\xfb\x96\x21\xdd\x77\x65\x06\x6c\x73\x03\x3a\xe4\xde\x32\x4a\x2d\x89\x4a\xfa\x7d\xa7\xcc\x3e\x5f\xf5\xc7\xdf\x76\x8c\xf8\x8a\x4c\xa6\xd5\xc2\x9a\xd7\x8c\x20\x16\x2a\x55\xb5\x5f\x47\x44\x4a\xa0\x62\xe0\x29\x85\x32\xb5\x8d\x51\xb1\x4c\x3e\x7e\xa2\x1b\x14\x4b\x6a\x81\x41\x88\xbf\xb1\xd9\x37\xb2\xdd\xbd\x5f\x52\x08\x87\x74\x01\xfc\x59\x87\x1c\xc1\x7f\x9a\x80\x88\xbb\x10\x1b\xa7\xc3\xe7\xb5\x97\x3d\x9a\x70\x99\xf0\xbb\xba\x65\x01\xc0\x32\x64\x46\x0d\xc1\x50\x15\x1c\xe8\xf0\xac\xa4\x53\x5a\xc5\x89\x43\x5d\xf4\xa9\xe4\x20\xd3\x3d\x12\x5a\xda\x98\x54\x15\x75\xf6\xc2\x78\xe2\x2b\xc1\x2a\xc7\xda\x2c\x2c\xec\x29\xdf\x69\xde\x80\x3e\x26\xcf\x56\xa4\x59\x30\x89\xba\x4a\xc1\x64\xa4\x2d\xa7\x19\xa3\x56\xb9\x26\xd6\x6d\x24\xee\x58\x37\x82\x7f\x91\x03\xd2\xe8\xf8\xb2\xdc\xf8\x71\x33\x93\x72\xb5\xd6\x8e\x6a\x83\xd5\x87\x35\x84\x3d\x34\xda\xe1\x01\xf8\xb8\x69\x7b\xba\x5e\x99\x09', 2)
| 62,539
| 62,539
| 0.749996
| 15,630
| 62,539
| 3.000128
| 0.016699
| 0.002431
| 0.002495
| 0.002047
| 0.000832
| 0.000512
| 0.000512
| 0
| 0
| 0
| 0
| 0.314283
| 0.000048
| 62,539
| 1
| 62,539
| 62,539
| 0.435557
| 0
| 0
| 0
| 0
| 1
| 0.99936
| 0.99936
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
75053804d338ab4b55ec8b4c73bb1a30ea4aefbc
| 123
|
py
|
Python
|
contextual-repr-analysis/contexteval/data/__init__.py
|
Albert-Ma/bert-fine-tuned-gain
|
f752c1182f1c800f5f56998e13fd6115929df655
|
[
"Apache-2.0"
] | 2
|
2020-10-29T01:26:43.000Z
|
2021-12-12T12:05:26.000Z
|
contextual-repr-analysis/contexteval/data/__init__.py
|
Albert-Ma/bert-fine-tuned-gain
|
f752c1182f1c800f5f56998e13fd6115929df655
|
[
"Apache-2.0"
] | null | null | null |
contextual-repr-analysis/contexteval/data/__init__.py
|
Albert-Ma/bert-fine-tuned-gain
|
f752c1182f1c800f5f56998e13fd6115929df655
|
[
"Apache-2.0"
] | null | null | null |
from contexteval.data.dataset_readers import * # noqa: F401,F403
from contexteval.data.fields import * # noqa: F401,F403
| 41
| 65
| 0.772358
| 17
| 123
| 5.529412
| 0.588235
| 0.319149
| 0.404255
| 0.382979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11215
| 0.130081
| 123
| 2
| 66
| 61.5
| 0.766355
| 0.252033
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 7
|
7537086653734d4b173990c7e354ab7ea494b172
| 29,590
|
py
|
Python
|
tests/integration/test_release_event.py
|
majamassarini/packit-service
|
12baf67799412c8fa56e2a821cd9d584e2437141
|
[
"MIT"
] | 20
|
2019-05-24T12:33:05.000Z
|
2020-07-28T06:03:57.000Z
|
tests/integration/test_release_event.py
|
majamassarini/packit-service
|
12baf67799412c8fa56e2a821cd9d584e2437141
|
[
"MIT"
] | 735
|
2019-05-15T11:52:36.000Z
|
2020-08-02T23:21:44.000Z
|
tests/integration/test_release_event.py
|
majamassarini/packit-service
|
12baf67799412c8fa56e2a821cd9d584e2437141
|
[
"MIT"
] | 28
|
2019-05-16T13:32:03.000Z
|
2020-07-29T10:23:54.000Z
|
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import json
import shutil
import pytest
from celery.app.task import Context, Task
from celery.canvas import Signature
from flexmock import flexmock
from github import Github
from rebasehelper.exceptions import RebaseHelperError
from packit.api import PackitAPI
from packit.config import JobConfigTriggerType
from packit.config.aliases import get_branches
from packit.distgit import DistGit
from packit.local_project import LocalProject
from packit.pkgtool import PkgTool
from packit_service import sentry_integration
from packit_service.config import ServiceConfig
from packit_service.constants import TASK_ACCEPTED
from packit_service.models import (
JobTriggerModelType,
PipelineModel,
ProjectReleaseModel,
ProposeDownstreamModel,
ProposeDownstreamStatus,
ProposeDownstreamTargetModel,
ProposeDownstreamTargetStatus,
)
from packit_service.service.db_triggers import AddReleaseDbTrigger
from packit_service.service.urls import get_propose_downstream_info_url
from packit_service.worker.allowlist import Allowlist
from packit_service.worker.jobs import SteveJobs
from packit_service.worker.monitoring import Pushgateway
from packit_service.worker.helpers.propose_downstream import ProposeDownstreamJobHelper
from packit_service.worker.reporting import BaseCommitStatus
from packit_service.worker.tasks import run_propose_downstream_handler
from tests.spellbook import first_dict_value, get_parameters_from_results
@pytest.fixture(scope="module")
def fedora_branches():
return sorted(get_branches("fedora-all"))
@pytest.fixture
def mock_propose_downstream_functionality():
trigger = flexmock(
job_trigger_model_type=JobTriggerModelType.release,
id=12,
job_config_trigger_type=JobConfigTriggerType.release,
)
run_model = flexmock(PipelineModel)
flexmock(ProjectReleaseModel).should_receive("get_or_create").with_args(
tag_name="0.3.0",
namespace="packit-service",
repo_name="hello-world",
project_url="https://github.com/packit-service/hello-world",
commit_hash="123456",
).and_return(trigger).once()
propose_downstream_model = flexmock(id=123, propose_downstream_targets=[])
flexmock(ProposeDownstreamModel).should_receive("create_with_new_run").with_args(
status=ProposeDownstreamStatus.running,
trigger_model=trigger,
).and_return(propose_downstream_model, run_model).once()
model = flexmock(status="queued", id=1234)
flexmock(ProposeDownstreamTargetModel).should_receive("create").with_args(
status=ProposeDownstreamTargetStatus.queued
).and_return(model)
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_all"
).with_args(
description=TASK_ACCEPTED,
state=BaseCommitStatus.pending,
url="",
).once()
yield propose_downstream_model, model
def test_dist_git_push_release_handle(
github_release_webhook, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, metadata: {targets:[]}}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
project = flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
lp = flexmock(LocalProject, refresh_the_arguments=lambda: None)
lp.working_dir = ""
lp.git_project = project
flexmock(DistGit).should_receive("local_project").and_return(lp)
# reset of the upstream repo
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.once()
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch="main", tag="0.3.0", create_pr=True
).and_return(flexmock(url="some_url")).once()
flexmock(PackitAPI).should_receive("clean")
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).once()
flexmock(model).should_receive("set_branch").with_args(branch="main").once()
flexmock(model).should_receive("set_downstream_pr_url").with_args(
downstream_pr_url="some_url"
).once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.submitted
).once()
flexmock(model).should_receive("set_start_time").once()
flexmock(model).should_receive("set_finished_time").once()
flexmock(model).should_receive("set_logs").once()
flexmock(propose_downstream_model).should_receive("set_status").with_args(
status=ProposeDownstreamStatus.finished
).once()
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(Signature).should_receive("apply_async").once()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
flexmock(shutil).should_receive("rmtree").with_args("")
url = get_propose_downstream_info_url(model.id)
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Propose downstream finished successfully.",
state=BaseCommitStatus.success,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(
package_config=package_config,
event=event_dict,
job_config=job_config,
)
assert first_dict_value(results["job"])["success"]
def test_dist_git_push_release_handle_multiple_branches(
github_release_webhook, fedora_branches, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, "
"metadata: {targets:[], dist-git-branch: fedora-all}}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
project = flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
flexmock(LocalProject, refresh_the_arguments=lambda: None)
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.times(len(fedora_branches))
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
for branch in fedora_branches:
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch=branch, tag="0.3.0", create_pr=True
).and_return(flexmock(url="some_url")).once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).times(len(fedora_branches))
flexmock(model).should_receive("set_branch").times(len(fedora_branches))
flexmock(model).should_receive("set_downstream_pr_url").with_args(
downstream_pr_url="some_url"
).times(len(fedora_branches))
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.submitted
).times(len(fedora_branches))
flexmock(model).should_receive("set_start_time").times(len(fedora_branches))
flexmock(model).should_receive("set_finished_time").times(len(fedora_branches))
flexmock(model).should_receive("set_logs").times(len(fedora_branches))
flexmock(propose_downstream_model).should_receive("set_status").with_args(
status=ProposeDownstreamStatus.finished
).once()
flexmock(PkgTool).should_receive("clone").and_return(None)
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(Signature).should_receive("apply_async").once()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
url = get_propose_downstream_info_url(model.id)
for branch in fedora_branches:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=branch,
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
for branch in fedora_branches:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=branch,
description="Propose downstream finished successfully.",
state=BaseCommitStatus.success,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(
package_config=package_config,
event=event_dict,
job_config=job_config,
)
assert first_dict_value(results["job"])["success"]
def test_dist_git_push_release_handle_one_failed(
github_release_webhook, fedora_branches, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, "
"targets:[], dist_git_branches: [fedora-all,]}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
project = (
flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
.should_receive("create_issue")
.once()
.and_return(flexmock(id="1", url="an url"))
.mock()
)
project.should_receive("get_issue_list").and_return([])
flexmock(LocalProject, refresh_the_arguments=lambda: None)
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.times(len(fedora_branches))
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
for i, branch in enumerate(fedora_branches):
if i == 1:
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch=branch, tag="0.3.0", create_pr=True
).and_raise(Exception, f"Failed {branch}").once()
else:
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch=branch, tag="0.3.0", create_pr=True
).and_return(flexmock(url="some_url")).once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).times(len(fedora_branches))
flexmock(model).should_receive("set_branch").times(len(fedora_branches))
flexmock(model).should_receive("set_start_time").times(len(fedora_branches))
flexmock(model).should_receive("set_finished_time").times(len(fedora_branches))
flexmock(model).should_receive("set_logs").times(len(fedora_branches))
flexmock(model).should_receive("set_downstream_pr_url").with_args(
downstream_pr_url="some_url"
).times(
len(fedora_branches) - 1 # one branch failed
)
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.submitted
).times(
len(fedora_branches) - 1
) # one branch failed
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.error
).once() # this is the failed branch
flexmock(propose_downstream_model).should_receive("set_status").with_args(
status=ProposeDownstreamStatus.error
).once()
flexmock(PkgTool).should_receive("clone").and_return(None)
flexmock(sentry_integration).should_receive("send_to_sentry").and_return().once()
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(Signature).should_receive("apply_async").once()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
url = get_propose_downstream_info_url(model.id)
for branch in fedora_branches:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=branch,
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
for i in range(len(fedora_branches)):
if i == 1:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=fedora_branches[i],
description=f"Propose downstream failed: Failed {fedora_branches[i]}",
state=BaseCommitStatus.failure,
url=url,
).once()
else:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=fedora_branches[i],
description="Propose downstream finished successfully.",
state=BaseCommitStatus.success,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(
package_config=package_config,
event=event_dict,
job_config=job_config,
)
assert not first_dict_value(results["job"])["success"]
def test_dist_git_push_release_handle_all_failed(
github_release_webhook, fedora_branches, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, "
"metadata: {targets:[], dist-git-branch: fedora-all}}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
table_content = ""
for branch in fedora_branches:
table_content += f"| `{branch}` | `Failed` |\n"
project = (
flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
.should_receive("create_issue")
.with_args(
title="[packit] Propose downstream failed for release 0.3.0",
body="Packit failed on creating pull-requests in dist-git:\n\n"
"| dist-git branch | error |\n"
"| --------------- | ----- |\n"
f"{table_content}\n\n"
"You can retrigger the update by adding a comment (`/packit propose-downstream`)"
" into this issue.\n",
)
.once()
.and_return(flexmock(id="1", url="an url"))
.mock()
)
project.should_receive("get_issue_list").and_return([])
lp = flexmock(LocalProject, refresh_the_arguments=lambda: None)
lp.git_project = project
lp.working_dir = ""
flexmock(DistGit).should_receive("local_project").and_return(lp)
# reset of the upstream repo
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.times(len(fedora_branches))
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
flexmock(PackitAPI).should_receive("sync_release").and_raise(
Exception, "Failed"
).times(len(fedora_branches))
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).times(len(fedora_branches))
flexmock(model).should_receive("set_branch").times(len(fedora_branches))
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.error
).times(len(fedora_branches))
flexmock(model).should_receive("set_start_time").times(len(fedora_branches))
flexmock(model).should_receive("set_finished_time").times(len(fedora_branches))
flexmock(model).should_receive("set_logs").times(len(fedora_branches))
flexmock(propose_downstream_model).should_receive("set_status").with_args(
status=ProposeDownstreamStatus.error
).once()
flexmock(sentry_integration).should_receive("send_to_sentry").and_return().times(
len(fedora_branches)
)
flexmock(shutil).should_receive("rmtree").with_args("")
flexmock(Signature).should_receive("apply_async").once()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
url = get_propose_downstream_info_url(model.id)
for branch in fedora_branches:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=branch,
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
for branch in fedora_branches:
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch=branch,
description="Propose downstream failed: Failed",
state=BaseCommitStatus.failure,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(
package_config=package_config,
event=event_dict,
job_config=job_config,
)
assert not first_dict_value(results["job"])["success"]
def test_retry_propose_downstream_task(
github_release_webhook, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, metadata: {targets:[]}}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
project = flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
lp = flexmock(LocalProject, refresh_the_arguments=lambda: None)
lp.git_project = project
lp.working_dir = ""
flexmock(DistGit).should_receive("local_project").and_return(lp)
# reset of the upstream repo
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.once()
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(Signature).should_receive("apply_async").once()
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch="main", tag="0.3.0", create_pr=True
).and_raise(
RebaseHelperError, "Failed to download file from URL example.com"
).once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).once()
flexmock(model).should_receive("set_branch").with_args(branch="main").once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.retry
).once()
flexmock(model).should_receive("set_start_time").once()
flexmock(model).should_receive("set_finished_time").once()
flexmock(model).should_receive("set_logs").once()
flexmock(shutil).should_receive("rmtree").with_args("")
flexmock(Task).should_receive("retry").once().and_return()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
url = get_propose_downstream_info_url(model.id)
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Propose downstream is being retried because "
"we were not able yet to download the archive. ",
state=BaseCommitStatus.pending,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(event_dict, package_config, job_config)
assert first_dict_value(results["job"])["success"] # yes, success, see #1140
assert "Not able to download" in first_dict_value(results["job"])["details"]["msg"]
def test_dont_retry_propose_downstream_task(
github_release_webhook, mock_propose_downstream_functionality
):
propose_downstream_model, model = mock_propose_downstream_functionality
packit_yaml = (
"{'specfile_path': 'hello-world.spec', 'synced_files': []"
", jobs: [{trigger: release, job: propose_downstream, metadata: {targets:[]}}]}"
)
flexmock(Github, get_repo=lambda full_name_or_id: None)
project = (
flexmock(
get_file_content=lambda path, ref: packit_yaml,
full_repo_name="packit-service/hello-world",
repo="hello-world",
namespace="packit-service",
get_files=lambda ref, filter_regex: [],
get_sha_from_tag=lambda tag_name: "123456",
get_web_url=lambda: "https://github.com/packit/hello-world",
is_private=lambda: False,
default_branch="main",
)
.should_receive("create_issue")
.once()
.and_return(flexmock(id="1", url="an url"))
.mock()
)
project.should_receive("get_issue_list").and_return([]).once()
lp = flexmock(LocalProject, refresh_the_arguments=lambda: None)
lp.git_project = project
lp.working_dir = ""
flexmock(DistGit).should_receive("local_project").and_return(lp)
flexmock(Allowlist, check_and_report=True)
ServiceConfig().get_service_config().get_project = lambda url: project
flexmock(AddReleaseDbTrigger).should_receive("db_trigger").and_return(
flexmock(
job_config_trigger_type=JobConfigTriggerType.release,
id=123,
job_trigger_model_type=JobTriggerModelType.release,
)
)
flexmock(Signature).should_receive("apply_async").once()
flexmock(PackitAPI).should_receive("sync_release").with_args(
dist_git_branch="main", tag="0.3.0", create_pr=True
).and_raise(
RebaseHelperError, "Failed to download file from URL example.com"
).once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.running
).once()
flexmock(model).should_receive("set_branch").with_args(branch="main").once()
flexmock(model).should_receive("set_status").with_args(
status=ProposeDownstreamTargetStatus.error
).once()
flexmock(model).should_receive("set_start_time").once()
flexmock(model).should_receive("set_finished_time").once()
flexmock(model).should_receive("set_logs").once()
flexmock(propose_downstream_model).should_receive("set_status").with_args(
status=ProposeDownstreamStatus.error
).once()
flexmock(LocalProject).should_receive("git_repo").and_return(
flexmock(
head=flexmock()
.should_receive("reset")
.with_args("HEAD", index=True, working_tree=True)
.once()
.mock(),
git=flexmock(clear_cache=lambda: None),
)
)
flexmock(Context, retries=2)
flexmock(shutil).should_receive("rmtree").with_args("")
flexmock(Task).should_receive("retry").never()
flexmock(Pushgateway).should_receive("push").times(2).and_return()
url = get_propose_downstream_info_url(model.id)
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Starting propose downstream...",
state=BaseCommitStatus.running,
url=url,
).once()
flexmock(ProposeDownstreamJobHelper).should_receive(
"report_status_to_branch"
).with_args(
branch="main",
description="Propose downstream failed: Failed to download file from URL example.com",
state=BaseCommitStatus.failure,
url=url,
).once()
processing_results = SteveJobs().process_message(github_release_webhook)
event_dict, job, job_config, package_config = get_parameters_from_results(
processing_results
)
assert json.dumps(event_dict)
results = run_propose_downstream_handler(event_dict, package_config, job_config)
assert not first_dict_value(results["job"])["success"]
| 38.528646
| 94
| 0.686786
| 3,280
| 29,590
| 5.890244
| 0.078659
| 0.080745
| 0.041925
| 0.048913
| 0.856315
| 0.848033
| 0.838302
| 0.831418
| 0.827381
| 0.827122
| 0
| 0.004697
| 0.201318
| 29,590
| 767
| 95
| 38.578879
| 0.812804
| 0.008111
| 0
| 0.77566
| 0
| 0
| 0.143904
| 0.017656
| 0
| 0
| 0
| 0
| 0.019062
| 1
| 0.01173
| false
| 0
| 0.039589
| 0.001466
| 0.052786
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
755ecb6c7d6d051cac38bd6c451e25fba2e55e68
| 2,508
|
py
|
Python
|
getTopics.py
|
mitliagkas/pyliakmon
|
28a22be63646faf39f0f96a779a4579f69bfb41a
|
[
"MIT"
] | 3
|
2016-05-27T13:46:53.000Z
|
2017-04-16T22:43:42.000Z
|
getTopics.py
|
mitliagkas/pyliakmon
|
28a22be63646faf39f0f96a779a4579f69bfb41a
|
[
"MIT"
] | null | null | null |
getTopics.py
|
mitliagkas/pyliakmon
|
28a22be63646faf39f0f96a779a4579f69bfb41a
|
[
"MIT"
] | null | null | null |
import numpy as np
import json
with open('db/cpt.json', 'rb') as outfile:
procHier = json.load(outfile)
outfile.close()
with open('db/icd.json', 'rb') as outfile:
icdHier = json.load(outfile)
outfile.close()
icdMap=dict([(icdHier[x]['level2'],{'desc':icdHier[x]['desc'],'code':x}) for x in icdHier.keys()])
procMap=dict([(procHier[x]['level2'],{'desc':procHier[x]['desc'],'code':x}) for x in procHier.keys()])
pcs=np.loadtxt('results/cmsQOrder2.txt')
p,k=pcs.shape
# Get the
l=5
print
print
for c in range(k):
print
print "[Component", c+1, "]"
comp=pcs[:,c]
#comp=pcs[:,c]
#ind=abs(comp).argsort()[-l:]
if c>0:
print "Positive Pole"
ind=comp.argsort()[-l:]
ind=ind.tolist()
ind.reverse()
for id,magnitude in [(x,comp[x]) for x in ind]:
if id < 132:
# ICD
print " ICD9", icdMap[id]['desc'].ljust(70), magnitude
else:
# Procedure
id-=132
print " Proc", procMap[id]['desc'].ljust(70), magnitude
if c>0:
print "Negative Pole"
ind=comp.argsort()[:l]
ind=ind.tolist()
for id,magnitude in [(x,comp[x]) for x in ind]:
if id < 132:
# ICD
print " ICD9", icdMap[id]['desc'].ljust(70), magnitude
else:
# Procedure
id-=132
print " Proc", procMap[id]['desc'].ljust(70), magnitude
pcs=np.loadtxt('results/cmsCompOrder3.txt')
pcs=np.loadtxt('results/cmsQOrder2.txt')
p,k=pcs.shape
l=5
print
print
for c in range(k):
print
print "[Component", c+1, "]"
comp=pcs[:,c]
#comp=pcs[:,c]
#ind=abs(comp).argsort()[-l:]
if c>0:
print "Positive Pole"
ind=comp.argsort()[-l:]
ind=ind.tolist()
ind.reverse()
for id,magnitude in [(x,comp[x]) for x in ind]:
if id < 132:
# ICD
print " ICD9", icdMap[id]['desc'].ljust(70), magnitude
else:
# Procedure
id-=132
print " Proc", procMap[id]['desc'].ljust(70), magnitude
if c>0:
print "Negative Pole"
ind=comp.argsort()[:l]
ind=ind.tolist()
for id,magnitude in [(x,comp[x]) for x in ind]:
if id < 132:
# ICD
print " ICD9", icdMap[id]['desc'].ljust(70), magnitude
else:
# Procedure
id-=132
print " Proc", procMap[id]['desc'].ljust(70), magnitude
| 22.594595
| 102
| 0.52193
| 340
| 2,508
| 3.85
| 0.188235
| 0.030558
| 0.067227
| 0.07945
| 0.822002
| 0.780749
| 0.780749
| 0.756303
| 0.756303
| 0.756303
| 0
| 0.032683
| 0.304625
| 2,508
| 110
| 103
| 22.8
| 0.71789
| 0.057815
| 0
| 0.873239
| 0
| 0
| 0.121639
| 0.029449
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.028169
| null | null | 0.28169
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
f34b83fcb8fdbabb9337bc3f8ad55dd9f9deee20
| 10,251
|
py
|
Python
|
sdk/test/test_file.py
|
DarrahK/yapily-sdk-python
|
2dcf9a403feafab7dcaf140dabe61794bd4debd3
|
[
"MIT"
] | null | null | null |
sdk/test/test_file.py
|
DarrahK/yapily-sdk-python
|
2dcf9a403feafab7dcaf140dabe61794bd4debd3
|
[
"MIT"
] | null | null | null |
sdk/test/test_file.py
|
DarrahK/yapily-sdk-python
|
2dcf9a403feafab7dcaf140dabe61794bd4debd3
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
The version of the OpenAPI document: 1.157.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import yapily
from yapily.models.file import File # noqa: E501
from yapily.rest import ApiException
class TestFile(unittest.TestCase):
"""File unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional):
"""Test File
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
# model = yapily.models.file.File() # noqa: E501
if include_optional :
return File(
absolute = True,
absolute_file = yapily.models.file.File(
absolute = True,
absolute_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56, ),
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56, ),
absolute_path = '0',
canonical_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56, ),
absolute_path = '0',
canonical_file = yapily.models.file.File(
absolute = True,
absolute_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56, ),
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56, ),
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
parent_file = yapily.models.file.File(
absolute = True,
absolute_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
absolute_path = '0',
canonical_file = yapily.models.file.File(
absolute = True,
absolute_path = '0',
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
canonical_path = '0',
directory = True,
file = True,
free_space = 56,
hidden = True,
name = '0',
parent = '0',
path = '0',
total_space = 56,
usable_space = 56, ),
path = '0',
total_space = 56,
usable_space = 56
)
else :
return File(
)
def testFile(self):
"""Test File"""
inst_req_only = self.make_instance(include_optional=False)
inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
| 39.579151
| 158
| 0.328456
| 709
| 10,251
| 4.578279
| 0.12976
| 0.073937
| 0.083795
| 0.098583
| 0.772335
| 0.753235
| 0.753235
| 0.753235
| 0.753235
| 0.753235
| 0
| 0.046382
| 0.598283
| 10,251
| 258
| 159
| 39.732558
| 0.741865
| 0.049166
| 0
| 0.913043
| 0
| 0
| 0.009101
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017391
| false
| 0.008696
| 0.026087
| 0
| 0.056522
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
f38af5de636a52b060eb6ae2433331f625499995
| 6,807
|
py
|
Python
|
usage.py
|
mjclawar/sd-range-slider
|
9c6f28d58c0d136826b8c91644b3759948a67af0
|
[
"MIT"
] | 2
|
2018-11-22T08:14:17.000Z
|
2020-10-21T22:34:19.000Z
|
usage.py
|
mjclawar/sd-range-slider
|
9c6f28d58c0d136826b8c91644b3759948a67af0
|
[
"MIT"
] | 6
|
2017-12-04T14:47:19.000Z
|
2019-07-12T14:56:49.000Z
|
usage.py
|
mjclawar/sd-range-slider
|
9c6f28d58c0d136826b8c91644b3759948a67af0
|
[
"MIT"
] | 1
|
2020-10-21T22:34:30.000Z
|
2020-10-21T22:34:30.000Z
|
import sd_range_slider
import dash
import dash_html_components as html
app = dash.Dash('')
app.scripts.config.serve_locally = True
app.layout = html.Div([
# Test normal use case
html.Div(
sd_range_slider.SDRangeSlider(
id='input',
value=[1, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(1, 'Under 25'),
(2, '25 to 34'),
(3, '35 to 44'),
(4, '45+')]},
minVal=1,
maxVal=4,
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False)
),
html.Div(id='output'),
# Test categorical use case
html.Div(
sd_range_slider.SDRangeSlider(
id='input-categorical',
isCategorical=True,
value=[1, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(1, 'Under 25'),
(2, '25 to 34'),
(3, '35 to 44'),
(4, '45+')]},
minVal=1,
maxVal=4,
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
noValuesText='Any age',
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False,
)
),
html.Div(id='output-categorical'),
# Test restricted lower range
html.Div(
sd_range_slider.SDRangeSlider(
id='input-restricted-lower',
value=[2, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(2, '25 to 34'),
(3, '35 to 44'),
(4, '45+')]},
minVal=2,
maxVal=4,
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
restrictedLower=True,
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False)
),
html.Div(id='output-restricted-lower'),
# Test restricted higher range
html.Div(
sd_range_slider.SDRangeSlider(
id='input-restricted-higher',
value=[1, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(1, 'Under 25'),
(2, '25 to 34'),
(3, '35 to 44')]},
minVal=1,
maxVal=3,
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
restrictedHigher=True,
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False)
),
html.Div(id='output-restricted-higher'),
# Test restricted lower and higher
html.Div(
sd_range_slider.SDRangeSlider(
id='input-restricted-all',
value=[2, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(2, '25 to 34'),
(3, '35 to 44'),
(4, '45 to 49'),
(5, '50 to 54')]},
minVal=2,
maxVal=5,
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
restrictedHigher=True,
restrictedLower=True,
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False)
),
html.Div(id='output-restricted-all'),
# Test update on close
html.Div(
sd_range_slider.SDRangeSlider(
id='input-update-on-close',
value=[2, 3],
marks={val: {'label': label, 'style': {'font-size': '80%'}}
for val, label in [
(2, '25 to 34'),
(3, '35 to 44'),
(4, '45 to 49'),
(5, '50 to 54')]},
minVal=2,
maxVal=5,
updatemode='modalClose',
orHigherFormatter='{} or older',
orLowerFormatter='Under {} years old',
rangeFormatter='{} to {} years old',
allValuesText='All ages',
restrictedHigher=True,
restrictedLower=True,
humanName='Age cohort',
description='Test description magic',
singleValueFormatting=False)
),
html.Div(id='output-update-on-close'),
], style=dict(width=250))
@app.callback(
dash.dependencies.Output('output', 'children'),
[dash.dependencies.Input('input', 'value')])
def display_output(value):
return 'You have entered {}'.format(value)
@app.callback(
dash.dependencies.Output('output-categorical', 'children'),
[dash.dependencies.Input('input-categorical', 'value')])
def display_output(value):
return 'You have entered {}'.format(value)
@app.callback(
dash.dependencies.Output('output-restricted-lower', 'children'),
[dash.dependencies.Input('input-restricted-lower', 'value')])
def display_output(value):
return 'Restricted lower - You have entered {}'.format(value)
@app.callback(
dash.dependencies.Output('output-restricted-higher', 'children'),
[dash.dependencies.Input('input-restricted-higher', 'value')])
def display_output(value):
return 'Restricted higher - You have entered {}'.format(value)
@app.callback(
dash.dependencies.Output('output-restricted-all', 'children'),
[dash.dependencies.Input('input-restricted-all', 'value')])
def display_output(value):
return 'Restricted lower and higher - You have entered {}'.format(value)
@app.callback(
dash.dependencies.Output('output-update-on-close', 'children'),
[dash.dependencies.Input('input-update-on-close', 'value')])
def display_output(value):
return 'Update on close - You have entered {}'.format(value)
if __name__ == '__main__':
app.run_server(debug=True)
| 33.367647
| 76
| 0.518878
| 667
| 6,807
| 5.247376
| 0.152924
| 0.026
| 0.026
| 0.024
| 0.860857
| 0.817143
| 0.759143
| 0.747143
| 0.708857
| 0.694571
| 0
| 0.030505
| 0.340238
| 6,807
| 203
| 77
| 33.53202
| 0.748831
| 0.023064
| 0
| 0.745665
| 0
| 0
| 0.235285
| 0.046967
| 0
| 0
| 0
| 0
| 0
| 1
| 0.034682
| false
| 0
| 0.017341
| 0.034682
| 0.086705
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
f397973bbb1b799cc1f2701ba16339d4cc538c41
| 58,228
|
py
|
Python
|
nova/tests/unit/test_hacking.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | null | null | null |
nova/tests/unit/test_hacking.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | null | null | null |
nova/tests/unit/test_hacking.py
|
bopopescu/nova-token
|
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
|
[
"Apache-2.0"
] | 2
|
2017-07-20T17:31:34.000Z
|
2020-07-24T02:42:19.000Z
|
begin_unit
comment|'# Copyright 2014 Red Hat, Inc.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'# a copy of the License at'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# http://www.apache.org/licenses/LICENSE-2.0'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Unless required by applicable law or agreed to in writing, software'
nl|'\n'
comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT'
nl|'\n'
comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the'
nl|'\n'
comment|'# License for the specific language governing permissions and limitations'
nl|'\n'
comment|'# under the License.'
nl|'\n'
nl|'\n'
name|'import'
name|'textwrap'
newline|'\n'
nl|'\n'
name|'import'
name|'mock'
newline|'\n'
name|'import'
name|'pep8'
newline|'\n'
nl|'\n'
name|'from'
name|'nova'
op|'.'
name|'hacking'
name|'import'
name|'checks'
newline|'\n'
name|'from'
name|'nova'
name|'import'
name|'test'
newline|'\n'
nl|'\n'
nl|'\n'
DECL|class|HackingTestCase
name|'class'
name|'HackingTestCase'
op|'('
name|'test'
op|'.'
name|'NoDBTestCase'
op|')'
op|':'
newline|'\n'
indent|' '
string|'"""This class tests the hacking checks in nova.hacking.checks by passing\n strings to the check methods like the pep8/flake8 parser would. The parser\n loops over each line in the file and then passes the parameters to the\n check method. The parameter names in the check method dictate what type of\n object is passed to the check method. The parameter types are::\n\n logical_line: A processed line with the following modifications:\n - Multi-line statements converted to a single line.\n - Stripped left and right.\n - Contents of strings replaced with "xxx" of same length.\n - Comments removed.\n physical_line: Raw line of text from the input file.\n lines: a list of the raw lines from the input file\n tokens: the tokens that contribute to this logical line\n line_number: line number in the input file\n total_lines: number of lines in the input file\n blank_lines: blank lines before this one\n indent_char: indentation character in this file (" " or "\\t")\n indent_level: indentation (with tabs expanded to multiples of 8)\n previous_indent_level: indentation on previous line\n previous_logical: previous logical line\n filename: Path of the file being run through pep8\n\n When running a test on a check method the return will be False/None if\n there is no violation in the sample input. If there is an error a tuple is\n returned with a position in the line, and a message. So to check the result\n just assertTrue if the check is expected to fail and assertFalse if it\n should pass.\n """'
newline|'\n'
DECL|member|test_virt_driver_imports
name|'def'
name|'test_virt_driver_imports'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
nl|'\n'
indent|' '
name|'expect'
op|'='
op|'('
number|'0'
op|','
string|'"N311: importing code from other virt drivers forbidden"'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'expect'
op|','
name|'checks'
op|'.'
name|'import_no_virt_driver_import_deps'
op|'('
nl|'\n'
string|'"from nova.virt.libvirt import utils as libvirt_utils"'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'expect'
op|','
name|'checks'
op|'.'
name|'import_no_virt_driver_import_deps'
op|'('
nl|'\n'
string|'"import nova.virt.libvirt.utils as libvirt_utils"'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'import_no_virt_driver_import_deps'
op|'('
nl|'\n'
string|'"from nova.virt.libvirt import utils as libvirt_utils"'
op|','
nl|'\n'
string|'"./nova/virt/libvirt/driver.py"'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'import_no_virt_driver_import_deps'
op|'('
nl|'\n'
string|'"import nova.virt.firewall"'
op|','
nl|'\n'
string|'"./nova/virt/libvirt/firewall.py"'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_virt_driver_config_vars
dedent|''
name|'def'
name|'test_virt_driver_config_vars'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertIsInstance'
op|'('
name|'checks'
op|'.'
name|'import_no_virt_driver_config_deps'
op|'('
nl|'\n'
string|'"CONF.import_opt(\'volume_drivers\', "'
nl|'\n'
string|'"\'nova.virt.libvirt.driver\', group=\'libvirt\')"'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|','
name|'tuple'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'import_no_virt_driver_config_deps'
op|'('
nl|'\n'
string|'"CONF.import_opt(\'volume_drivers\', "'
nl|'\n'
string|'"\'nova.virt.libvirt.driver\', group=\'libvirt\')"'
op|','
nl|'\n'
string|'"./nova/virt/libvirt/volume.py"'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_no_vi_headers
dedent|''
name|'def'
name|'test_no_vi_headers'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
nl|'\n'
indent|' '
name|'lines'
op|'='
op|'['
string|"'Line 1\\n'"
op|','
string|"'Line 2\\n'"
op|','
string|"'Line 3\\n'"
op|','
string|"'Line 4\\n'"
op|','
string|"'Line 5\\n'"
op|','
nl|'\n'
string|"'Line 6\\n'"
op|','
string|"'Line 7\\n'"
op|','
string|"'Line 8\\n'"
op|','
string|"'Line 9\\n'"
op|','
string|"'Line 10\\n'"
op|','
nl|'\n'
string|"'Line 11\\n'"
op|','
string|"'Line 12\\n'"
op|','
string|"'Line 13\\n'"
op|','
string|"'Line14\\n'"
op|','
string|"'Line15\\n'"
op|']'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"Test string foo"'
op|','
number|'1'
op|','
name|'lines'
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"# vim: et tabstop=4 shiftwidth=4 softtabstop=4"'
op|','
nl|'\n'
number|'2'
op|','
name|'lines'
op|')'
op|')'
op|')'
op|','
number|'2'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"# vim: et tabstop=4 shiftwidth=4 softtabstop=4"'
op|','
nl|'\n'
number|'6'
op|','
name|'lines'
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"# vim: et tabstop=4 shiftwidth=4 softtabstop=4"'
op|','
nl|'\n'
number|'9'
op|','
name|'lines'
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"# vim: et tabstop=4 shiftwidth=4 softtabstop=4"'
op|','
nl|'\n'
number|'14'
op|','
name|'lines'
op|')'
op|')'
op|')'
op|','
number|'2'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertIsNone'
op|'('
name|'checks'
op|'.'
name|'no_vi_headers'
op|'('
nl|'\n'
string|'"Test end string for vi"'
op|','
nl|'\n'
number|'15'
op|','
name|'lines'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_assert_true_instance
dedent|''
name|'def'
name|'test_assert_true_instance'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_instance'
op|'('
nl|'\n'
string|'"self.assertTrue(isinstance(e, "'
nl|'\n'
string|'"exception.BuildAbortException))"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_instance'
op|'('
string|'"self.assertTrue()"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_assert_equal_type
dedent|''
name|'def'
name|'test_assert_equal_type'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_type'
op|'('
nl|'\n'
string|'"self.assertEqual(type(als[\'QuicAssist\']), list)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_type'
op|'('
string|'"self.assertTrue()"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_assert_equal_in
dedent|''
name|'def'
name|'test_assert_equal_in'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(a in b, True)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(\'str\' in \'string\', True)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(any(a==1 for a in b), True)"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(True, a in b)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(True, \'str\' in \'string\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(True, any(a==1 for a in b))"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(a in b, False)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(\'str\' in \'string\', False)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(any(a==1 for a in b), False)"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(False, a in b)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(False, \'str\' in \'string\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_in'
op|'('
nl|'\n'
string|'"self.assertEqual(False, any(a==1 for a in b))"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_assert_equal_none
dedent|''
name|'def'
name|'test_assert_equal_none'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_none'
op|'('
nl|'\n'
string|'"self.assertEqual(A, None)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_none'
op|'('
nl|'\n'
string|'"self.assertEqual(None, A)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_none'
op|'('
string|'"self.assertIsNone()"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_assert_true_or_false_with_in_or_not_in
dedent|''
name|'def'
name|'test_assert_true_or_false_with_in_or_not_in'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_equal_none'
op|'('
nl|'\n'
string|'"self.assertEqual(A, None)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in B)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertFalse(A in B)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A not in B)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertFalse(A not in B)"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in B, \'some message\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertFalse(A in B, \'some message\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A not in B, \'some message\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertFalse(A not in B, \'some message\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in \'some string with spaces\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in \'some string with spaces\')"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in [\'1\', \'2\', \'3\'])"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(A in [1, 2, 3])"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(any(A > 5 for A in B))"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertTrue(any(A > 5 for A in B), \'some message\')"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'assert_true_or_false_with_in'
op|'('
nl|'\n'
string|'"self.assertFalse(some in list1 and some2 in list2)"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_no_translate_debug_logs
dedent|''
name|'def'
name|'test_no_translate_debug_logs'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_translate_debug_logs'
op|'('
nl|'\n'
string|'"LOG.debug(_(\'foo\'))"'
op|','
string|'"nova/scheduler/foo.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_translate_debug_logs'
op|'('
nl|'\n'
string|'"LOG.debug(\'foo\')"'
op|','
string|'"nova/scheduler/foo.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_translate_debug_logs'
op|'('
nl|'\n'
string|'"LOG.info(_(\'foo\'))"'
op|','
string|'"nova/scheduler/foo.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_no_setting_conf_directly_in_tests
dedent|''
name|'def'
name|'test_no_setting_conf_directly_in_tests'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.option = 1"'
op|','
string|'"nova/tests/test_foo.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.group.option = 1"'
op|','
string|'"nova/tests/test_foo.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.option = foo = 1"'
op|','
string|'"nova/tests/test_foo.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
nl|'\n'
comment|"# Shouldn't fail with comparisons"
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.option == \'foo\'"'
op|','
string|'"nova/tests/test_foo.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.option != 1"'
op|','
string|'"nova/tests/test_foo.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
comment|"# Shouldn't fail since not in nova/tests/"
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_setting_conf_directly_in_tests'
op|'('
nl|'\n'
string|'"CONF.option = 1"'
op|','
string|'"nova/compute/foo.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_log_translations
dedent|''
name|'def'
name|'test_log_translations'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'logs'
op|'='
op|'['
string|"'audit'"
op|','
string|"'error'"
op|','
string|"'info'"
op|','
string|"'warning'"
op|','
string|"'critical'"
op|','
string|"'warn'"
op|','
nl|'\n'
string|"'exception'"
op|']'
newline|'\n'
name|'levels'
op|'='
op|'['
string|"'_LI'"
op|','
string|"'_LW'"
op|','
string|"'_LE'"
op|','
string|"'_LC'"
op|']'
newline|'\n'
name|'debug'
op|'='
string|'"LOG.debug(\'OK\')"'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
nl|'\n'
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'validate_log_translations'
op|'('
name|'debug'
op|','
name|'debug'
op|','
string|"'f'"
op|')'
op|')'
op|')'
op|')'
newline|'\n'
name|'for'
name|'log'
name|'in'
name|'logs'
op|':'
newline|'\n'
indent|' '
name|'bad'
op|'='
string|'\'LOG.%s("Bad")\''
op|'%'
name|'log'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
nl|'\n'
name|'checks'
op|'.'
name|'validate_log_translations'
op|'('
name|'bad'
op|','
name|'bad'
op|','
string|"'f'"
op|')'
op|')'
op|')'
op|')'
newline|'\n'
name|'ok'
op|'='
string|'"LOG.%s(\'OK\') # noqa"'
op|'%'
name|'log'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
nl|'\n'
name|'checks'
op|'.'
name|'validate_log_translations'
op|'('
name|'ok'
op|','
name|'ok'
op|','
string|"'f'"
op|')'
op|')'
op|')'
op|')'
newline|'\n'
name|'ok'
op|'='
string|'"LOG.%s(variable)"'
op|'%'
name|'log'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
nl|'\n'
name|'checks'
op|'.'
name|'validate_log_translations'
op|'('
name|'ok'
op|','
name|'ok'
op|','
string|"'f'"
op|')'
op|')'
op|')'
op|')'
newline|'\n'
name|'for'
name|'level'
name|'in'
name|'levels'
op|':'
newline|'\n'
indent|' '
name|'ok'
op|'='
string|'"LOG.%s(%s(\'OK\'))"'
op|'%'
op|'('
name|'log'
op|','
name|'level'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
nl|'\n'
name|'checks'
op|'.'
name|'validate_log_translations'
op|'('
name|'ok'
op|','
name|'ok'
op|','
string|"'f'"
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_no_mutable_default_args
dedent|''
dedent|''
dedent|''
name|'def'
name|'test_no_mutable_default_args'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_mutable_default_args'
op|'('
nl|'\n'
string|'"def get_info_from_bdm(virt_type, bdm, mapping=[])"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_mutable_default_args'
op|'('
nl|'\n'
string|'"defined = []"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'no_mutable_default_args'
op|'('
nl|'\n'
string|'"defined, undefined = [], {}"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_explicit_underscore_import
dedent|''
name|'def'
name|'test_check_explicit_underscore_import'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"LOG.info(_(\'My info message\'))"'
op|','
nl|'\n'
string|'"cinder/tests/other_files.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"msg = _(\'My message\')"'
op|','
nl|'\n'
string|'"cinder/tests/other_files.py"'
op|')'
op|')'
op|')'
op|','
number|'1'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"from cinder.i18n import _"'
op|','
nl|'\n'
string|'"cinder/tests/other_files.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"LOG.info(_(\'My info message\'))"'
op|','
nl|'\n'
string|'"cinder/tests/other_files.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"msg = _(\'My message\')"'
op|','
nl|'\n'
string|'"cinder/tests/other_files.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"from cinder.i18n import _, _LW"'
op|','
nl|'\n'
string|'"cinder/tests/other_files2.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"msg = _(\'My message\')"'
op|','
nl|'\n'
string|'"cinder/tests/other_files2.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"_ = translations.ugettext"'
op|','
nl|'\n'
string|'"cinder/tests/other_files3.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_explicit_underscore_import'
op|'('
nl|'\n'
string|'"msg = _(\'My message\')"'
op|','
nl|'\n'
string|'"cinder/tests/other_files3.py"'
op|')'
op|')'
op|')'
op|','
number|'0'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_use_jsonutils
dedent|''
name|'def'
name|'test_use_jsonutils'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
DECL|function|__get_msg
indent|' '
name|'def'
name|'__get_msg'
op|'('
name|'fun'
op|')'
op|':'
newline|'\n'
indent|' '
name|'msg'
op|'='
op|'('
string|'"N324: jsonutils.%(fun)s must be used instead of "'
nl|'\n'
string|'"json.%(fun)s"'
op|'%'
op|'{'
string|"'fun'"
op|':'
name|'fun'
op|'}'
op|')'
newline|'\n'
name|'return'
op|'['
op|'('
number|'0'
op|','
name|'msg'
op|')'
op|']'
newline|'\n'
nl|'\n'
dedent|''
name|'for'
name|'method'
name|'in'
op|'('
string|"'dump'"
op|','
string|"'dumps'"
op|','
string|"'load'"
op|','
string|"'loads'"
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
nl|'\n'
name|'__get_msg'
op|'('
name|'method'
op|')'
op|','
nl|'\n'
name|'list'
op|'('
name|'checks'
op|'.'
name|'use_jsonutils'
op|'('
string|'"json.%s("'
op|'%'
name|'method'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'use_jsonutils'
op|'('
string|'"json.%s("'
op|'%'
name|'method'
op|','
nl|'\n'
string|'"./plugins/xenserver/script.py"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'use_jsonutils'
op|'('
string|'"jsonx.%s("'
op|'%'
name|'method'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
dedent|''
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
nl|'\n'
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'use_jsonutils'
op|'('
string|'"json.dumb"'
op|','
nl|'\n'
string|'"./nova/virt/xenapi/driver.py"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
comment|'# We are patching pep8 so that only the check under test is actually'
nl|'\n'
comment|'# installed.'
nl|'\n'
dedent|''
op|'@'
name|'mock'
op|'.'
name|'patch'
op|'('
string|"'pep8._checks'"
op|','
nl|'\n'
op|'{'
string|"'physical_line'"
op|':'
op|'{'
op|'}'
op|','
string|"'logical_line'"
op|':'
op|'{'
op|'}'
op|','
string|"'tree'"
op|':'
op|'{'
op|'}'
op|'}'
op|')'
newline|'\n'
DECL|member|_run_check
name|'def'
name|'_run_check'
op|'('
name|'self'
op|','
name|'code'
op|','
name|'checker'
op|','
name|'filename'
op|'='
name|'None'
op|')'
op|':'
newline|'\n'
indent|' '
name|'pep8'
op|'.'
name|'register_check'
op|'('
name|'checker'
op|')'
newline|'\n'
nl|'\n'
name|'lines'
op|'='
name|'textwrap'
op|'.'
name|'dedent'
op|'('
name|'code'
op|')'
op|'.'
name|'strip'
op|'('
op|')'
op|'.'
name|'splitlines'
op|'('
name|'True'
op|')'
newline|'\n'
nl|'\n'
name|'checker'
op|'='
name|'pep8'
op|'.'
name|'Checker'
op|'('
name|'filename'
op|'='
name|'filename'
op|','
name|'lines'
op|'='
name|'lines'
op|')'
newline|'\n'
name|'checker'
op|'.'
name|'check_all'
op|'('
op|')'
newline|'\n'
name|'checker'
op|'.'
name|'report'
op|'.'
name|'_deferred_print'
op|'.'
name|'sort'
op|'('
op|')'
newline|'\n'
name|'return'
name|'checker'
op|'.'
name|'report'
op|'.'
name|'_deferred_print'
newline|'\n'
nl|'\n'
DECL|member|_assert_has_errors
dedent|''
name|'def'
name|'_assert_has_errors'
op|'('
name|'self'
op|','
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'None'
op|','
nl|'\n'
name|'filename'
op|'='
name|'None'
op|')'
op|':'
newline|'\n'
indent|' '
name|'actual_errors'
op|'='
op|'['
name|'e'
op|'['
op|':'
number|'3'
op|']'
name|'for'
name|'e'
name|'in'
nl|'\n'
name|'self'
op|'.'
name|'_run_check'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'filename'
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
name|'expected_errors'
name|'or'
op|'['
op|']'
op|','
name|'actual_errors'
op|')'
newline|'\n'
nl|'\n'
DECL|member|_assert_has_no_errors
dedent|''
name|'def'
name|'_assert_has_no_errors'
op|'('
name|'self'
op|','
name|'code'
op|','
name|'checker'
op|','
name|'filename'
op|'='
name|'None'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_str_unicode_exception
dedent|''
name|'def'
name|'test_str_unicode_exception'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
nl|'\n'
indent|' '
name|'checker'
op|'='
name|'checks'
op|'.'
name|'CheckForStrUnicodeExc'
newline|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n try:\n p = str(a) + str(b)\n except ValueError as e:\n p = str(e)\n return p\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'5'
op|','
number|'16'
op|','
string|"'N325'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n try:\n p = unicode(a) + str(b)\n except ValueError as e:\n p = e\n return p\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checker'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n try:\n p = str(a) + str(b)\n except ValueError as e:\n p = unicode(e)\n return p\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'5'
op|','
number|'20'
op|','
string|"'N325'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n try:\n p = str(a) + str(b)\n except ValueError as e:\n try:\n p = unicode(a) + unicode(b)\n except ValueError as ve:\n p = str(e) + str(ve)\n p = e\n return p\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'8'
op|','
number|'20'
op|','
string|"'N325'"
op|')'
op|','
op|'('
number|'8'
op|','
number|'29'
op|','
string|"'N325'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n try:\n p = str(a) + str(b)\n except ValueError as e:\n try:\n p = unicode(a) + unicode(b)\n except ValueError as ve:\n p = str(e) + unicode(ve)\n p = str(e)\n return p\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'8'
op|','
number|'20'
op|','
string|"'N325'"
op|')'
op|','
op|'('
number|'8'
op|','
number|'33'
op|','
string|"'N325'"
op|')'
op|','
op|'('
number|'9'
op|','
number|'16'
op|','
string|"'N325'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_api_version_decorator_check
dedent|''
name|'def'
name|'test_api_version_decorator_check'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n @some_other_decorator\n @wsgi.api_version("2.5")\n def my_method():\n pass\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_api_version_decorator'
op|','
nl|'\n'
name|'expected_errors'
op|'='
op|'['
op|'('
number|'2'
op|','
number|'0'
op|','
string|'"N332"'
op|')'
op|']'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_oslo_assert_raises_regexp
dedent|''
name|'def'
name|'test_oslo_assert_raises_regexp'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n self.assertRaisesRegexp(ValueError,\n "invalid literal for.*XYZ\'$",\n int,\n \'XYZ\')\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'assert_raises_regexp'
op|','
nl|'\n'
name|'expected_errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|'"N335"'
op|')'
op|']'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_api_version_decorator_check_no_errors
dedent|''
name|'def'
name|'test_api_version_decorator_check_no_errors'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n class ControllerClass():\n @wsgi.api_version("2.5")\n def my_method():\n pass\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_api_version_decorator'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_trans_add
dedent|''
name|'def'
name|'test_trans_add'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
nl|'\n'
indent|' '
name|'checker'
op|'='
name|'checks'
op|'.'
name|'CheckForTransAdd'
newline|'\n'
name|'code'
op|'='
string|'"""\n def fake_tran(msg):\n return msg\n\n\n _ = fake_tran\n _LI = _\n _LW = _\n _LE = _\n _LC = _\n\n\n def f(a, b):\n msg = _(\'test\') + \'add me\'\n msg = _LI(\'test\') + \'add me\'\n msg = _LW(\'test\') + \'add me\'\n msg = _LE(\'test\') + \'add me\'\n msg = _LC(\'test\') + \'add me\'\n msg = \'add to me\' + _(\'test\')\n return msg\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'13'
op|','
number|'10'
op|','
string|"'N326'"
op|')'
op|','
op|'('
number|'14'
op|','
number|'10'
op|','
string|"'N326'"
op|')'
op|','
op|'('
number|'15'
op|','
number|'10'
op|','
string|"'N326'"
op|')'
op|','
nl|'\n'
op|'('
number|'16'
op|','
number|'10'
op|','
string|"'N326'"
op|')'
op|','
op|'('
number|'17'
op|','
number|'10'
op|','
string|"'N326'"
op|')'
op|','
op|'('
number|'18'
op|','
number|'24'
op|','
string|"'N326'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def f(a, b):\n msg = \'test\' + \'add me\'\n return msg\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checker'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_dict_constructor_with_list_copy
dedent|''
name|'def'
name|'test_dict_constructor_with_list_copy'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" dict([(i, connect_info[i])"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" attrs = dict([(k, _from_json(v))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" type_names = dict((value, key) for key, value in"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" dict((value, key) for key, value in"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'"foo(param=dict((k, v) for k, v in bar.items()))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" dict([[i,i] for i in range(3)])"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" dd = dict([i,i] for i in range(3))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" create_kwargs = dict(snapshot=snapshot,"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'dict_constructor_with_list_copy'
op|'('
nl|'\n'
string|'" self._render_dict(xml, data_el, data.__dict__)"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_http_not_implemented
dedent|''
name|'def'
name|'test_check_http_not_implemented'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n except NotImplementedError:\n common.raise_http_not_implemented_error()\n """'
newline|'\n'
name|'filename'
op|'='
string|'"nova/api/openstack/compute/v21/test.py"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_http_not_implemented'
op|','
nl|'\n'
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n except NotImplementedError:\n msg = _("Unable to set password on instance")\n raise exc.HTTPNotImplemented(explanation=msg)\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'3'
op|','
number|'4'
op|','
string|"'N339'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_http_not_implemented'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|','
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
nl|'\n'
name|'filename'
op|'='
string|'"nova/api/openstack/compute/legacy_v2/test.py"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_http_not_implemented'
op|','
nl|'\n'
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_contextlib_use
dedent|''
name|'def'
name|'test_check_contextlib_use'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n with test.nested(\n mock.patch.object(network_model.NetworkInfo, \'hydrate\'),\n mock.patch.object(objects.InstanceInfoCache, \'save\'),\n ) as (\n hydrate_mock, save_mock\n )\n """'
newline|'\n'
name|'filename'
op|'='
string|'"nova/api/openstack/compute/v21/test.py"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_no_contextlib_nested'
op|','
nl|'\n'
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
name|'code'
op|'='
string|'"""\n with contextlib.nested(\n mock.patch.object(network_model.NetworkInfo, \'hydrate\'),\n mock.patch.object(objects.InstanceInfoCache, \'save\'),\n ) as (\n hydrate_mock, save_mock\n )\n """'
newline|'\n'
name|'filename'
op|'='
string|'"nova/api/openstack/compute/legacy_v2/test.py"'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|"'N341'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_no_contextlib_nested'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|','
name|'filename'
op|'='
name|'filename'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_greenthread_spawns
dedent|''
name|'def'
name|'test_check_greenthread_spawns'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|'"N340"'
op|')'
op|']'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"greenthread.spawn(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"greenthread.spawn_n(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"eventlet.greenthread.spawn(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"eventlet.spawn(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"eventlet.spawn_n(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"nova.utils.spawn(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"nova.utils.spawn_n(func, arg1, kwarg1=kwarg1)"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_greenthread_spawns'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_config_option_regex_match
dedent|''
name|'def'
name|'test_config_option_regex_match'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
DECL|function|should_match
indent|' '
name|'def'
name|'should_match'
op|'('
name|'code'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertTrue'
op|'('
name|'checks'
op|'.'
name|'cfg_opt_re'
op|'.'
name|'match'
op|'('
name|'code'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|function|should_not_match
dedent|''
name|'def'
name|'should_not_match'
op|'('
name|'code'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertFalse'
op|'('
name|'checks'
op|'.'
name|'cfg_opt_re'
op|'.'
name|'match'
op|'('
name|'code'
op|')'
op|')'
newline|'\n'
nl|'\n'
dedent|''
name|'should_match'
op|'('
string|'"opt = cfg.StrOpt(\'opt_name\')"'
op|')'
newline|'\n'
name|'should_match'
op|'('
string|'"opt = cfg.IntOpt(\'opt_name\')"'
op|')'
newline|'\n'
name|'should_match'
op|'('
string|'"opt = cfg.DictOpt(\'opt_name\')"'
op|')'
newline|'\n'
name|'should_match'
op|'('
string|'"opt = cfg.Opt(\'opt_name\')"'
op|')'
newline|'\n'
name|'should_match'
op|'('
string|'"opts=[cfg.Opt(\'opt_name\')]"'
op|')'
newline|'\n'
name|'should_match'
op|'('
string|'" cfg.Opt(\'opt_name\')"'
op|')'
newline|'\n'
name|'should_not_match'
op|'('
string|'"opt_group = cfg.OptGroup(\'opt_group_name\')"'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_config_option_in_central_place
dedent|''
name|'def'
name|'test_check_config_option_in_central_place'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|'"N342"'
op|')'
op|']'
newline|'\n'
name|'code'
op|'='
string|'"""\n opts = [\n cfg.StrOpt(\'random_opt\',\n default=\'foo\',\n help=\'I am here to do stuff\'),\n ]\n """'
newline|'\n'
comment|'# option at the right place in the tree'
nl|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
nl|'\n'
name|'checks'
op|'.'
name|'check_config_option_in_central_place'
op|','
nl|'\n'
name|'filename'
op|'='
string|'"nova/conf/serial_console.py"'
op|')'
newline|'\n'
comment|'# option at a location which is not in scope right now'
nl|'\n'
comment|'# TODO(markus_z): This is remporary until all config options are'
nl|'\n'
comment|'# moved to /nova/conf'
nl|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
nl|'\n'
name|'checks'
op|'.'
name|'check_config_option_in_central_place'
op|','
nl|'\n'
name|'filename'
op|'='
string|'"nova/dummy/non_existent.py"'
op|')'
newline|'\n'
comment|'# option at the wrong place in the tree'
nl|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
nl|'\n'
name|'checks'
op|'.'
name|'check_config_option_in_central_place'
op|','
nl|'\n'
name|'filename'
op|'='
string|'"nova/cmd/serialproxy.py"'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_check_doubled_words
dedent|''
name|'def'
name|'test_check_doubled_words'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|'"N343"'
op|')'
op|']'
newline|'\n'
nl|'\n'
comment|'# Artificial break to stop pep8 detecting the test !'
nl|'\n'
name|'code'
op|'='
string|'"This is the"'
op|'+'
string|'" the best comment"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_doubled_words'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"This is the then best comment"'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'check_doubled_words'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_dict_iteritems
dedent|''
name|'def'
name|'test_dict_iteritems'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_iteritems'
op|'('
nl|'\n'
string|'"obj.iteritems()"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_iteritems'
op|'('
nl|'\n'
string|'"six.iteritems(ob))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_dict_iterkeys
dedent|''
name|'def'
name|'test_dict_iterkeys'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_iterkeys'
op|'('
nl|'\n'
string|'"obj.iterkeys()"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_iterkeys'
op|'('
nl|'\n'
string|'"six.iterkeys(ob))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_dict_itervalues
dedent|''
name|'def'
name|'test_dict_itervalues'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'1'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_itervalues'
op|'('
nl|'\n'
string|'"obj.itervalues()"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
name|'self'
op|'.'
name|'assertEqual'
op|'('
number|'0'
op|','
name|'len'
op|'('
name|'list'
op|'('
name|'checks'
op|'.'
name|'check_python3_no_itervalues'
op|'('
nl|'\n'
string|'"six.itervalues(ob))"'
op|')'
op|')'
op|')'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_cfg_help_with_enough_text
dedent|''
name|'def'
name|'test_cfg_help_with_enough_text'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|"'N347'"
op|')'
op|']'
newline|'\n'
nl|'\n'
comment|"# Doesn't have help text at all => should raise error"
nl|'\n'
name|'code1'
op|'='
string|'"""\n opt = cfg.StrOpt("opt1")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code1'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
comment|'# Explicitly sets an empty string => should raise error'
nl|'\n'
name|'code2'
op|'='
string|'"""\n opt = cfg.StrOpt("opt2", help="")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code2'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
comment|'# Has help text but too few characters => should raise error'
nl|'\n'
name|'code3'
op|'='
string|'"""\n opt = cfg.StrOpt("opt3", help="meh")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code3'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
comment|'# Has long enough help text => should *not* raise an error'
nl|'\n'
name|'code4'
op|'='
string|'"""\n opt = cfg.StrOpt("opt4", help="This option does stuff")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code4'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
comment|'# OptGroup objects help is optional => should *not* raise error'
nl|'\n'
name|'code5'
op|'='
string|'"""\n opt_group = cfg.OptGroup(name="group1", title="group title")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code5'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
comment|'# The help text gets translated'
nl|'\n'
name|'code6'
op|'='
string|'"""\n opt = cfg.StrOpt("opt6",\n help=_("help with translation usage"))\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code6'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
comment|'# The help text uses a paranthesis (weird, but produces a valid string)'
nl|'\n'
name|'code7'
op|'='
string|'"""\n opt = cfg.StrOpt("opt7",\n help=("help text uses extra paranthesis"))\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code7'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
comment|'# Ignore deprecated options. They should be in the release notes'
nl|'\n'
name|'code8'
op|'='
string|'"""\n opt = cfg.DeprecatedOpt(\'opt8\')\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code8'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
name|'code9'
op|'='
string|'"""\n opt = cfg.StrOpt("opt9",\n help=\\"\\"\\"\n This\n\n is\n\n multiline\n\n help\n\n text.\n \\"\\"\\")\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code9'
op|','
name|'checks'
op|'.'
name|'cfg_help_with_enough_text'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_no_os_popen
dedent|''
name|'def'
name|'test_no_os_popen'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|' '
name|'code'
op|'='
string|'"""\n import os\n\n foobar_cmd = "foobar -get -beer"\n answer = os.popen(foobar_cmd).read()\n\n if answer == nok":\n try:\n os.popen(os.popen(\'foobar -beer -please\')).read()\n\n except ValueError:\n go_home()\n """'
newline|'\n'
name|'errors'
op|'='
op|'['
op|'('
number|'4'
op|','
number|'0'
op|','
string|"'N348'"
op|')'
op|','
op|'('
number|'8'
op|','
number|'8'
op|','
string|"'N348'"
op|')'
op|']'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checks'
op|'.'
name|'no_os_popen'
op|','
nl|'\n'
name|'expected_errors'
op|'='
name|'errors'
op|')'
newline|'\n'
nl|'\n'
DECL|member|test_uncalled_closures
dedent|''
name|'def'
name|'test_uncalled_closures'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
nl|'\n'
indent|' '
name|'checker'
op|'='
name|'checks'
op|'.'
name|'CheckForUncalledTestClosure'
newline|'\n'
name|'code'
op|'='
string|'"""\n def test_fake_thing():\n def _test():\n pass\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_errors'
op|'('
name|'code'
op|','
name|'checker'
op|','
nl|'\n'
name|'expected_errors'
op|'='
op|'['
op|'('
number|'1'
op|','
number|'0'
op|','
string|"'N349'"
op|')'
op|']'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def test_fake_thing():\n def _test():\n pass\n _test()\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checker'
op|')'
newline|'\n'
nl|'\n'
name|'code'
op|'='
string|'"""\n def test_fake_thing():\n def _test():\n pass\n self.assertRaises(FakeExcepion, _test)\n """'
newline|'\n'
name|'self'
op|'.'
name|'_assert_has_no_errors'
op|'('
name|'code'
op|','
name|'checker'
op|')'
newline|'\n'
dedent|''
dedent|''
endmarker|''
end_unit
| 14.597142
| 1,673
| 0.574724
| 8,675
| 58,228
| 3.744438
| 0.063746
| 0.136133
| 0.064957
| 0.060339
| 0.827725
| 0.798233
| 0.763292
| 0.742327
| 0.732475
| 0.713358
| 0
| 0.007639
| 0.141221
| 58,228
| 3,988
| 1,674
| 14.600802
| 0.641956
| 0
| 0
| 0.923771
| 0
| 0.004263
| 0.458972
| 0.102013
| 0
| 0
| 0
| 0
| 0.05667
| 0
| null | null | 0.001755
| 0.008526
| null | null | 0.000502
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
3464a928823217cd380eb8a28aa3a78a46275f6b
| 1,584
|
py
|
Python
|
workflow/notebooks/dev/test_patterns.py
|
CambridgeSemiticsLab/BH_time_collocations
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | 5
|
2019-06-19T19:42:21.000Z
|
2021-04-20T22:43:45.000Z
|
workflow/notebooks/dev/test_patterns.py
|
CambridgeSemiticsLab/BHTenseAndAspect
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | 2
|
2020-02-25T10:19:40.000Z
|
2020-03-13T15:29:01.000Z
|
workflow/notebooks/dev/test_patterns.py
|
CambridgeSemiticsLab/BHTenseAndAspect
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | null | null | null |
patterns = [
# PREP + NOUN
"""
ph:phrase rela=NA
w1:word pdp=prep
<: w2:word pdp=subs ls#card
w1 =: ph
w2 := ph
""",
# PREP + ART + NOUN
"""
ph:phrase rela=NA
w1:word pdp=prep
<: word lex=H
<: w2:word pdp=subs ls#card
w1 =: ph
w2 := ph
"""
# PREP + ADJV
"""
ph:phrase
w1:word pdp=prep
<: w2:word pdp=advb
w1 =: ph
w2 := ph
""",
# NOUN + C + NOUN
"""
ph:phrase rela=NA
w1:word pdp=subs st=c ls#card
<: w2:word pdp=subs ls#card st=a
w1 =: ph
w2 := ph
""",
# PREP+ NOUN + C + NOUN
"""
ph:phrase rela=NA
w1:word pdp=prep
<: word pdp=subs st=c ls#card
<: w2:word pdp=subs ls#card st=a
w1 =: ph
w2 := ph
""",
# PREP + NOUN + C + NOUN + C + NOUN
"""
ph:phrase rela=NA
w1:word pdp=prep
<: word pdp=subs st=c ls#card
<: w2:word pdp=subs ls#card st=a
w1 =: ph
w2 := ph
""",
# PREP + NOUN + C + NOUN + C + NOUN
"""
ph:phrase rela=NA
w1:word pdp=subs st=c ls#card
<: word pdp=subs st=c ls#card
<: word pdp=subs st=c ls#card
<: w2:word pdp=subs ls#card st=a
w1 =: ph
w2 := ph
""",
# CARD + CARD + SUBS
"""
ph:phrase rela=NA
w1:word pdp=subs ls=card
<: word pdp=subs ls=card
<: w2:word pdp=subs ls#card
w1 =: ph
w2 := ph
""",
# CARD + W + CARD + SUBS
"""
ph:phrase rela=NA
w1:word pdp=subs ls=card
<: word lex=W
<: word pdp=subs ls=card
<: w2:word pdp=subs ls#card
w1 =: ph
w2 := ph
""",
# ~Cardinal quantifier phrases
"""
phrase rela=NA
/where/
word
/have/
pdp=subs prs=absent
/-/
word ls=card
word pdp=subs ls#card
""",
]
| 14.017699
| 36
| 0.541035
| 277
| 1,584
| 3.093863
| 0.108303
| 0.204201
| 0.243874
| 0.1972
| 0.86231
| 0.852976
| 0.852976
| 0.800467
| 0.800467
| 0.764294
| 0
| 0.03169
| 0.282828
| 1,584
| 113
| 37
| 14.017699
| 0.722711
| 0.137626
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
cad46a3d2c8ea81b186c010da4b4328c7e70c0ac
| 87
|
py
|
Python
|
models/__init__.py
|
13952522076/Efficient_ImageNet_Classification
|
1480db7f3a5ddaadb8f0e1fc29287fb56f3b8583
|
[
"MIT"
] | 16
|
2020-07-16T21:40:22.000Z
|
2021-12-26T20:49:23.000Z
|
models/__init__.py
|
azuredsky/Efficient_ImageNet_Classification
|
4d26f836ce8efa695853f668f925dd56e1608033
|
[
"MIT"
] | 1
|
2020-07-19T19:54:59.000Z
|
2020-07-19T20:39:26.000Z
|
models/__init__.py
|
azuredsky/Efficient_ImageNet_Classification
|
4d26f836ce8efa695853f668f925dd56e1608033
|
[
"MIT"
] | 7
|
2020-07-17T01:45:19.000Z
|
2021-05-20T05:45:56.000Z
|
from __future__ import absolute_import
from .resnet import *
from .resnet_se import *
| 17.4
| 38
| 0.804598
| 12
| 87
| 5.333333
| 0.5
| 0.3125
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149425
| 87
| 4
| 39
| 21.75
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
cae740707bce38f9b3b3b8e4590b2e3a88bdba20
| 975
|
py
|
Python
|
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/_api/v1/keras/activations/__init__.py
|
JustinACoder/H22-GR3-UnrealAI
|
361eb9ef1147f8a2991e5f98c4118cd823184adf
|
[
"MIT"
] | 6
|
2022-02-04T18:12:24.000Z
|
2022-03-21T23:57:12.000Z
|
Lib/site-packages/tensorflow/_api/v1/keras/activations/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/tensorflow/_api/v1/keras/activations/__init__.py
|
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
|
1fa4cd6a566c8745f455fc3d2273208f21f88ced
|
[
"bzip2-1.0.6"
] | 1
|
2022-02-08T03:53:23.000Z
|
2022-02-08T03:53:23.000Z
|
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Built-in activation functions.
"""
from __future__ import print_function
from tensorflow.python.keras.activations import deserialize
from tensorflow.python.keras.activations import elu
from tensorflow.python.keras.activations import get
from tensorflow.python.keras.activations import hard_sigmoid
from tensorflow.python.keras.activations import linear
from tensorflow.python.keras.activations import relu
from tensorflow.python.keras.activations import selu
from tensorflow.python.keras.activations import serialize
from tensorflow.python.keras.activations import sigmoid
from tensorflow.python.keras.activations import softmax
from tensorflow.python.keras.activations import softplus
from tensorflow.python.keras.activations import softsign
from tensorflow.python.keras.activations import tanh
del print_function
| 40.625
| 83
| 0.833846
| 124
| 975
| 6.483871
| 0.33871
| 0.278607
| 0.323383
| 0.404229
| 0.696517
| 0.696517
| 0.121891
| 0
| 0
| 0
| 0
| 0
| 0.105641
| 975
| 23
| 84
| 42.391304
| 0.922018
| 0.161026
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.933333
| 0
| 0.933333
| 0.133333
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
1b17af5f056f8db603a369eb6621187d7531e170
| 22,740
|
py
|
Python
|
ws2122-lspm/Lib/site-packages/pm4py/algo/filtering/log/ltl/ltl_checker.py
|
Malekhy/ws2122-lspm
|
e4dc8b801d12f862b8ef536a0f125f346f085a00
|
[
"MIT"
] | 1
|
2022-01-19T04:02:46.000Z
|
2022-01-19T04:02:46.000Z
|
ws2122-lspm/Lib/site-packages/pm4py/algo/filtering/log/ltl/ltl_checker.py
|
Malekhy/ws2122-lspm
|
e4dc8b801d12f862b8ef536a0f125f346f085a00
|
[
"MIT"
] | 1
|
2021-11-19T07:21:48.000Z
|
2021-11-19T07:21:48.000Z
|
ws2122-lspm/Lib/site-packages/pm4py/algo/filtering/log/ltl/ltl_checker.py
|
Malekhy/ws2122-lspm
|
e4dc8b801d12f862b8ef536a0f125f346f085a00
|
[
"MIT"
] | 1
|
2022-01-14T17:15:38.000Z
|
2022-01-14T17:15:38.000Z
|
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PM4Py is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PM4Py. If not, see <https://www.gnu.org/licenses/>.
'''
from enum import Enum
from pm4py.objects.conversion.log import converter as log_converter
from pm4py.objects.log.obj import EventLog
from pm4py.util import exec_utils
from pm4py.util.constants import PARAMETER_CONSTANT_ATTRIBUTE_KEY, PARAMETER_CONSTANT_RESOURCE_KEY, \
PARAMETER_CONSTANT_TIMESTAMP_KEY
from pm4py.util.xes_constants import DEFAULT_NAME_KEY, DEFAULT_RESOURCE_KEY, DEFAULT_TIMESTAMP_KEY
import deprecation
from typing import Optional, Dict, Any, Union, Tuple, List
from pm4py.objects.log.obj import EventLog, EventStream, Trace
class Parameters(Enum):
ATTRIBUTE_KEY = PARAMETER_CONSTANT_ATTRIBUTE_KEY
TIMESTAMP_KEY = PARAMETER_CONSTANT_TIMESTAMP_KEY
RESOURCE_KEY = PARAMETER_CONSTANT_RESOURCE_KEY
POSITIVE = "positive"
ENABLE_TIMESTAMP = "enable_timestamp"
TIMESTAMP_DIFF_BOUNDARIES = "timestamp_diff_boundaries"
POSITIVE = Parameters.POSITIVE
ENABLE_TIMESTAMP = Parameters.ENABLE_TIMESTAMP
TIMESTAMP_DIFF_BOUNDARIES = Parameters.TIMESTAMP_DIFF_BOUNDARIES
def timestamp_list_is_ge(a, b):
for i in range(len(a)):
if a[i] < b[i][0]:
return False
return True
def timestamp_list_is_le(a, b):
for i in range(len(a)):
if a[i] > b[i][1]:
return False
return True
@deprecation.deprecated('2.2.6', '3.0.0', 'please use pm4py.algo.filtering.log.ltl.ltl_checker.eventually_follows')
def A_eventually_B(log, A, B, parameters=None):
"""
Applies the A eventually B rule
Parameters
------------
log
Log
A
A attribute value
B
B attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- If True, returns all the cases containing A and B and in which A was eventually followed by B
- If False, returns all the cases not containing A or B, or in which an instance of A was not eventually
followed by an instance of B
Returns
------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, DEFAULT_TIMESTAMP_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
enable_timestamp = exec_utils.get_param_value(Parameters.ENABLE_TIMESTAMP, parameters, False)
timestamp_diff_boundaries = exec_utils.get_param_value(Parameters.TIMESTAMP_DIFF_BOUNDARIES, parameters, [])
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
if enable_timestamp:
occ_A = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == B]
diffs = [[(occ_B[j].timestamp() - occ_A[i].timestamp())] for i in range(len(occ_A)) for j in
range(len(occ_B)) if occ_B[j] > occ_A[i]]
else:
occ_A = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == B]
diffs = [[(occ_B[j] - occ_A[i])] for i in range(len(occ_A)) for j in range(len(occ_B)) if
occ_B[j] > occ_A[i]]
if enable_timestamp and timestamp_diff_boundaries:
diffs = [d for d in diffs if
timestamp_list_is_ge(d, timestamp_diff_boundaries) and timestamp_list_is_le(d,
timestamp_diff_boundaries)]
if diffs:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
@deprecation.deprecated('2.2.6', '3.0.0', 'please use pm4py.algo.filtering.log.ltl.ltl_checker.eventually_follows')
def A_eventually_B_eventually_C(log, A, B, C, parameters=None):
"""
Applies the A eventually B eventually C rule
Parameters
------------
log
Log
A
A attribute value
B
B attribute value
C
C attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- If True, returns all the cases containing A, B and C and in which A was eventually followed by B and B was eventually followed by C
- If False, returns all the cases not containing A or B or C, or in which an instance of A was not eventually
followed by an instance of B or an instance of B was not eventually followed by C
Returns
------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, DEFAULT_TIMESTAMP_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
enable_timestamp = exec_utils.get_param_value(Parameters.ENABLE_TIMESTAMP, parameters, False)
timestamp_diff_boundaries = exec_utils.get_param_value(Parameters.TIMESTAMP_DIFF_BOUNDARIES, parameters, [])
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
if enable_timestamp:
occ_A = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == B]
occ_C = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == C]
diffs = [[occ_B[j].timestamp() - occ_A[i].timestamp(), occ_C[z].timestamp() - occ_B[j].timestamp()] for i in
range(len(occ_A)) for j in range(len(occ_B))
for z in range(len(occ_C)) if occ_B[j] > occ_A[i] and occ_C[z] > occ_B[j]]
else:
occ_A = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == B]
occ_C = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == C]
diffs = [[occ_B[j] - occ_A[i], occ_C[z] - occ_B[j]] for i in range(len(occ_A)) for j in range(len(occ_B))
for z in range(len(occ_C)) if occ_B[j] > occ_A[i] and occ_C[z] > occ_B[j]]
if enable_timestamp and timestamp_diff_boundaries:
diffs = [d for d in diffs if
timestamp_list_is_ge(d, timestamp_diff_boundaries) and timestamp_list_is_le(d,
timestamp_diff_boundaries)]
if diffs:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
@deprecation.deprecated('2.2.6', '3.0.0', 'please use pm4py.algo.filtering.log.ltl.ltl_checker.eventually_follows')
def A_eventually_B_eventually_C_eventually_D(log, A, B, C, D, parameters=None):
"""
Applies the A eventually B eventually C rule
Parameters
------------
log
Log
A
A attribute value
B
B attribute value
C
C attribute value
D
D attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- If True, returns all the cases containing A, B and C and in which A was eventually followed by B and B was eventually followed by C
- If False, returns all the cases not containing A or B or C, or in which an instance of A was not eventually
followed by an instance of B or an instance of B was not eventually followed by C
Returns
------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, DEFAULT_TIMESTAMP_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
enable_timestamp = exec_utils.get_param_value(Parameters.ENABLE_TIMESTAMP, parameters, False)
timestamp_diff_boundaries = exec_utils.get_param_value(Parameters.TIMESTAMP_DIFF_BOUNDARIES, parameters, [])
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
if enable_timestamp:
occ_A = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == B]
occ_C = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == C]
occ_D = [trace[i][timestamp_key] for i in range(len(trace)) if
attribute_key in trace[i] and trace[i][attribute_key] == D]
diffs = [[occ_B[j].timestamp() - occ_A[i].timestamp(), occ_C[z].timestamp() - occ_B[j].timestamp(),
occ_D[za].timestamp() - occ_C[z].timestamp()] for i in
range(len(occ_A)) for j in range(len(occ_B))
for z in range(len(occ_C)) for za in range(len(occ_D)) if
occ_B[j] > occ_A[i] and occ_C[z] > occ_B[j] and occ_D[za] > occ_C[z]]
else:
occ_A = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == B]
occ_C = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == C]
occ_D = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == D]
diffs = [[occ_B[j] - occ_A[i], occ_C[z] - occ_B[j], occ_D[za] - occ_C[z]] for i in range(len(occ_A)) for j
in range(len(occ_B))
for z in range(len(occ_C)) for za in range(len(occ_D)) if
occ_B[j] > occ_A[i] and occ_C[z] > occ_B[j] and occ_D[za] > occ_C[z]]
if enable_timestamp and timestamp_diff_boundaries:
diffs = [d for d in diffs if
timestamp_list_is_ge(d, timestamp_diff_boundaries) and timestamp_list_is_le(d,
timestamp_diff_boundaries)]
if diffs:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
def eventually_follows(log: EventLog, attribute_values: List[str], parameters: Optional[Dict[Union[str, Parameters], Any]] = None) -> EventLog:
"""
Applies the eventually follows rule
Parameters
------------
log
Log
attribute_values
A list of attribute_values attribute_values[n] follows attribute_values[n-1] follows ... follows attribute_values[0]
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- If True, returns all the cases containing all attribute_values and in which attribute_values[i] was eventually followed by attribute_values[i + 1]
- If False, returns all the cases not containing all attribute_values, or in which an instance of attribute_values[i] was not eventually
followed by an instance of attribute_values[i + 1]
Returns
------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, DEFAULT_TIMESTAMP_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
enable_timestamp = exec_utils.get_param_value(Parameters.ENABLE_TIMESTAMP, parameters, False)
timestamp_diff_boundaries = exec_utils.get_param_value(Parameters.TIMESTAMP_DIFF_BOUNDARIES, parameters, [])
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
if enable_timestamp:
occurrences = [[trace[i][timestamp_key].timestamp() for i in range(len(trace))
if attribute_key in trace[i] and trace[i][attribute_key] == attribute_value] for attribute_value in attribute_values]
else:
occurrences = [[i for i in range(len(trace))
if attribute_key in trace[i] and trace[i][attribute_key] == attribute_value] for attribute_value in attribute_values]
is_good = True
if enable_timestamp and timestamp_diff_boundaries:
prev_min = min(occurrences[0], default=-1)
for i in range(1, len(attribute_values)):
if prev_min == -1 or len(occurrences[i]) == 0:
is_good = False
break
if timestamp_diff_boundaries:
min_diff = timestamp_diff_boundaries[i - 1][0]
max_diff = timestamp_diff_boundaries[i - 1][1]
min_timestamp = min([o for o in occurrences[i] if (o - prev_min) >= min_diff and (o - prev_min) <= max_diff], default=-1)
else:
min_timestamp = min([o for o in occurrences[i] if o >= prev_min], default = -1)
prev_min = min_timestamp
if prev_min == -1:
is_good = False
break
else:
prev_min = min(occurrences[0], default=-1)
for i in range(1, len(attribute_values)):
if prev_min == -1:
is_good = False
break
if len(occurrences[i]) == 0:
is_good = False
break
min_index = min([o for o in occurrences[i] if o >= prev_min], default = -1)
prev_min = min_index
if is_good:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
def A_next_B_next_C(log: EventLog, A: str, B: str, C: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) -> EventLog:
"""
Applies the A next B next C rule
Parameters
------------
log
Log
A
A attribute value
B
B attribute value
C
C attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- If True, returns all the cases containing A, B and C and in which A was directly followed by B and B was directly followed by C
- If False, returns all the cases not containing A or B or C, or in which none instance of A was directly
followed by an instance of B and B was directly followed by C
Returns
------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
occ_A = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == A]
occ_B = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == B]
occ_C = [i for i in range(len(trace)) if attribute_key in trace[i] and trace[i][attribute_key] == C]
found = False
for a in occ_A:
for b in occ_B:
for c in occ_C:
if (b - a) == 1 and (c - b) == 1:
found = True
if found:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
def four_eyes_principle(log: EventLog, A: str, B: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) -> EventLog:
"""
Verifies the Four Eyes Principle given A and B
Parameters
-------------
log
Log
A
A attribute value
B
B attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- if True, then filters all the cases containing A and B which have empty intersection between the set
of resources doing A and B
- if False, then filters all the cases containing A and B which have no empty intersection between the set
of resources doing A and B
Returns
--------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
resource_key = exec_utils.get_param_value(Parameters.RESOURCE_KEY, parameters, DEFAULT_RESOURCE_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
occ_A = set([trace[i][resource_key] for i in range(len(trace)) if
attribute_key in trace[i] and resource_key in trace[i] and trace[i][attribute_key] == A])
occ_B = set([trace[i][resource_key] for i in range(len(trace)) if
attribute_key in trace[i] and resource_key in trace[i] and trace[i][attribute_key] == B])
if len(occ_A) > 0 and len(occ_B) > 0:
inte = occ_A.intersection(occ_B)
if not positive and len(inte) > 0:
new_log.append(trace)
elif positive and len(inte) == 0:
new_log.append(trace)
return new_log
def attr_value_different_persons(log: EventLog, A: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) -> EventLog:
"""
Checks whether an attribute value is assumed on events done by different resources
Parameters
------------
log
Log
A
A attribute value
parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
- if True, then filters all the cases containing occurrences of A done by different resources
- if False, then filters all the cases not containing occurrences of A done by different resources
Returns
-------------
filtered_log
Filtered log
"""
if parameters is None:
parameters = {}
if not isinstance(log, EventLog):
log = log_converter.apply(log, variant=log_converter.TO_EVENT_LOG, parameters=parameters)
attribute_key = exec_utils.get_param_value(Parameters.ATTRIBUTE_KEY, parameters, DEFAULT_NAME_KEY)
resource_key = exec_utils.get_param_value(Parameters.RESOURCE_KEY, parameters, DEFAULT_RESOURCE_KEY)
positive = exec_utils.get_param_value(Parameters.POSITIVE, parameters, True)
new_log = EventLog(list(), attributes=log.attributes, extensions=log.extensions, classifiers=log.classifiers,
omni_present=log.omni_present, properties=log.properties)
for trace in log:
occ_A = set([trace[i][resource_key] for i in range(len(trace)) if
attribute_key in trace[i] and resource_key in trace[i] and trace[i][attribute_key] == A])
if len(occ_A) > 1:
if positive:
new_log.append(trace)
elif not positive:
new_log.append(trace)
return new_log
| 43.231939
| 156
| 0.640633
| 3,158
| 22,740
| 4.431602
| 0.066181
| 0.065166
| 0.032869
| 0.028296
| 0.86781
| 0.846802
| 0.828653
| 0.813719
| 0.790854
| 0.782208
| 0
| 0.003858
| 0.270493
| 22,740
| 525
| 157
| 43.314286
| 0.839773
| 0.214688
| 0
| 0.733333
| 0
| 0
| 0.016794
| 0.011738
| 0
| 0
| 0
| 0
| 0
| 1
| 0.033333
| false
| 0
| 0.033333
| 0
| 0.133333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
1b5e3fbf695dcfda8de0e0c231bc1fb0db430f27
| 113,004
|
py
|
Python
|
src/bee/main.py
|
noahgarrett/BeePython
|
ae5134459800fd7b6281284da0eb04cba38e26dd
|
[
"MIT"
] | null | null | null |
src/bee/main.py
|
noahgarrett/BeePython
|
ae5134459800fd7b6281284da0eb04cba38e26dd
|
[
"MIT"
] | null | null | null |
src/bee/main.py
|
noahgarrett/BeePython
|
ae5134459800fd7b6281284da0eb04cba38e26dd
|
[
"MIT"
] | null | null | null |
def receive_bee():
return "According to all known laws of aviation, there is no way that a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway. Because bees don’t care what humans think is impossible.” SEQ. 75 - “INTRO TO BARRY” INT. BENSON HOUSE - DAY ANGLE ON: Sneakers on the ground. Camera PANS UP to reveal BARRY BENSON’S BEDROOM ANGLE ON: Barry’s hand flipping through different sweaters in his closet. BARRY Yellow black, yellow black, yellow black, yellow black, yellow black, yellow black...oohh, black and yellow... ANGLE ON: Barry wearing the sweater he picked, looking in the mirror. BARRY (CONT’D) Yeah, let’s shake it up a little. He picks the black and yellow one. He then goes to the sink, takes the top off a CONTAINER OF HONEY, and puts some honey into his hair. He squirts some in his mouth and gargles. Then he takes the lid off the bottle, and rolls some on like deodorant. CUT TO: INT. BENSON HOUSE KITCHEN - CONTINUOUS Barry’s mother, JANET BENSON, yells up at Barry. JANET BENSON Barry, breakfast is ready! CUT TO: Bee Movie - JS REVISIONS 8/13/07 1. INT. BARRY’S ROOM - CONTINUOUS BARRY Coming! SFX: Phone RINGING. Barry’s antennae vibrate as they RING like a phone. Barry’s hands are wet. He looks around for a towel. BARRY (CONT’D) Hang on a second! He wipes his hands on his sweater, and pulls his antennae down to his ear and mouth. BARRY (CONTD) Hello? His best friend, ADAM FLAYMAN, is on the other end. ADAM Barry? BARRY Adam? ADAM Can you believe this is happening? BARRY Can’t believe it. I’ll pick you up. Barry sticks his stinger in a sharpener. SFX: BUZZING AS HIS STINGER IS SHARPENED. He tests the sharpness with his finger. SFX: Bing. BARRY (CONT’D) Looking sharp. ANGLE ON: Barry hovering down the hall, sliding down the staircase bannister. Barry’s mother, JANET BENSON, is in the kitchen. JANET BENSON Barry, why don’t you use the stairs? Your father paid good money for those. Bee Movie - JS REVISIONS 8/13/07 2. BARRY Sorry, I’m excited. Barry’s father, MARTIN BENSON, ENTERS. He’s reading a NEWSPAPER with the HEADLINE, “Queen gives birth to thousandtuplets: Resting Comfortably.” MARTIN BENSON Here’s the graduate. We’re very proud of you, Son. And a perfect report card, all B’s. JANET BENSON (mushing Barry’s hair) Very proud. BARRY Ma! I’ve got a thing going here. Barry re-adjusts his hair, starts to leave. JANET BENSON You’ve got some lint on your fuzz. She picks it off. BARRY Ow, that’s me! MARTIN BENSON Wave to us. We’ll be in row 118,000. Barry zips off. BARRY Bye! JANET BENSON Barry, I told you, stop flying in the house! CUT TO: SEQ. 750 - DRIVING TO GRADUATION EXT. BEE SUBURB - MORNING A GARAGE DOOR OPENS. Barry drives out in his CAR. Bee Movie - JS REVISIONS 8/13/07 3. ANGLE ON: Barry’s friend, ADAM FLAYMAN, standing by the curb. He’s reading a NEWSPAPER with the HEADLINE: “Frisbee Hits Hive: Internet Down. Bee-stander: “I heard a sound, and next thing I knew...wham-o!.” Barry drives up, stops in front of Adam. Adam jumps in. BARRY Hey, Adam. ADAM Hey, Barry. (pointing at Barry’s hair) Is that fuzz gel? BARRY A little. It’s a special day. Finally graduating. ADAM I never thought I’d make it. BARRY Yeah, three days of grade school, three days of high school. ADAM Those were so awkward. BARRY Three days of college. I’m glad I took off one day in the middle and just hitchhiked around the hive. ADAM You did come back different. They drive by a bee who’s jogging. ARTIE Hi Barry! BARRY (to a bee pedestrian) Hey Artie, growing a mustache? Looks good. Barry and Adam drive from the suburbs into the city. ADAM Hey, did you hear about Frankie? Bee Movie - JS REVISIONS 8/13/07 4. BARRY Yeah. ADAM You going to his funeral? BARRY No, I’m not going to his funeral. Everybody knows you sting someone you die, you don’t waste it on a squirrel. He was such a hot head. ADAM Yeah, I guess he could’ve just gotten out of the way. The DRIVE through a loop de loop. BARRY AND ADAM Whoa...Whooo...wheee!! ADAM I love this incorporating the amusement park right into our regular day. BARRY I guess that’s why they say we don’t need vacations. CUT TO: SEQ. 95 - GRADUATION EXT. GRADUATION CEREMONY - CONTINUOUS Barry and Adam come to a stop. They exit the car, and fly over the crowd to their seats. * BARRY * (re: graduation ceremony) * Boy, quite a bit of pomp...under * the circumstances. * They land in their seats. BARRY (CONT’D) Well Adam, today we are men. Bee Movie - JS REVISIONS 8/13/07 5. ADAM We are. BARRY Bee-men. ADAM Amen! BARRY Hallelujah. Barry hits Adam’s forehead. Adam goes into the rapture. An announcement comes over the PA. ANNOUNCER (V.O) Students, faculty, distinguished bees...please welcome, Dean Buzzwell. ANGLE ON: DEAN BUZZWELL steps up to the podium. The podium has a sign that reads: “Welcome Graduating Class of:”, with train-station style flipping numbers after it. BUZZWELL Welcome New Hive City graduating class of... The numbers on the podium change to 9:15. BUZZWELL (CONT’D) ...9:15. (he clears his throat) And that concludes our graduation ceremonies. And begins your career at Honex Industries. BARRY Are we going to pick our job today? ADAM I heard it’s just orientation. The rows of chairs change in transformer-like mechanical motion to Universal Studios type tour trams. Buzzwell walks off stage. BARRY (re: trams) Whoa, heads up! Here we go. Bee Movie - JS REVISIONS 8/13/07 6. SEQ. 125 - “FACTORY” FEMALE VOICE (V.O) Keep your hands and antennas inside the tram at all times. (in Spanish) Dejen las manos y antennas adentro del tram a todos tiempos. BARRY I wonder what it’s going to be like? ADAM A little scary. Barry shakes Adam. BARRY AND ADAM AAHHHH! The tram passes under SIGNS READING: “Honex: A Division of Honesco: A Part of the Hexagon Group.” TRUDY Welcome to Honex, a division of Honesco, and a part of the Hexagon group. BARRY This is it! The Honex doors OPEN, revealing the factory. BARRY (CONT’D) Wow. TRUDY We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant pollen jocks bring the nectar to the hive where our top secret formula is automatically color-corrected, scent adjusted and bubble contoured into this... Trudy GRABS a TEST TUBE OF HONEY from a technician. Bee Movie - JS REVISIONS 8/13/07 7. TRUDY (CONT’D) ...soothing, sweet syrup with its distinctive golden glow, you all know as... EVERYONE ON THE TRAM (in unison) H-o-n-e-y. Trudy flips the flask into the crowd, and laughs as they all scramble for it. ANGLE ON: A GIRL BEE catching the honey. ADAM (sotto) That girl was hot. BARRY (sotto) She’s my cousin. ADAM She is? BARRY Yes, we’re all cousins. ADAM Right. You’re right. TRUDY At Honex, we also constantly strive to improve every aspect of bee existence. These bees are stress testing a new helmet technology. ANGLE ON: A STUNT BEE in a HELMET getting hit with a NEWSPAPER, then a SHOE, then a FLYSWATTER. He gets up, and gives a “thumb’s up”. The graduate bees APPLAUD. ADAM (re: stunt bee) What do you think he makes? BARRY Not enough. TRUDY And here we have our latest advancement, the Krelman. Bee Movie - JS REVISIONS 8/13/07 8. BARRY Wow, what does that do? TRUDY Catches that little strand of honey that hangs after you pour it. Saves us millions. ANGLE ON: The Krelman machine. Bees with hand-shaped hats on, rotating around a wheel to catch drips of honey. Adam’s hand shoots up. ADAM Can anyone work on the Krelman? TRUDY Of course. Most bee jobs are small ones. But bees know that every small job, if it’s done well, means a lot. There are over 3000 different bee occupations. But choose carefully, because you’ll stay in the job that you pick for the rest of your life. The bees CHEER. ANGLE ON: Barry’s smile dropping slightly. BARRY The same job for the rest of your life? I didn’t know that. ADAM What’s the difference? TRUDY And you’ll be happy to know that bees as a species haven’t had one day off in 27 million years. BARRY So you’ll just work us to death? TRUDY (laughing) We’ll sure try. Everyone LAUGHS except Barry. Bee Movie - JS REVISIONS 8/13/07 9. The tram drops down a log-flume type steep drop. Cameras flash, as all the bees throw up their hands. The frame freezes into a snapshot. Barry looks concerned. The tram continues through 2 doors. FORM DISSOLVE TO: SEQ. 175 - “WALKING THE HIVE” INT. HONEX LOBBY ANGLE ON: The log-flume photo, as Barry looks at it. ADAM Wow. That blew my mind. BARRY (annoyed) “What’s the difference?” Adam, how could you say that? One job forever? That’s an insane choice to have to make. ADAM Well, I’m relieved. Now we only have to make one decision in life. BARRY But Adam, how could they never have told us that? ADAM Barry, why would you question anything? We’re bees. We’re the most perfectly functioning society on Earth. They walk by a newspaper stand with A SANDWICH BOARD READING: “Bee Goes Berserk: Stings Seven Then Self.” ANGLE ON: A BEE filling his car’s gas tank from a honey pump. He fills his car some, then takes a swig for himself. NEWSPAPER BEE (to the bee guzzling gas) Hey! Barry and Adam begin to cross the street. Bee Movie - JS REVISIONS 8/13/07 10. BARRY Yeah but Adam, did you ever think that maybe things work a little too well around here? They stop in the middle of the street. The traffic moves perfectly around them. ADAM Like what? Give me one example. BARRY (thinks) ...I don’t know. But you know what I’m talking about. They walk off. SEQ. 400 - “MEET THE JOCKS” SFX: The SOUND of Pollen Jocks. PAN DOWN from the Honex statue. J-GATE ANNOUNCER Please clear the gate. Royal Nectar Force on approach. Royal Nectar Force on approach. BARRY Wait a second. Check it out. Hey, hey, those are Pollen jocks. ADAM Wow. FOUR PATROL BEES FLY in through the hive’s giant Gothic entrance. The Patrol Bees are wearing fighter pilot helmets with black visors. ADAM (CONT’D) I’ve never seen them this close. BARRY They know what it’s like to go outside the hive. ADAM Yeah, but some of them don’t come back. Bee Movie - JS REVISIONS 8/13/07 11. The nectar from the pollen jocks is removed from their backpacks, and loaded into trucks on their way to Honex. A SMALL CROWD forms around the Patrol Bees. Each one has a PIT CREW that takes their nectar. Lou Loduca hurries a pit crew along: LOU LODUCA You guys did great! You’re monsters. You’re sky freaks! I love it! I love it! SCHOOL GIRLS are jumping up and down and squealing nearby. BARRY I wonder where those guys have just been? ADAM I don’t know. BARRY Their day’s not planned. Outside the hive, flying who-knows-where, doing who-knows-what. ADAM You can’t just decide one day to be a Pollen Jock. You have to be bred for that. BARRY Right. Pollen Jocks cross in close proximity to Barry and Adam. Some pollen falls off, onto Barry and Adam. BARRY (CONT’D) Look at that. That’s more pollen than you and I will ever see in a lifetime. ADAM (playing with the pollen) It’s just a status symbol. I think bees make too big a deal out of it. BARRY Perhaps, unless you’re wearing it, and the ladies see you wearing it. ANGLE ON: Two girl bees. Bee Movie - JS REVISIONS 8/13/07 12. ADAM Those ladies? Aren’t they our cousins too? BARRY Distant, distant. ANGLE ON: TWO POLLEN JOCKS. JACKSON Look at these two. SPLITZ Couple of Hive Harrys. JACKSON Let’s have some fun with them. The pollen jocks approach. Barry and Adam continue to talk to the girls. GIRL 1 It must be so dangerous being a pollen jock. BARRY Oh yeah, one time a bear had me pinned up against a mushroom. He had one paw on my throat, and with the other he was slapping me back and forth across the face. GIRL 1 Oh my. BARRY I never thought I’d knock him out. GIRL 2 (to Adam) And what were you doing during all of this? ADAM Obviously I was trying to alert the authorities. The girl swipes some pollen off of Adam with a finger. BARRY (re: pollen) I can autograph that if you want. Bee Movie - JS REVISIONS 8/13/07 13. JACKSON Little gusty out there today, wasn’t it, comrades? BARRY Yeah. Gusty. BUZZ You know, we’re going to hit a sunflower patch about six miles from here tomorrow. BARRY Six miles, huh? ADAM (whispering) Barry. BUZZ It’s a puddle-jump for us. But maybe you’re not up for it. BARRY Maybe I am. ADAM (whispering louder) You are not! BUZZ We’re going, oh-nine hundred at JGate. ADAM (re: j-gate) Whoa. BUZZ (leaning in, on top of Barry) What do you think, Buzzy Boy? Are you bee enough? BARRY I might be. It all depends on what oh-nine hundred means. CUT TO: SEQ. 450 - “THE BALCONY” Bee Movie - JS REVISIONS 8/13/07 14. INT. BENSON HOUSE BALCONY - LATER Barry is standing on the balcony alone, looking out over the city. Martin Benson ENTERS, sneaks up behind Barry and gooses him in his ribs. MARTIN BENSON Honex! BARRY Oh, Dad. You surprised me. MARTIN BENSON (laughing) Have you decided what you’re interested in, Son? BARRY Well, there’s a lot of choices. MARTIN BENSON But you only get one. Martin LAUGHS. BARRY Dad, do you ever get bored doing the same job every day? MARTIN BENSON Son, let me tell you something about stirring. (making the stirring motion) You grab that stick and you just move it around, and you stir it around. You get yourself into a rhythm, it’s a beautiful thing. BARRY You know dad, the more I think about it, maybe the honey field just isn’t right for me. MARTIN BENSON And you were thinking of what, making balloon animals? That’s a bad job for a guy with a stinger. Bee Movie - JS REVISIONS 8/13/07 15. BARRY Well no... MARTIN BENSON Janet, your son’s not sure he wants to go into honey. JANET BENSON Oh Barry, you are so funny sometimes. BARRY I’m not trying to be funny. MARTIN BENSON You’re not funny, you’re going into honey. Our son, the stirrer. JANET BENSON You’re going to be a stirrer?! BARRY No one’s listening to me. MARTIN BENSON Wait until you see the sticks I have for you. BARRY I can say anything I want right now. I’m going to get an ant tattoo. JANET BENSON Let’s open some fresh honey and celebrate. BARRY Maybe I’ll pierce my thorax! MARTIN BENSON (toasting) To honey! BARRY Shave my antennae! JANET BENSON To honey! Bee Movie - JS REVISIONS 8/13/07 16. BARRY Shack up with a grasshopper, get a gold tooth, and start calling everybody “Dawg.” CUT TO: SEQ. 760 - “JOB PLACEMENT” EXT. HONEX LOBBY - CONTINUOUS ANGLE ON: A BEE BUS STOP. One group of bees stands on the pavement, as another group hovers above them. A doubledecker bus pulls up. The hovering bees get on the top level, and the standing bees get on the bottom. Barry and Adam pull up outside of Honex. ADAM I can’t believe we’re starting work today. BARRY Today’s the day. Adam jumps out of the car. ADAM (O.C) Come on. All the good jobs will be gone. BARRY Yeah, right... ANGLE ON: A BOARD READING: “JOB PLACEMENT BOARD”. Buzzwell, the Bee Processor, is at the counter. Another BEE APPLICANT, SANDY SHRIMPKIN is EXITING. SANDY SHRIMPKIN Is it still available? BUZZWELL Hang on. (he looks at changing numbers on the board) Two left. And...one of them’s yours. Congratulations Son, step to the side please. Bee Movie - JS REVISIONS 8/13/07 17. SANDY SHRIMPKIN Yeah! ADAM (to Sandy, leaving) What did you get? SANDY SHRIMPKIN Picking the crud out. That is stellar! ADAM Wow. BUZZWELL (to Adam and Barry) Couple of newbies? ADAM Yes Sir. Our first day. We are ready. BUZZWELL Well, step up and make your choice. ANGLE ON: A CHART listing the different sectors of Honex. Heating, Cooling, Viscosity, Krelman, Pollen Counting, Stunt Bee, Pouring, Stirrer, Humming, Regurgitating, Front Desk, Hair Removal, Inspector No. 7, Chef, Lint Coordinator, Stripe Supervisor, Antennae-ball polisher, Mite Wrangler, Swatting Counselor, Wax Monkey, Wing Brusher, Hive Keeper, Restroom Attendant. ADAM (to Barry) You want to go first? BARRY No, you go. ADAM Oh my. What’s available? BUZZWELL Restroom attendant is always open, and not for the reason you think. ADAM Any chance of getting on to the Krelman, Sir? BUZZWELL Sure, you’re on. Bee Movie - JS REVISIONS 8/13/07 18. He plops the KRELMAN HAT onto Adam’s head. ANGLE ON: The job board. THE COLUMNS READ: “OCCUPATION” “POSITIONS AVAILABLE”, and “STATUS”. The middle column has numbers, and the right column has job openings flipping between “open”, “pending”, and “closed”. BUZZWELL (CONT’D) Oh, I’m sorry. The Krelman just closed out. ADAM Oh! He takes the hat off Adam. BUZZWELL Wax Monkey’s always open. The Krelman goes from “Closed” to “Open”. BUZZWELL (CONT’D) And the Krelman just opened up again. ADAM What happened? BUZZWELL Well, whenever a bee dies, that’s an opening. (pointing at the board) See that? He’s dead, dead, another dead one, deady, deadified, two more dead. Dead from the neck up, dead from the neck down. But, that’s life. ANGLE ON: Barry’s disturbed expression. ADAM (feeling pressure to decide) Oh, this is so hard. Heating, cooling, stunt bee, pourer, stirrer, humming, inspector no. 7, lint coordinator, stripe supervisor, antenna-ball polisher, mite wrangler-- Barry, Barry, what do you think I should-- Barry? Barry? Bee Movie - JS REVISIONS 8/13/07 19. Barry is gone. CUT TO: SEQ. 775 - “LOU LODUCA SPEECH” EXT. J-GATE - SAME TIME Splitz, Jackson, Buzz, Lou and two other BEES are going through final pre-flight checks. Barry ENTERS. LOU LODUCA Alright, we’ve got the sunflower patch in quadrant nine. Geranium window box on Sutton Place... Barry’s antennae rings, like a phone. ADAM (V.O) What happened to you? Where are you? Barry whispers throughout. BARRY I’m going out. ADAM (V.O) Out? Out where? BARRY Out there. ADAM (V.O) (putting it together) Oh no. BARRY I have to, before I go to work for the rest of my life. ADAM (V.O) You’re going to die! You’re crazy! Hello? BARRY Oh, another call coming in. Bee Movie - JS REVISIONS 8/13/07 20. ADAM (V.O) You’re cra-- Barry HANGS UP. ANGLE ON: Lou Loduca. LOU LODUCA If anyone’s feeling brave, there’s a Korean Deli on 83rd that gets their roses today. BARRY (timidly) Hey guys. BUZZ Well, look at that. SPLITZ Isn’t that the kid we saw yesterday? LOU LODUCA (to Barry) Hold it son, flight deck’s restricted. JACKSON It’s okay Lou, we’re going to take him up. Splitz and Jackson CHUCKLE. LOU LODUCA Really? Feeling lucky, are ya? A YOUNGER SMALLER BEE THAN BARRY, CHET, runs up with a release waiver for Barry to sign. CHET Sign here. Here. Just initial that. Thank you. LOU LODUCA Okay, you got a rain advisory today and as you all know, bees cannot fly in rain. So be careful. As always, (reading off clipboard) watch your brooms, hockey sticks, dogs, birds, bears, and bats. Bee Movie - JS REVISIONS 8/13/07 21. Also, I got a couple reports of root beer being poured on us. Murphy’s in a home because of it, just babbling like a cicada. BARRY That’s awful. LOU LODUCA And a reminder for all you rookies, bee law number one, absolutely no talking to humans. Alright, launch positions! The Jocks get into formation, chanting as they move. LOU LODUCA (CONT’D) Black and Yellow! JOCKS Hello! SPLITZ (to Barry) Are you ready for this, hot shot? BARRY Yeah. Yeah, bring it on. Barry NODS, terrified. BUZZ Wind! - CHECK! JOCK #1 Antennae! - CHECK! JOCK #2 Nectar pack! - CHECK! JACKSON Wings! - CHECK! SPLITZ Stinger! - CHECK! BARRY Scared out of my shorts - CHECK. LOU LODUCA Okay ladies, let’s move it out. Everyone FLIPS their goggles down. Pit crew bees CRANK their wings, and remove the starting blocks. We hear loud HUMMING. Bee Movie - JS REVISIONS 8/13/07 22. LOU LODUCA (CONT'D) LOU LODUCA (CONT’D) Pound those petunia's, you striped stem-suckers! All of you, drain those flowers! A FLIGHT DECK GUY in deep crouch hand-signals them out the archway as the backwash from the bee wings FLUTTERS his jump suit. Barry follows everyone. SEQ. 800 - “FLYING WITH THE JOCKS” The bees climb above tree tops in formation. Barry is euphoric. BARRY Whoa! I’m out! I can’t believe I’m out! So blue. Ha ha ha! (a beat) I feel so fast...and free. (re: kites in the sky) Box kite! Wow! They fly by several bicyclists, and approach a patch of flowers. BARRY (CONT'D) Flowers! SPLITZ This is blue leader. We have roses visual. Bring it around thirty degrees and hold. BARRY (sotto) Roses. JACKSON Thirty degrees, roger, bringing it around. Many pollen jocks break off from the main group. They use their equipment to collect nectar from flowers. Barry flies down to watch the jocks collect the nectar. JOCK Stand to the side kid, it’s got a bit of a kick. The jock fires the gun, and recoils. Barry watches the gun fill up with nectar. Bee Movie - JS REVISIONS 8/13/07 23. BARRY Oh, that is one Nectar Collector. JOCK You ever see pollination up close? BARRY No, Sir. He takes off, and the excess pollen dust falls causing the flowers to come back to life. JOCK (as he pollinates) I pick some pollen up over here, sprinkle it over here, maybe a dash over there, pinch on that one...see that? It’s a little bit of magic, ain’t it? The FLOWERS PERK UP as he pollinates. BARRY Wow. That’s amazing. Why do we do that? JOCK ...that’s pollen power, Kid. More pollen, more flowers, more nectar, more honey for us. BARRY Cool. The Jock WINKS at Barry. Barry rejoins the other jocks in the sky. They swoop in over a pond, kissing the surface. We see their image reflected in the water; they’re really moving. They fly over a fountain. BUZZ I’m picking up a lot of bright yellow, could be daisies. Don’t we need those? SPLITZ Copy that visual. We see what appear to be yellow flowers on a green field. Bee Movie - JS REVISIONS 8/13/07 24. They go into a deep bank and dive. BUZZ Hold on, one of these flowers seems to be on the move. SPLITZ Say again...Are you reporting a moving flower? BUZZ Affirmative. SEQ. 900 - “TENNIS GAME” The pollen jocks land. It is a tennis court with dozens of tennis balls. A COUPLE, VANESSA and KEN, plays tennis. The bees land right in the midst of a group of balls. KEN (O.C) That was on the line! The other bees start walking around amongst the immense, yellow globes. SPLITZ This is the coolest. What is it? They stop at a BALL on a white line and look up at it. JACKSON I don’t know, but I’m loving this color. SPLITZ (smelling tennis ball) Smells good. Not like a flower. But I like it. JACKSON Yeah, fuzzy. BUZZ Chemical-y. JACKSON Careful, guys, it’s a little grabby. Barry LANDS on a ball and COLLAPSES. Bee Movie - JS REVISIONS 8/13/07 25. BARRY Oh my sweet lord of bees. JACKSON Hey, candy brain, get off there! Barry attempts to pulls his legs off, but they stick. BARRY Problem! A tennis shoe and a hand ENTER FRAME. The hand picks up the ball with Barry underneath it. BARRY (CONT'D) Guys! BUZZ This could be bad. JACKSON Affirmative. Vanessa walks back to the service line, BOUNCES the ball. Each time it BOUNCES, the other bees cringe and GASP. ANGLE ON: Barry, terrified. Pure dumb luck, he’s not getting squished. BARRY (with each bounce) Very close...Gonna Hurt...Mamma’s little boy. SPLITZ You are way out of position, rookie. ANGLE ON: Vanessa serving. We see Barry and the ball up against the racket as she brings it back. She tosses the ball into the air; Barry’s eyes widen. The ball is STRUCK, and the rally is on. KEN Coming in at you like a missile! Ken HITS the ball back. Barry feels the g-forces. ANGLE ON: The Pollen Jocks watching Barry pass by them in SLOW MOTION. Bee Movie - JS REVISIONS 8/13/07 26. BARRY (in slow motion) Help me! JACKSON You know, I don't think these are flowers. SPLITZ Should we tell him? JACKSON I think he knows. BARRY (O.S) What is this?! Vanessa HITS a high arcing lob. Ken waits, poised for the return. We see Barry having trouble maneuvering the ball from fatigue. KEN (overly confident) Match point! ANGLE ON: Ken running up. He has a killer look in his eyes. He’s going to hit the ultimate overhead smash. KEN (CONT'D) You can just start packing up Honey, because I believe you’re about to eat it! ANGLE ON: Pollen Jocks. JACKSON Ahem! Ken is distracted by the jock. KEN What? No! He misses badly. The ball rockets into oblivion. Barry is still hanging on. ANGLE ON: Ken, berating himself. KEN (CONT’D) Oh, you cannot be serious. We hear the ball WHISTLING, and Barry SCREAMING. Bee Movie - JS REVISIONS 8/13/07 27. BARRY Yowser!!! SEQ. 1000 - “SUV” The ball flies through the air, and lands in the middle of the street. It bounces into the street again, and sticks in the grille of an SUV. INT. CAR ENGINE - CONTINUOUS BARRY’S POV: the grille of the SUV sucks him up. He tumbles through a black tunnel, whirling vanes, and pistons. BARRY AHHHHHHHHHHH!! OHHHH!! EECHHH!! AHHHHHH!! Barry gets chilled by the A/C system, and sees a frozen grasshopper. BARRY (CONT’D) (re: grasshopper) Eww, gross. CUT TO: INT. CAR - CONTINUOUS The car is packed with a typical suburban family: MOTHER, FATHER, eight-year old BOY, LITTLE GIRL in a car seat and a GRANDMOTHER. A big slobbery DOG is behind a grate. Barry pops into the passenger compartment, hitting the Mother’s magazine. MOTHER There’s a bee in the car! They all notice the bee and start SCREAMING. BARRY Aaahhhh! Barry tumbles around the car. We see the faces from his POV. MOTHER Do something! Bee Movie - JS REVISIONS 8/13/07 28. FATHER I’m driving! Barry flies by the little girl in her CAR SEAT. She waves hello. LITTLE GIRL Hi, bee. SON He’s back here! He’s going to sting me! The car SWERVES around the road. Barry flies into the back, where the slobbery dog SNAPS at him. Barry deftly avoids the jaws and gross, flying SPITTLE. MOTHER Nobody move. If you don’t move, he won’t sting you. Freeze! Everyone in the car freezes. Barry freezes. They stare at each other, eyes going back and forth, waiting to see who will make the first move. Barry blinks. GRANNY He blinked! Granny pulls out a can of HAIR SPRAY. SON Spray him, Granny! Granny sprays the hair spray everywhere. FATHER What are you doing? GRANNY It’s hair spray! Extra hold! MOTHER Kill it! Barry gets sprayed back by the hair spray, then sucked out of the sunroof. CUT TO: Bee Movie - JS REVISIONS 8/13/07 29. EXT. CITY STREET - CONTINUOUS BARRY Wow. The tension level out here is unbelievable. I’ve got to get home. As Barry flies down the street, it starts to RAIN. He nimbly avoids the rain at first. BARRY (CONT’D) Whoa. Whoa! Can’t fly in rain! Can’t fly in rain! Can’t fly in-- A couple of drops hit him, his wings go limp and he starts falling. BARRY (CONT'D) Mayday! Mayday! Bee going down! Barry sees a window ledge and aims for it and just makes it. Shivering and exhausted, he crawls into an open window as it CLOSES. SEQ. 1100 - “VANESSA SAVES BARRY” INT. VANESSA’S APARTMENT - CONTINUOUS Inside the window, Barry SHAKES off the rain like a dog. Vanessa, Ken, Andy, and Anna ENTER the apartment. VANESSA Ken, can you close the window please? KEN Huh? Oh. (to Andy) Hey, check out my new resume. I made it into a fold-out brochure. You see? It folds out. Ken holds up his brochure, with photos of himself, and a resume in the middle. ANGLE ON: Barry hiding behind the curtains, as Ken CLOSES THE WINDOW. Bee Movie - JS REVISIONS 8/13/07 30. BARRY Oh no, more humans. I don’t need this. Barry HOVERS up into the air and THROWS himself into the glass. BARRY (CONT’D) (dazed) Ow! What was that? He does it again, and then multiple more times. BARRY (CONT'D) Maybe this time...this time, this time, this time, this time, this time, this time, this time. Barry JUMPS onto the drapes. BARRY (CONT'D) (out of breath) Drapes! (then, re: glass) That is diabolical. KEN It’s fantastic. It’s got all my special skills, even my top ten favorite movies. ANDY What’s your number one? Star Wars? KEN Ah, I don’t go for that, (makes Star Wars noises), kind of stuff. ANGLE ON: Barry. BARRY No wonder we’re not supposed to talk to them. They’re out of their minds. KEN When I walk out of a job interview they’re flabbergasted. They can’t believe the things I say. Barry looks around and sees the LIGHT BULB FIXTURE in the middle of the ceiling. Bee Movie - JS REVISIONS 8/13/07 31. BARRY (re: light bulb) Oh, there’s the sun. Maybe that’s a way out. Barry takes off and heads straight for the light bulb. His POV: The seventy-five watt label grows as he gets closer. BARRY (CONT’D) I don’t remember the sun having a big seventy five on it. Barry HITS the bulb and is KNOCKED SILLY. He falls into a BOWL OF GUACAMOLE. Andy dips his chip in the guacamole, taking Barry with it. ANGLE ON: Ken and Andy. KEN I’ll tell you what. You know what? I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Barry’s POV: Giant human mouth opening. KEN (CONT’D) Wait! Stop! Beeeeeee! ANNA Kill it! Kill it! They all JUMP up from their chairs. Andy looks around for something to use. Ken comes in for the kill with a big TIMBERLAND BOOT on each hand. KEN Stand back. These are winter boots. Vanessa ENTERS, and stops Ken from squashing Barry. VANESSA (grabs Ken’s arm) Wait. Don’t kill him. CLOSE UP: on Barry’s puzzled face. KEN You know I’m allergic to them. This thing could kill me. Bee Movie - JS REVISIONS 8/13/07 32. VANESSA Why does his life have any less value than yours? She takes a GLASS TUMBLER and places it over Barry. KEN Why does his life have any less value than mine? Is that your statement? VANESSA I’m just saying, all life has value. You don’t know what he’s capable of feeling. Barry looks up through the glass and watches this conversation, astounded. Vanessa RIPS Ken’s resume in half and SLIDES it under the glass. KEN (wistful) My brochure. There’s a moment of eye contact as she carries Barry to the window. She opens it and sets him free. VANESSA There you go, little guy. KEN (O.C) I’m not scared of them. But, you know, it’s an allergic thing. ANDY (O.C) * Hey, why don’t you put that on your * resume-brochure? * KEN (O.C) It’s not funny, my whole face could puff up. ANDY (O.C) Make it one of your “Special Skills.” KEN (O.C) You know, knocking someone out is also a special skill. CUT TO: Bee Movie - JS REVISIONS 8/13/07 33. EXT. WINDOWSILL - CONTINUOUS Barry stares over the window frame. He can’t believe what’s just happened. It is still RAINING. DISSOLVE TO: SEQ. 1200 - “BARRY SPEAKS” EXT. WINDOWSILL - LATER Barry is still staring through the window. Inside, everyone’s saying their good-byes. KEN Vanessa, next week? Yogurt night? VANESSA Uh, yeah sure Ken. You know, whatever. KEN You can put carob chips on there. VANESSA Good night. KEN (as he exits) Supposed to be less calories, or something. VANESSA Bye. She shuts the door. Vanessa starts cleaning up. BARRY I’ve got to say something. She saved my life. I’ve got to say something. Alright, here it goes. Barry flies in. Bee Movie - JS REVISIONS 8/13/07 34. INT. VANESSA’S APARTMENT - CONTINUOUS Barry hides himself on different PRODUCTS placed along the kitchen shelves. He hides on a Bumblebee Tuna can, and a “Greetings From Coney Island” MUSCLE-MAN POSTCARD on the fridge. BARRY (on fridge) What would I say? (landing on a bottle) I could really get in trouble. He stands looking at Vanessa. BARRY (CONT'D) It’s a bee law. You’re not supposed to talk to a human. I can’t believe I’m doing this. I’ve got to. Oh, I can’t do it! Come on! No, yes, no, do it! I can’t. How should I start it? You like jazz? No, that’s no good. Here she comes. Speak, you fool. As Vanessa walks by, Barry takes a DEEP BREATH. BARRY (CONT’D) (cheerful) Umm...hi. Vanessa DROPS A STACK OF DISHES, and HOPS BACK. BARRY (CONT’D) I’m sorry. VANESSA You’re talking. BARRY Yes, I know, I know. VANESSA You’re talking. BARRY I know, I’m sorry. I’m so sorry. VANESSA It’s okay. It’s fine. It’s just, I know I’m dreaming, but I don’t recall going to bed. Bee Movie - JS REVISIONS 8/13/07 35. BARRY Well, you know I’m sure this is very disconcerting. VANESSA Well yeah. I mean this is a bit of a surprise to me. I mean...you’re a bee. BARRY Yeah, I am a bee, and you know I’m not supposed to be doing this, but they were all trying to kill me and if it wasn’t for you...I mean, I had to thank you. It’s just the way I was raised. Vanessa intentionally JABS her hand with a FORK. VANESSA Ow! BARRY That was a little weird. VANESSA (to herself) I’m talking to a bee. BARRY Yeah. VANESSA I’m talking to a bee. BARRY Anyway... VANESSA And a bee is talking to me... BARRY I just want you to know that I’m grateful, and I’m going to leave now. VANESSA Wait, wait, wait, wait, how did you learn to do that? BARRY What? Bee Movie - JS REVISIONS 8/13/07 36. VANESSA The talking thing. BARRY Same way you did, I guess. Mama, Dada, honey, you pick it up. VANESSA That’s very funny. BARRY Yeah. Bees are funny. If we didn’t laugh, we’d cry. With what we have to deal with. Vanessa LAUGHS. BARRY (CONT’D) Anyway. VANESSA Can I, uh, get you something? BARRY Like what? VANESSA I don’t know. I mean, I don’t know. Coffee? BARRY Well, uh, I don’t want to put you out. VANESSA It’s no trouble. BARRY Unless you’re making anyway. VANESSA Oh, it takes two minutes. BARRY Really? VANESSA It’s just coffee. BARRY I hate to impose. Bee Movie - JS REVISIONS 8/13/07 37. VANESSA Don’t be ridiculous. BARRY Actually, I would love a cup. VANESSA Hey, you want a little rum cake? BARRY I really shouldn’t. VANESSA Have a little rum cake. BARRY No, no, no, I can’t. VANESSA Oh, come on. BARRY You know, I’m trying to lose a couple micrograms here. VANESSA Where? BARRY Well... These stripes don’t help. VANESSA You look great. BARRY I don’t know if you know anything about fashion. Vanessa starts POURING the coffee through an imaginary cup and directly onto the floor. BARRY (CONT'D) Are you alright? VANESSA No. DISSOLVE TO: SEQ. 1300 - “ROOFTOP COFFEE” Bee Movie - JS REVISIONS 8/13/07 38. EXT. VANESSA’S ROOF - LATER Barry and Vanessa are drinking coffee on her roof terrace. He is perched on her keychain. BARRY ...He can’t get a taxi. He’s making the tie in the cab, as they’re flying up Madison. So he finally gets there. VANESSA Uh huh? BARRY He runs up the steps into the church, the wedding is on... VANESSA Yeah? BARRY ...and he says, watermelon? I thought you said Guatemalan. VANESSA Uh huh? BARRY Why would I marry a watermelon? Barry laughs. Vanessa doesn’t. VANESSA Oh! Is that, uh, a bee joke? BARRY Yeah, that’s the kind of stuff that we do. VANESSA Yeah, different. A BEAT. VANESSA (CONT’D) So anyway...what are you going to do, Barry? Bee Movie - JS REVISIONS 8/13/07 39. BARRY About work? I don’t know. I want to do my part for the hive, but I can’t do it the way they want. VANESSA I know how you feel. BARRY You do? VANESSA Sure, my parents wanted me to be a lawyer or doctor, but I wanted to be a florist. BARRY Really? VANESSA My only interest is flowers. BARRY Our new queen was just elected with that same campaign slogan. VANESSA Oh. BARRY Anyway, see there’s my hive, right there. You can see it. VANESSA Oh, you’re in Sheep Meadow. BARRY (excited) Yes! You know the turtle pond? VANESSA Yes? BARRY I’m right off of that. VANESSA Oh, no way. I know that area. Do you know I lost a toe-ring there once? BARRY Really? Bee Movie - JS REVISIONS 8/13/07 40. VANESSA Yes. BARRY Why do girls put rings on their toes? VANESSA Why not? BARRY I don’t know. It’s like putting a hat on your knee. VANESSA Really? Okay. A JANITOR in the background changes a LIGHTBULB. To him, it appears that Vanessa is talking to an imaginary friend. JANITOR You all right, ma’am? VANESSA Oh, yeah, fine. Just having two cups of coffee. BARRY Anyway, this has been great. (wiping his mouth) Thanks for the coffee. Barry gazes at Vanessa. VANESSA Oh yeah, it’s no trouble. BARRY Sorry I couldn’t finish it. Vanessa giggles. BARRY (CONT'D) (re: coffee) If I did, I’d be up the rest of my life. Ummm. Can I take a piece of this with me? VANESSA Sure. Here, have a crumb. She takes a CRUMB from the plate and hands it to Barry. Bee Movie - JS REVISIONS 8/13/07 41. BARRY (a little dreamy) Oh, thanks. VANESSA Yeah. There is an awkward pause. BARRY Alright, well then, I guess I’ll see you around, or not, or... VANESSA Okay Barry. BARRY And thank you so much again, for before. VANESSA Oh that? BARRY Yeah. VANESSA Oh, that was nothing. BARRY Well, not nothing, but, anyway... Vanessa extends her hand, and shakes Barry’s gingerly. The Janitor watches. The lightbulb shorts out. The Janitor FALLS. CUT TO: SEQ. 1400 - “HONEX” INT. HONEX BUILDING - NEXT DAY ANGLE ON: A TEST BEE WEARING A PARACHUTE is in a wind tunnel, hovering through increasingly heavy wind. SIGNS UNDER A FLASHING LIGHT READ: “Test In Progress” & “Hurricane Survival Test”. 2 BEES IN A LAB COATS are observing behind glass. Bee Movie - JS REVISIONS 8/13/07 42. LAB COAT BEE 1 This can’t possibly work. LAB COAT BEE 2 Well, he’s all set to go, we may as well try it. (into the mic) Okay Dave, pull the chute. The test bee opens his parachute. He’s instantly blown against the rear wall. Adam and Barry ENTER. ADAM Sounds amazing. BARRY Oh, it was amazing. It was the scariest, happiest moment of my life. ADAM Humans! Humans! I can’t believe you were with humans! Giant scary humans! What were they like? BARRY Huge and crazy. They talk crazy, they eat crazy giant things. They drive around real crazy. ADAM And do they try and kill you like on TV? BARRY Some of them. But some of them don’t. ADAM How’d you get back? BARRY Poodle. ADAM Look, you did it. And I’m glad. You saw whatever you wanted to see out there, you had your “experience”, and now you’re back, you can pick out your job, and everything can be normal. Bee Movie - JS REVISIONS 8/13/07 43. ANGLE ON: LAB BEES examining a CANDY CORN through a microscope. BARRY Well... ADAM Well? BARRY Well, I met someone. ADAM You met someone? Was she Bee-ish? BARRY Mmm. ADAM Not a WASP? Your parents will kill you. BARRY No, no, no, not a wasp. ADAM Spider? BARRY You know, I’m not attracted to the spiders. I know to everyone else it’s like the hottest thing with the eight legs and all. I can’t get by that face. Barry makes a spider face. ADAM So, who is she? BARRY She’s a human. ADAM Oh no, no, no, no. That didn’t happen. You didn’t do that. That is a bee law. You wouldn’t break a bee law. BARRY Her name’s Vanessa. Bee Movie - JS REVISIONS 8/13/07 44. ADAM Oh, oh boy! BARRY She’s so-o nice. And she’s a florist! ADAM Oh, no. No, no, no! You’re dating a human florist? BARRY We’re not dating. ADAM You’re flying outside the hive. You’re talking to human beings that attack our homes with power washers and M-80’s. That’s 1/8 of a stick of dynamite. BARRY She saved my life. And she understands me. ADAM This is over. Barry pulls out the crumb. BARRY Eat this. Barry stuffs the crumb into Adam’s face. ADAM This is not over. What was that? BARRY They call it a crumb. ADAM That was SO STINGING STRIPEY! BARRY And that’s not even what they eat. That just falls off what they eat. Do you know what a Cinnabon is? ADAM No. Bee Movie - JS REVISIONS 8/13/07 45. BARRY It’s bread... ADAM Come in here! BARRY and cinnamon, ADAM Be quiet! BARRY and frosting...they heat it up-- ADAM Sit down! INT. ADAM’S OFFICE - CONTINUOUS BARRY Really hot! ADAM Listen to me! We are not them. We’re us. There’s us and there’s them. BARRY Yes, but who can deny the heart that is yearning... Barry rolls his chair down the corridor. ADAM There’s no yearning. Stop yearning. Listen to me. You have got to start thinking bee, my friend. ANOTHER BEE JOINS IN. ANOTHER BEE Thinking bee. WIDER SHOT AS A 3RD BEE ENTERS, popping up over the cubicle wall. 3RD BEE Thinking bee. EVEN WIDER SHOT AS ALL THE BEES JOIN IN. Bee Movie - JS REVISIONS 8/13/07 46. OTHER BEES Thinking bee. Thinking bee. Thinking bee. CUT TO: SEQ. 1500 - “POOLSIDE NAGGING” EXT. BACKYARD PARENT’S HOUSE - DAY Barry sits on a RAFT in a hexagon honey pool, legs dangling into the water. Janet Benson and Martin Benson stand over him wearing big, sixties sunglasses and cabana-type outfits. The sun shines brightly behind their heads. JANET BENSON (O.C) There he is. He’s in the pool. MARTIN BENSON You know what your problem is, Barry? BARRY I’ve got to start thinking bee? MARTIN BENSON Barry, how much longer is this going to go on? It’s been three days. I don’t understand why you’re not working. BARRY Well, I’ve got a lot of big life decisions I’m thinking about. MARTIN BENSON What life? You have no life! You have no job! You’re barely a bee! Barry throws his hands in the air. BARRY Augh. JANET BENSON Would it kill you to just make a little honey? Barry ROLLS off the raft and SINKS to the bottom of the pool. We hear his parents’ MUFFLED VOICES from above the surface. Bee Movie - JS REVISIONS 8/13/07 47. JANET BENSON (CONT'D) (muffled) Barry, come out from under there. Your father’s talking to you. Martin, would you talk to him? MARTIN BENSON Barry, I’m talking to you. DISSOLVE TO: EXT. PICNIC AREA - DAY MUSIC: “Sugar Sugar” by the Archies. Barry and Vanessa are having a picnic. A MOSQUITO lands on Vanessa’s leg. She SWATS it violently. Barry’s head whips around, aghast. They stare at each other awkwardly in a frozen moment, then BURST INTO HYSTERICAL LAUGHTER. Vanessa GETS UP. VANESSA You coming? BARRY Got everything? VANESSA All set. Vanessa gets into a one-man Ultra Light plane with a black and yellow paint scheme. She puts on her helmet. BARRY You go ahead, I’ll catch up. VANESSA (come hither wink) Don’t be too long. The Ultra Light takes off. Barry catches up. They fly sideby-side. VANESSA (CONT’D) Watch this! Vanessa does a loop, and FLIES right into the side of a mountain, BURSTING into a huge ball of flames. Bee Movie - JS REVISIONS 8/13/07 48. BARRY (yelling, anguished) Vanessa! EXT. BARRY’S PARENT’S HOUSE - CONTINUOUS ANGLE ON: Barry’s face bursting through the surface of the pool, GASPING for air, eyes opening in horror. MARTIN BENSON We’re still here, Barry. JANET BENSON I told you not to yell at him. He doesn’t respond when you yell at him. MARTIN BENSON Then why are you yelling at me? JANET BENSON Because you don’t listen. MARTIN BENSON I’m not listening to this. Barry is toweling off, putting on his sweater. BARRY Sorry Mom, I’ve got to go. JANET BENSON Where are you going? BARRY Nowhere. I’m meeting a friend. Barry JUMPS off the balcony and EXITS. JANET BENSON (calling after him) A girl? Is this why you can’t decide? BARRY Bye! JANET BENSON I just hope she’s Bee-ish. CUT TO: Bee Movie - JS REVISIONS 8/13/07 49. SEQ. 1700 - “STREETWALK/SUPERMARKET” EXT. VANESSA’S FLORIST SHOP - DAY Vanessa FLIPS the sign to say “Sorry We Missed You”, and locks the door. ANGLE ON: A POSTER on Vanessa’s door for the Tournament of Roses Parade in Pasadena. BARRY So they have a huge parade of just flowers every year in Pasadena? VANESSA Oh, to be in the Tournament of Roses, that’s every florist’s dream. Up on a float, surrounded by flowers, crowds cheering. BARRY Wow, a tournament. Do the roses actually compete in athletic events? VANESSA No. Alright, I’ve got one. How come you don’t fly everywhere? BARRY It’s exhausting. Why don’t you run everywhere? VANESSA Hmmm. BARRY Isn’t that faster? VANESSA Yeah, okay. I see, I see. Alright, your turn. Barry and Vanessa walk/fly down a New York side street, no other pedestrians near them. BARRY Ah! Tivo. You can just freeze live TV? That’s insane. Bee Movie - JS REVISIONS 8/13/07 50. VANESSA What, you don’t have anything like that? BARRY We have Hivo, but it’s a disease. It’s a horrible, horrible disease. VANESSA Oh my. They turn the corner onto a busier avenue and people start to swat at Barry. MAN Dumb bees! VANESSA You must just want to sting all those jerks. BARRY We really try not to sting. It’s usually fatal for us. VANESSA So you really have to watch your temper? They ENTER a SUPERMARKET. CUT TO: INT. SUPERMARKET BARRY Oh yeah, very carefully. You kick a wall, take a walk, write an angry letter and throw it out. You work through it like any emotion-- anger, jealousy, (under his breath) lust. Barry hops on top of some cardboard boxes in the middle of an aisle. A stock boy, HECTOR, whacks him with a rolled up magazine. VANESSA (to Barry) Oh my goodness. Are you okay? Bee Movie - JS REVISIONS 8/13/07 51. BARRY Yeah. Whew! Vanessa WHACKS Hector over the head with the magazine. VANESSA (to Hector) What is wrong with you?! HECTOR It’s a bug. VANESSA Well he’s not bothering anybody. Get out of here, you creep. Vanessa pushes him, and Hector EXITS, muttering. BARRY (shaking it off) What was that, a Pick and Save circular? VANESSA Yeah, it was. How did you know? BARRY It felt like about ten pages. Seventy-five’s pretty much our limit. VANESSA Boy, you’ve really got that down to a science. BARRY Oh, we have to. I lost a cousin to Italian Vogue. VANESSA I’ll bet. Barry stops, sees the wall of honey jars. BARRY What, in the name of Mighty Hercules, is this? How did this get here? Cute Bee? Golden Blossom? Ray Liotta Private Select? VANESSA Is he that actor? Bee Movie - JS REVISIONS 8/13/07 52. BARRY I never heard of him. Why is this here? VANESSA For people. We eat it. BARRY Why? (gesturing around the market) You don’t have enough food of your own? VANESSA Well yes, we-- BARRY How do you even get it? VANESSA Well, bees make it... BARRY I know who makes it! And it’s hard to make it! There’s Heating and Cooling, and Stirring...you need a whole Krelman thing. VANESSA It’s organic. BARRY It’s our-ganic! VANESSA It’s just honey, Barry. BARRY Just...what?! Bees don’t know about this. This is stealing. A lot of stealing! You’ve taken our homes, our schools, our hospitals. This is all we have. And it’s on sale? I’m going to get to the bottom of this. I’m going to get to the bottom of all of this! He RIPS the label off the Ray Liotta Private Select. CUT TO: Bee Movie - JS REVISIONS 8/13/07 53. SEQ. 1800 - “WINDSHIELD” EXT. BACK OF SUPERMARKET LOADING DOCK - LATER THAT DAY Barry disguises himself by blacking out his yellow lines with a MAGIC MARKER and putting on some war paint. He sees Hector, the stock boy, with a knife CUTTING open cardboard boxes filled with honey jars. MAN You almost done? HECTOR Almost. Barry steps in some honey, making a SNAPPING noise. Hector stops and turns. HECTOR (CONT’D) He is here. I sense it. Hector grabs his BOX CUTTER. Barry REACTS, hides himself behind the box again. HECTOR (CONT’D) (talking too loud, to no one in particular) Well, I guess I’ll go home now, and just leave this nice honey out, with no one around. A BEAT. Hector pretends to exit. He takes a couple of steps in place. ANGLE ON: The honey jar. Barry steps out into a moody spotlight. BARRY You’re busted, box boy! HECTOR Ah ha! I knew I heard something. So, you can talk. Barry flies up, stinger out, pushing Hector up against the wall. As Hector backs up, he drops his knife. BARRY Oh, I can talk. And now you’re going to start talking. Bee Movie - JS REVISIONS 8/13/07 54. Where are you getting all the sweet stuff? Who’s your supplier?! HECTOR I don’t know what you’re talking about. I thought we were all friends. The last thing we want to do is upset any of you...bees! Hector grabs a PUSHPIN. Barry fences with his stinger. HECTOR (CONT’D) You’re too late. It’s ours now! BARRY You, sir, have crossed the wrong sword. HECTOR You, sir, are about to be lunch for my iguana, Ignacio! Barry and Hector get into a cross-swords, nose-to-nose confrontation. BARRY Where is the honey coming from? Barry knocks the pushpin out of his hand. Barry puts his stinger up to Hector’s nose. BARRY (CONT'D) Tell me where?! HECTOR (pointing to a truck) Honey Farms. It comes from Honey Farms. ANGLE ON: A Honey Farms truck leaving the parking lot. Barry turns, takes off after the truck through an alley. He follows the truck out onto a busy street, dodging a bus, and several cabs. CABBIE Crazy person! He flies through a metal pipe on the top of a truck. BARRY OOOHHH! Bee Movie - JS REVISIONS 8/13/07 55. BARRY (CONT'D) Barry grabs onto a bicycle messenger’s backpack. The honey farms truck starts to pull away. Barry uses the bungee cord to slingshot himself towards the truck. He lands on the windshield, where the wind plasters him to the glass. He looks up to find himself surrounded by what appear to be DEAD BUGS. He climbs across, working his way around the bodies. BARRY (CONT’D) Oh my. What horrible thing has happened here? Look at these faces. They never knew what hit them. And now they’re on the road to nowhere. A MOSQUITO opens his eyes. MOOSEBLOOD Pssst! Just keep still. BARRY What? You’re not dead? MOOSEBLOOD Do I look dead? Hey man, they will wipe anything that moves. Now, where are you headed? BARRY To Honey Farms. I am onto something huge here. MOOSEBLOOD I’m going to Alaska. Moose blood. Crazy stuff. Blows your head off. LADYBUG I’m going to Tacoma. BARRY (to fly) What about you? MOOSEBLOOD He really is dead. BARRY Alright. The WIPER comes towards them. Bee Movie - JS REVISIONS 8/13/07 56. MOOSEBLOOD Uh oh. BARRY What is that? MOOSEBLOOD Oh no! It’s a wiper, triple blade! BARRY Triple blade? MOOSEBLOOD Jump on. It’s your only chance, bee. They hang on as the wiper goes back and forth. MOOSEBLOOD (CONT'D) (yelling to the truck driver through the glass) Why does everything have to be so dog-gone clean?! How much do you people need to see? Open your eyes! Stick your head out the window! CUT TO: INT. TRUCK CAB SFX: Radio. RADIO VOICE For NPR News in Washington, I’m Carl Kasell. EXT. TRUCK WINDSHIELD MOOSEBLOOD But don’t kill no more bugs! The Mosquito is FLUNG off of the wiper. MOOSEBLOOD (CONT'D) Beeeeeeeeeeeeee! BARRY Moose blood guy! Bee Movie - JS REVISIONS 8/13/07 57. Barry slides toward the end of the wiper, is thrown off, but he grabs the AERIAL and hangs on for dear life. Barry looks across and sees a CRICKET on another vehicle in the exact same predicament. They look at each other and SCREAM in unison. BARRY AND CRICKET Aaaaaaaaaah! ANOTHER BUG grabs onto the aerial, and screams as well. INT. TRUCK CAB - SAME TIME DRIVER You hear something? TRUCKER PASSENGER Like what? DRIVER Like tiny screaming. TRUCKER PASSENGER Turn off the radio. The driver reaches down and PRESSES a button, lowering the aerial. EXT. TRUCK WINDSHIELD - SAME TIME Barry and the other bug do a “choose up” to the bottom, Barry wins. BARRY Aha! Then he finally has to let go and gets thrown into the truck horn atop cab. Mooseblood is inside. MOOSEBLOOD Hey, what’s up bee boy? BARRY Hey, Blood! DISSOLVE TO: Bee Movie - JS REVISIONS 8/13/07 58. INT. TRUCK HORN - LATER BARRY ...and it was just an endless row of honey jars as far as the eye could see. MOOSEBLOOD Wow. BARRY So I’m just assuming wherever this honey truck goes, that’s where they’re getting it. I mean, that honey’s ours! MOOSEBLOOD Bees hang tight. BARRY Well, we’re all jammed in there. It’s a close community. MOOSEBLOOD Not us, man. We’re on our own. Every mosquito is on his own. BARRY But what if you get in trouble? MOOSEBLOOD Trouble? You're a mosquito. You're in trouble! Nobody likes us. They’re just all smacking. People see a mosquito, smack, smack! BARRY At least you’re out in the world. You must meet a lot of girls. MOOSEBLOOD Mosquito girls try to trade up; get with a moth, dragonfly...mosquito girl don’t want no mosquito. A BLOOD MOBILE pulls up alongside. MOOSEBLOOD (CONT'D) Whoa, you have got to be kidding me. Mooseblood’s about to leave the building. So long bee. Bee Movie - JS REVISIONS 8/13/07 59. Mooseblood EXITS the horn, and jumps onto the blood mobile. MOOSEBLOOD (CONT'D) Hey guys. I knew I’d catch you all down here. Did you bring your crazy straws? CUT TO: SEQ. 1900 - “THE APIARY” EXT. APIARY - LATER Barry sees a SIGN, “Honey Farms” The truck comes to a stop. SFX: The Honey farms truck blares its horn. Barry flies out, lands on the hood. ANGLE ON: Two BEEKEEPERS, FREDDY and ELMO, walking around to the back of the gift shop. Barry follows them, and lands in a nearby tree FREDDY ...then we throw it in some jars, slap a label on it, and it’s pretty much pure profit. BARRY What is this place? ELMO Bees got a brain the size of a pinhead. FREDDY They are pinheads. The both LAUGH. ANGLE ON: Barry REACTING. They arrive at the back of the shop where one of them opens a SMOKER BOX. FREDDY (CONT’D) Hey, check out the new smoker. Bee Movie - JS REVISIONS 8/13/07 60. ELMO Oh, Sweet. That’s the one you want. FREDDY The Thomas 3000. BARRY Smoker? FREDDY 90 puffs a minute, semi-automatic. Twice the nicotine, all the tar. They LAUGH again, nefariously. FREDDY (CONT’D) Couple of breaths of this, and it knocks them right out. They make the honey, and we make the money. BARRY “They make the honey, and we make the money?” Barry climbs onto the netting of Freddy’s hat. He climbs up to the brim and looks over the edge. He sees the apiary boxes as Freddy SMOKES them. BARRY (CONT'D) Oh my. As Freddy turns around, Barry jumps into an open apiary box, and into an apartment. HOWARD and FRAN are just coming to from the smoking. BARRY (CONT’D) What’s going on? Are you okay? HOWARD Yeah, it doesn’t last too long. HE COUGHS a few times. BARRY How did you two get here? Do you know you’re in a fake hive with fake walls? HOWARD (pointing to a picture on the wall) Bee Movie - JS REVISIONS 8/13/07 61. Our queen was moved here, we had no choice. BARRY (looking at a picture on the wall) This is your queen? That’s a man in women’s clothes. That’s a dragqueen! The other wall opens. Barry sees the hundreds of apiary boxes. BARRY (CONT'D) What is this? Barry pulls out his camera, and starts snapping. BARRY (CONT’D) Oh no. There’s hundreds of them. (V.O, as Barry takes pictures) Bee honey, our honey, is being brazenly stolen on a massive scale. CUT TO: SEQ. 2100 - “BARRY TELLS FAMILY” INT. BARRY’S PARENT’S HOUSE - LIVING ROOM - LATER Barry has assembled his parents, Adam, and Uncle Carl. BARRY This is worse than anything the bears have done to us. And I intend to do something about it. JANET BENSON Oh Barry, stop. MARTIN BENSON Who told you that humans are taking our honey? That’s just a rumor. BARRY Do these look like rumors? Barry throws the PICTURES on the table. Uncle Carl, cleaning his glasses with his shirt tail, digs through a bowl of nuts with his finger. Bee Movie - JS REVISIONS 8/13/07 62. HOWARD (CONT'D) UNCLE CARL That’s a conspiracy theory. These are obviously doctored photos. JANET BENSON Barry, how did you get mixed up in all this? ADAM (jumping up) Because he’s been talking to humans! JANET BENSON Whaaat? MARTIN BENSON Talking to humans?! Oh Barry. ADAM He has a human girlfriend and they make out! JANET BENSON Make out? Barry? BARRY We do not. ADAM You wish you could. BARRY Who’s side are you on? ADAM The bees! Uncle Carl stands up and pulls his pants up to his chest. UNCLE CARL I dated a cricket once in San Antonio. Man, those crazy legs kept me up all night. Hotcheewah! JANET BENSON Barry, this is what you want to do with your life? BARRY This is what I want to do for all our lives. Nobody works harder than bees. Bee Movie - JS REVISIONS 8/13/07 63. Dad, I remember you coming home some nights so overworked, your hands were still stirring. You couldn’t stop them. MARTIN BENSON Ehhh... JANET BENSON (to Martin) I remember that. BARRY What right do they have to our hardearned honey? We’re living on two cups a year. They’re putting it in lip balm for no reason what-soever. MARTIN BENSON Even if it’s true, Barry, what could one bee do? BARRY I’m going to sting them where it really hurts. MARTIN BENSON In the face? BARRY No. MARTIN BENSON In the eye? That would really hurt. BARRY No. MARTIN BENSON Up the nose? That’s a killer. BARRY No. There’s only one place you can sting the humans. One place where it really matters. CUT TO: SEQ. 2300 - “HIVE AT 5 NEWS/BEE LARRY KING” Bee Movie - JS REVISIONS 8/13/07 64. BARRY (CONT'D) INT. NEWS STUDIO - DAY DRAMATIC NEWS MUSIC plays as the opening news sequence rolls. We see the “Hive at Five” logo, followed by shots of past news events: A BEE freeway chase, a BEE BEARD protest rally, and a BEAR pawing at the hive as the BEES flee in panic. BOB BUMBLE (V.O.) Hive at Five, the hive’s only full hour action news source... SHOTS of NEWSCASTERS flash up on screen. BOB BUMBLE (V.O.) (CONT'D) With Bob Bumble at the anchor desk... BOB has a big shock of anchorman hair, gray temples and overly white teeth. BOB BUMBLE (V.O.) (CONT'D) ...weather with Storm Stinger, sports with Buzz Larvi, and Jeanette Chung. JEANETTE is an Asian bee. BOB BUMBLE (CONT'D) Good evening, I’m Bob Bumble. JEANETTE CHUNG And I’m Jeanette Chung. BOB BUMBLE Our top story, a tri-county bee, Barry Benson... INSERT: Barry’s graduation picture. BOB BUMBLE (CONT'D) ...is saying he intends to sue the human race for stealing our honey, packaging it, and profiting from it illegally. CUT TO: Bee Movie - JS REVISIONS 8/13/07 65. INT. BEENN STUDIO - BEE LARRY KING LIVE BEE LARRY KING, wearing suspenders and glasses, is interviewing Barry. A LOWER-THIRD CHYRON reads: “Bee Larry King Live.” BEE LARRY KING Don’t forget, tomorrow night on Bee Larry King, we are going to have three former Queens all right here in our studio discussing their new book, “Classy Ladies,” out this week on Hexagon. (to Barry) Tonight, we’re talking to Barry Benson. Did you ever think, I’m just a kid from the hive, I can’t do this? BARRY Larry, bees have never been afraid to change the world. I mean, what about Bee-Columbus? Bee-Ghandi? Be-geesus? BEE LARRY KING Well, where I’m from you wouldn’t think of suing humans. We were thinking more like stick ball, candy stores. BARRY How old are you? BEE LARRY KING I want you to know that the entire bee community is supporting you in this case, which is certain to be the trial of the bee century. BARRY Thank you, Larry. You know, they have a Larry King in the human world, too. BEE LARRY KING It’s a common name. Next week on Bee Larry King... Bee Movie - JS REVISIONS 8/13/07 66. BARRY No, I mean he looks like you. And he has a show with suspenders and different colored dots behind him. BEE LARRY KING Next week on Bee Larry King... BARRY Old guy glasses, and there’s quotes along the bottom from the guest you’re watching even though you just heard them... BEE LARRY KING Bear week next week! They’re scary, they’re hairy, and they’re here live. Bee Larry King EXITS. BARRY Always leans forward, pointy shoulders, squinty eyes... (lights go out) Very Jewish. CUT TO: SEQ. 2400 - “FLOWER SHOP” INT. VANESSA’S FLOWER SHOP - NIGHT Stacks of law books are piled up, legal forms, etc. Vanessa is talking with Ken in the other room. KEN Look, in tennis, you attack at the point of weakness. VANESSA But it was my grandmother, Ken. She’s 81. KEN Honey, her backhand’s a joke. I’m not going to take advantage of that? Bee Movie - JS REVISIONS 8/13/07 67. BARRY (O.C) Quiet please. Actual work going on here. KEN Is that that same bee? BARRY (O.C) Yes it is. VANESSA I’m helping him sue the human race. KEN What? Barry ENTERS. BARRY Oh, hello. KEN Hello Bee. Barry flies over to Vanessa. VANESSA This is Ken. BARRY Yeah, I remember you. Timberland, size 10 1/2, Vibram sole I believe. KEN Why does he talk again, Hun? VANESSA (to Ken, sensing the tension) Listen, you’d better go because we’re really busy working. KEN But it’s our yogurt night. VANESSA (pushing him out the door) Oh...bye bye. She CLOSES the door. KEN Why is yogurt night so difficult?! Bee Movie - JS REVISIONS 8/13/07 68. Vanessa ENTERS the back room carrying coffee. VANESSA Oh you poor thing, you two have been at this for hours. BARRY Yes, and Adam here has been a huge help. ANGLE ON: A EMPTY CINNABON BOX with Adam asleep inside, covered in frosting. VANESSA How many sugars? BARRY Just one. I try not to use the competition. So, why are you helping me, anyway? VANESSA Bees have good qualities. BARRY (rowing on the sugar cube like a gondola) Si, Certo. VANESSA And it feels good to take my mind off the shop. I don’t know why, instead of flowers, people are giving balloon bouquets now. BARRY Yeah, those are great...if you’re 3. VANESSA And artificial flowers. BARRY (re: plastic flowers) Oh, they just get me psychotic! VANESSA Yeah, me too. BARRY The bent stingers, the pointless pollination. Bee Movie - JS REVISIONS 8/13/07 69. VANESSA Bees must hate those fake plastic things. BARRY There’s nothing worse than a daffodil that’s had work done. VANESSA (holding up the lawsuit documents) Well, maybe this can make up for it a little bit. CUT TO: EXT. VANESSA’S FLORIST SHOP They EXIT the store, and cross to the mailbox. VANESSA You know Barry, this lawsuit is a pretty big deal. BARRY I guess. VANESSA Are you sure that you want to go through with it? BARRY Am I sure? (kicking the envelope into the mailbox) When I’m done with the humans, they won’t be able to say, “Honey, I’m home,” without paying a royalty. CUT TO: SEQ. 2700 - “MEET MONTGOMERY” EXT. MANHATTAN COURTHOUSE - DAY P.O.V SHOT - A camera feed turns on, revealing a newsperson. Bee Movie - JS REVISIONS 8/13/07 70. PRESS PERSON #2 (talking to camera) Sarah, it’s an incredible scene here in downtown Manhattan where all eyes and ears of the world are anxiously waiting, because for the first time in history, we’re going to hear for ourselves if a honey bee can actually speak. ANGLE ON: Barry, Vanessa, and Adam getting out of the cab. The press spots Barry and Vanessa and pushes in. Adam sits on Vanessa’s shoulder. INT. COURTHOUSE - CONTINUOUS Barry, Vanessa, and Adam sit at the Plaintiff’s Table. VANESSA (turns to Barry) What have we gotten into here, Barry? BARRY I don’t know, but it’s pretty big, isn’t it? ADAM I can’t believe how many humans don’t have to be at work during the day. BARRY Hey, you think these billion dollar multinational food companies have good lawyers? CUT TO: EXT. COURTHOUSE STEPS - CONTINUOUS A BIG BLACK CAR pulls up. ANGLE ON: the grill filling the frame. We see the “L.T.M” monogram on the hood ornament. The defense lawyer, LAYTON T. MONTGOMERY comes out, squashing a bug on the pavement. CUT TO: Bee Movie - JS REVISIONS 8/13/07 71. INT. COURTHOUSE - CONTINUOUS Barry SHUDDERS. VANESSA What’s the matter? BARRY I don’t know. I just got a chill. Montgomery ENTERS. He walks by Barry’s table shaking a honey packet. MONTGOMERY Well, if it isn’t the B-Team. (re: the honey packet) Any of you boys work on this? He CHUCKLES. The JUDGE ENTERS. SEQ. 3000 - “WITNESSES” BAILIFF All rise! The Honorable Judge Bumbleton presiding. JUDGE (shuffling papers) Alright...Case number 4475, Superior Court of New York. Barry Bee Benson vs. the honey industry, is now in session. Mr. Montgomery, you are representing the five major food companies, collectively. ANGLE ON: Montgomery’s BRIEFCASE. It has an embossed emblem of an EAGLE, holding a gavel in one talon and a briefcase in the other. MONTGOMERY A privilege. JUDGE Mr. Benson. Barry STANDS. JUDGE (CONT’D) You are representing all bees of the world? Bee Movie - JS REVISIONS 8/13/07 72. Montgomery, the stenographer, and the jury lean in. CUT TO: EXT. COURTHOUSE - CONTINUOUS The spectators outside freeze. The helicopters angle forward to listen closely. CUT TO: INT. COURTHOUSE BARRY Bzzz bzzz bzzz...Ahh, I’m kidding, I’m kidding. Yes, your honor. We are ready to proceed. ANGLE ON: Courtroom hub-bub. JUDGE And Mr. Montgomery, your opening statement, please. Montgomery rises. MONTGOMERY (grumbles, clears his throat) Ladies and gentlemen of the jury. My grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we were to live in the topsy-turvy world Mr. Benson imagines, just think of what it would mean. Maybe I would have to negotiate with the silk worm for the elastic in my britches. Talking bee. How do we know this isn’t some sort of holographic motion picture capture Hollywood wizardry? They could be using laser beams, robotics, ventriloquism, cloning...for all we know he could be on steroids! Montgomery leers at Barry, who moves to the stand. Bee Movie - JS REVISIONS 8/13/07 73. JUDGE Mr. Benson? Barry makes his opening statement. BARRY Ladies and Gentlemen of the jury, there’s no trickery here. I’m just an ordinary bee. And as a bee, honey’s pretty important to me. It’s important to all bees. We invented it, we make it, and we protect it with our lives. Unfortunately, there are some people in this room who think they can take whatever they want from us cause we’re the little guys. And what I’m hoping is that after this is all over, you’ll see how by taking our honey, you’re not only taking away everything we have, but everything we are. ANGLE ON: Vanessa smiling. ANGLE ON: The BEE GALLERY wiping tears away. CUT TO: INT. BENSON HOUSE Barry’s family is watching the case on TV. JANET BENSON Oh, I wish he would dress like that all the time. So nice... CUT TO: INT. COURTROOM - LATER JUDGE Call your first witness. CUT TO: Bee Movie - JS REVISIONS 8/13/07 74. INT. COURTHOUSE - LATER BARRY So, Mr. Klauss Vanderhayden of Honey Farms. Pretty big company you have there? MR. VANDERHAYDEN I suppose so. BARRY And I see you also own HoneyBurton, and Hon-Ron. MR. VANDERHAYDEN Yes. They provide beekeepers for our farms. BARRY Beekeeper. I find that to be a very disturbing term, I have to say. I don’t imagine you employ any bee free-ers, do you? MR. VANDERHAYDEN No. BARRY I’m sorry. I couldn’t hear you. MR. VANDERHAYDEN (louder) No. BARRY No. Because you don’t free bees. You keep bees. And not only that, it seems you thought a bear would be an appropriate image for a jar of honey? MR. VANDERHAYDEN Well, they’re very lovable creatures. Yogi-bear, Fozzy-bear, Build-a-bear. BARRY Yeah, you mean like this?! Vanessa and the SUPERINTENDANT from her building ENTER with a GIANT FEROCIOUS GRIZZLY BEAR. He has a neck collar and chains extending from either side. Bee Movie - JS REVISIONS 8/13/07 75. By pulling the chains, they bring him directly in front of Vanderhayden. The bear LUNGES and ROARS. BARRY (CONT'D) Bears kill bees! How would you like his big hairy head crashing into your living room? Biting into your couch, spitting out your throwpillows...rowr, rowr! The bear REACTS. BEAR Rowr!! BARRY Okay, that’s enough. Take him away. Vanessa and the Superintendant pull the bear out of the courtroom. Vanderhayden TREMBLES. The judge GLARES at him. CUT TO: INT. COURTROOM- A LITTLE LATER Barry questions STING. BARRY So, Mr. Sting. Thank you for being here. Your name intrigues me, I have to say. Where have I heard it before? STING I was with a band called The Police. BARRY But you've never been a police officer of any kind, have you? STING No, I haven't. Bee Movie - JS REVISIONS 8/13/07 76. BARRY No, you haven’t. And so, here we have yet another example of bee culture being casually stolen by a human for nothing more than a prance-about stage name. STING Oh please. BARRY Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say, (looking in folder) Mr. Gordon M. Sumner? The jury GASPS. MONTGOMERY (to his aides) That’s not his real name? You idiots! CUT TO: INT. COURTHOUSE- LATER BARRY Mr. Liotta, first may I offer my belated congratulations on your Emmy win for a guest spot on E.R. in 2005. LIOTTA Thank you. Thank you. Liotta LAUGHS MANIACALLY. BARRY I also see from your resume that you’re devilishly handsome, but with a churning inner turmoil that’s always ready to blow. LIOTTA I enjoy what I do. Is that a crime? Bee Movie - JS REVISIONS 8/13/07 77. BARRY Not yet it isn’t. But is this what it’s come to for you, Mr. Liotta? Exploiting tiny helpless bees so you don’t have to rehearse your part, and learn your lines, Sir? LIOTTA Watch it Benson, I could blow right now. BARRY This isn’t a goodfella. This is a badfella! LIOTTA (exploding, trying to smash Barry with the Emmy) Why doesn’t someone just step on this little creep and we can all go home? You’re all thinking it. Say it! JUDGE Order! Order in this courtroom! A MONTAGE OF NEWSPAPER HEADLINES FOLLOWS: NEW YORK POST: “Bees to Humans: Buzz Off”. NEW YORK TELEGRAM: “Sue Bee”. DAILY VARIETY: “Studio Dumps Liotta Project. Slams Door on Unlawful Entry 2.” CUT TO: SEQ. 3175 - “CANDLELIGHT DINNER” INT. VANESSA’S APARTMENT Barry and Vanessa are having a candle light dinner. Visible behind Barry is a “LITTLE MISSY” SET BOX, with the flaps open. BARRY Well, I just think that was awfully nice of that bear to pitch in like that. Bee Movie - JS REVISIONS 8/13/07 78. VANESSA I’m telling you, I think the jury’s on our side. BARRY Are we doing everything right...you know, legally? VANESSA I’m a florist. BARRY Right, right. Barry raises his glass. BARRY (CONT’D) Well, here’s to a great team. VANESSA To a great team. They toast. Ken ENTERS KEN Well hello. VANESSA Oh...Ken. BARRY Hello. VANESSA I didn’t think you were coming. KEN No, I was just late. I tried to call. But, (holding his cell phone) the battery... VANESSA I didn’t want all this to go to waste, so I called Barry. Luckily he was free. BARRY Yeah. KEN (gritting his teeth) Oh, that was lucky. Bee Movie - JS REVISIONS 8/13/07 79. VANESSA Well, there’s still a little left. I could heat it up. KEN Yeah, heat it up. Sure, whatever. Vanessa EXITS. Ken and Barry look at each other as Barry eats. BARRY So, I hear you’re quite a tennis player. I’m not much for the game myself. I find the ball a little grabby. KEN That’s where I usually sit. Right there. VANESSA (O.C) Ken, Barry was looking at your resume, and he agreed with me that “eating with chopsticks” isn’t really a special skill. KEN (to Barry) You think I don’t see what you’re doing? BARRY Hey look, I know how hard it is trying to find the right job. We certainly have that in common. KEN Do we? BARRY Well, bees have 100% employment, of course. But we do jobs like taking the crud out. KEN That’s just what I was thinking about doing. Ken holds his table knife up. It slips out of his hand. He goes under the table to pick it up. Bee Movie - JS REVISIONS 8/13/07 80. VANESSA Ken, I let Barry borrow your razor for his fuzz. I hope that was alright. Ken hits his head on the table. BARRY I’m going to go drain the old stinger. KEN Yeah, you do that. Barry EXITS to the bathroom, grabbing a small piece of a VARIETY MAGAZINE on the way. BARRY Oh, look at that. Ken slams the champagne down on the table. Ken closes his eyes and buries his face in his hands. He grabs a magazine on the way into the bathroom. SEQ. 2800 - “BARRY FIGHTS KEN” INT. BATHROOM - CONTINUOUS Ken ENTERS, closes the door behind him. He’s not happy. Barry is washing his hands. He glances back at Ken. KEN You know, I’ve just about had it with your little mind games. BARRY What’s that? KEN Italian Vogue. BARRY Mamma Mia, that’s a lot of pages. KEN It’s a lot of ads. BARRY Remember what Van said. Why is your life any more valuable than mine? Bee Movie - JS REVISIONS 8/13/07 81. KEN It’s funny, I just can’t seem to recall that! Ken WHACKS at Barry with the magazine. He misses and KNOCKS EVERYTHING OFF THE VANITY. Ken grabs a can of AIR FRESHENER. KEN (CONT'D) I think something stinks in here. He sprays at Barry. BARRY I love the smell of flowers. KEN Yeah? How do you like the smell of flames? Ken lights the stream. BARRY Not as much. Barry flies in a circle. Ken, trying to stay with him, spins in place. ANGLE ON: Flames outside the bathroom door. Ken slips on the Italian Vogue, falls backward into the shower, pulling down the shower curtain. The can hits him in the head, followed by the shower curtain rod, and the rubber duck. Ken reaches back, grabs the handheld shower head. He whips around, looking for Barry. ANGLE ON: A WATERBUG near the drain. WATERBUG Waterbug. Not taking sides. Barry is on the toilet tank. He comes out from behind a shampoo bottle, wearing a chapstick cap as a helmet. BARRY Ken, look at me! I’m wearing a chapstick hat. This is pathetic. ANGLE ON: Ken turning the hand shower nozzle from “GENTLE”, to “TURBO”, to “LETHAL”. Bee Movie - JS REVISIONS 8/13/07 82. KEN I’ve got issues! Ken fires the water at Barry, knocking him into the toilet. The items from the vanity (emory board, lipstick, eye curler, etc.) are on the toilet seat. Ken looks down at Barry. KEN (CONT'D) Well well well, a royal flush. BARRY You’re bluffing. KEN Am I? Ken flushes the toilet. Barry grabs the Emory board and uses it to surf. He puts his hand in the water while he’s surfing. Some water splashes on Ken. BARRY Surf’s up, dude! KEN Awww, poo water! He does some skate board-style half-pipe riding. Barry surfs out of the toilet. BARRY That bowl is gnarly. Ken tries to get a shot at him with the toilet brush. KEN Except for those dirty yellow rings. Vanessa ENTERS. VANESSA Kenneth! What are you doing? KEN You know what? I don’t even like honey! I don’t eat it! VANESSA We need to talk! Bee Movie - JS REVISIONS 8/13/07 83. She pulls Ken out by his ear. Ken glares at Barry. CUT TO: INT. HALLWAY - CONTINUOUS VANESSA He’s just a little bee. And he happens to be the nicest bee I’ve met in a long time. KEN Long time? What are you talking about? Are there other bugs in your life? VANESSA No, but there are other things bugging me in life. And you’re one of them! KEN Fine! Talking bees, no yogurt night...my nerves are fried from riding on this emotional rollercoaster. VANESSA Goodbye, Ken. KEN Augh! VANESSA Whew! Ken EXITS, then re-enters frame. KEN And for your information, I prefer sugar-free, artificial sweeteners, made by man! He EXITS again. The DOOR SLAMS behind him. VANESSA (to Barry) I’m sorry about all that. Ken RE-ENTERS. Bee Movie - JS REVISIONS 8/13/07 84. KEN I know it’s got an aftertaste! I like it! BARRY (re: Ken) I always felt there was some kind of barrier between Ken and me. (puts his hands in his pockets) I couldn’t overcome it. Oh well. VANESSA Are you going to be okay for the trial tomorrow? BARRY Oh, I believe Mr. Montgomery is about out of ideas. CUT TO: SEQ. 3300 - “ADAM STINGS MONTY” INT. COURTROOM - NEXT DAY ANGLE ON: Medium shot of Montgomery standing at his table. MONTGOMERY We would like to call Mr. Barry Benson Bee to the stand. ADAM (whispering to Vanessa) Now that’s a good idea. (to Barry) You can really see why he’s considered one of the very best lawyers-- Oh. Barry rolls his eyes. He gets up, takes the stand. A juror in a striped shirt APPLAUDS. MR. GAMMIL (whispering) Layton, you’ve got to weave some magic with this jury, or it’s going to be all over. Montgomery is holding a BOOK, “The Secret Life of Bees”. Bee Movie - JS REVISIONS 8/13/07 85. MONTGOMERY (confidently whispering) Oh, don’t worry Mr. Gammil. The only thing I have to do to turn this jury around is to remind them of what they don’t like about bees. (to Gammil) You got the tweezers? Mr. Gammil NODS, and pats his breast pocket. MR. GAMMIL Are you allergic? MONTGOMERY Only to losing, son. Only to losing. Montgomery approaches the stand. MONTGOMERY (CONT’D) Mr. Benson Bee. I’ll ask you what I think we’d all like to know. What exactly is your relationship to that woman? Montgomery points to Vanessa. BARRY We’re friends. MONTGOMERY Good friends? BARRY Yes. MONTGOMERY (softly in Barry’s face) How good? BARRY What? MONTGOMERY Do you live together? BARRY Wait a minute, this isn’t about-- Bee Movie - JS REVISIONS 8/13/07 86. MONTGOMERY Are you her little... (clearing throat) ... bed bug? BARRY (flustered) Hey, that’s not the kind of-- MONTGOMERY I’ve seen a bee documentary or two. Now, from what I understand, doesn’t your Queen give birth to all the bee children in the hive? BARRY Yeah, but-- MONTGOMERY So those aren’t even your real parents! ANGLE ON: Barry’s parents. MARTIN BENSON Oh, Barry. BARRY Yes they are! ADAM Hold me back! Vanessa holds him back with a COFFEE STIRRER. Montgomery points to Barry’s parents. MONTGOMERY You’re an illegitimate bee, aren’t you Benson? ADAM He’s denouncing bees! All the bees in the courtroom start to HUM. They’re agitated. MONTGOMERY And don’t y’all date your cousins? Bee Movie - JS REVISIONS 8/13/07 87. VANESSA (standing, letting go of Adam) Objection! Adam explodes from the table and flies towards Montgomery. ADAM I’m going to pin cushion this guy! Montgomery turns around and positions himself by the judge’s bench. He sticks his butt out. Montgomery winks at his team. BARRY Adam, don’t! It’s what he wants! Adam shoves Barry out of the way. Adam STINGS Montgomery in the butt. The jury REACTS, aghast. MONTGOMERY Ow! I’m hit! Oh, lordy, I am hit! The judge BANGS her gavel. JUDGE Order! Order! Please, Mr. Montgomery. MONTGOMERY The venom! The venom is coursing through my veins! I have been felled by a wing-ed beast of destruction. You see? You can’t treat them like equals. They’re strip-ed savages! Stinging’s the only thing they know! It’s their way! ANGLE ON: Adam, collapsed on the floor. Barry rushes to his side. BARRY Adam, stay with me. ADAM I can’t feel my legs. Montgomery falls on the Bailiff. BAILIFF Take it easy. Bee Movie - JS REVISIONS 8/13/07 88. MONTGOMERY Oh, what angel of mercy will come forward to suck the poison from my heaving buttocks? The JURY recoils. JUDGE Please, I will have order in this court. Order! Order, please! FADE TO: SEQ. 3400 - “ADAM AT HOSPITAL” INT. HOSPITAL - STREET LEVEL ROOM - DAY PRESS PERSON #1 (V.O) The case of the honey bees versus the human race took a pointed turn against the bees yesterday, when one of their legal team stung Layton T. Montgomery. Now here’s Don with the 5-day. A NURSE lets Barry into the room. Barry CARRIES a FLOWER. BARRY Thank you. Barry stands over Adam, in a bed. Barry lays the flower down next to him. The TV is on. BARRY (CONT'D) Hey buddy. ADAM Hey. BARRY Is there much pain? Adam has a BEE-SIZED PAINKILLER HONEY BUTTON near his head that he presses. ADAM (pressing the button) Yeah...I blew the whole case, didn’t I? Bee Movie - JS REVISIONS 8/13/07 89. BARRY Oh, it doesn’t matter. The important thing is you’re alive. You could have died. ADAM I’d be better off dead. Look at me. Adam THROWS the blanket off his lap, revealing a GREEN SANDWICH SWORD STINGER. ADAM (CONT’D) (voice cracking) They got it from the cafeteria, they got it from downstairs. In a tuna sandwich. Look, there’s a little celery still on it. BARRY What was it like to sting someone? ADAM I can’t explain it. It was all adrenaline...and then...ecstasy. Barry looks at Adam. BARRY Alright. ADAM You think that was all a trap? BARRY Of course. I’m sorry. I flew us right into this. What were we thinking? Look at us, we’re just a couple of bugs in this world. ADAM What do you think the humans will do to us if they win? BARRY I don’t know. ADAM I hear they put the roaches in motels. That doesn’t sound so bad. Bee Movie - JS REVISIONS 8/13/07 90. BARRY Adam, they check in, but they don’t check out. Adam GULPS. ADAM Oh my. ANGLE ON: the hospital window. We see THREE PEOPLE smoking outside on the sidewalk. The smoke drifts in. Adam COUGHS. ADAM (CONT’D) Say, could you get a nurse to close that window? BARRY Why? ADAM The smoke. Bees don’t smoke. BARRY Right. Bees don’t smoke. Bees don’t smoke! But some bees are smoking. Adam, that’s it! That’s our case. Adam starts putting his clothes on. ADAM It is? It’s not over? BARRY No. Get up. Get dressed. I’ve got to go somewhere. You get back the court and stall. Stall anyway you can. CUT TO: SEQ. 3500 - “SMOKING GUN” INT. COURTROOM - THE NEXT DAY Adam is folding a piece of paper into a boat. ADAM ...and assuming you’ve done step 29 correctly, you’re ready for the tub. Bee Movie - JS REVISIONS 8/13/07 91. ANGLE ON: The jury, all with paper boats of their own. JURORS Ooh. ANGLE ON: Montgomery frustrated with Gammil, who’s making a boat also. Monty crumples Gammil’s boat, and throws it at him. JUDGE Mr. Flayman? ADAM Yes? Yes, Your Honor? JUDGE Where is the rest of your team? ADAM (fumbling with his swordstinger) Well, your honor, it’s interesting. You know Bees are trained to fly kind of haphazardly and as a result quite often we don’t make very good time. I actually once heard a pretty funny story about a bee-- MONTGOMERY Your Honor, haven’t these ridiculous bugs taken up enough of this court’s valuable time? Montgomery rolls out from behind his table. He’s suspended in a LARGE BABY CHAIR with wheels. MONTGOMERY (CONT'D) How much longer are we going to allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients who have all run perfectly legitimate businesses. I move for a complete dismissal of this entire case. JUDGE Mr. Flayman, I am afraid I am going to have to consider Mr. Montgomery’s motion. Bee Movie - JS REVISIONS 8/13/07 92. ADAM But you can’t. We have a terrific case. MONTGOMERY Where is your proof? Where is the evidence? Show me the smoking gun. Barry bursts through the door. BARRY Hold it, your honor. You want a smoking gun? Here is your smoking gun. Vanessa ENTERS, holding a bee smoker Vanessa slams the beekeeper's SMOKER onto the judge’s bench. JUDGE What is that? BARRY It’s a Bee smoker. Montgomery GRABS the smoker. MONTGOMERY What, this? This harmless little contraption? This couldn’t hurt a fly, let alone a bee. He unintentionally points it towards the bee gallery, KNOCKING THEM ALL OUT. The jury GASPS. The press SNAPS pictures of them. BARRY Members of the jury, look at what has happened to bees who have never been asked, Smoking or Non? Is this what nature intended for us? To be forcibly addicted to these smoke machines in man-made wooden slat work camps? Living out our lives as honey slaves to the white man? Barry gestures dramatically towards Montgomery's racially mixed table. The BLACK LAWYER slowly moves his chair away. GAMMIL What are we going to do? Bee Movie - JS REVISIONS 8/13/07 93. MONTGOMERY (to Pross) He's playing the species card. Barry lands on the scale of justice, by the judge’s bench. It balances as he lands. BARRY Ladies and gentlemen, please, FreeThese-Bees! ANGLE ON: Jury, chanting Free the bees. JUDGE The court finds in favor of the bees. The chaos continues. Barry flies over to Vanessa, with his hand up for a “high 5”. BARRY Vanessa, we won! VANESSA Yay! I knew you could do it. Highfive! She high 5’s Barry, sending him crashing to the table. He bounces right back up. VANESSA (CONT'D) Oh, sorry. BARRY Ow!! I’m okay. Vanessa, do you know what this means? All the honey is finally going to belong to the bees. Now we won’t have to work so hard all the time. Montgomery approaches Barry, surrounded by the press. The cameras and microphones go to Montgomery. MONTGOMERY (waving a finger) This is an unholy perversion of the balance of nature, Benson! You’ll regret this. ANGLE ON: Barry’s ‘deer in headlights’ expression, as the press pushes microphones in his face. Bee Movie - JS REVISIONS 8/13/07 94. PRESS PERSON 1 Barry, how much honey do you think is out there? BARRY Alright, alright, one at a time... SARAH Barry, who are you wearing? BARRY Uhhh, my sweater is Ralph Lauren, and I have no pants. The Press follows Barry as he EXITS. ANGLE ON: Adam and Vanessa. ADAM (putting papers away) What if Montgomery’s right? VANESSA What do you mean? ADAM We’ve been living the bee way a long time. 27 million years. DISSOLVE TO: SEQ. 3600 - “HONEY ROUNDUP” EXT. HONEY FARMS APIARY - MONTAGE SARAH (V.O) Congratulations on your victory. What are you going to demand as a settlement? BARRY (V.O) (over montage) First, we’re going to demand a complete shutdown of all bee work camps. Then, we want to get back all the honey that was ours to begin with. Every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, big-headed, bad breath, stink-machine. Bee Movie - JS REVISIONS 8/13/07 95. I believe we’re all aware of what they do in the woods. We will no longer tolerate derogatory beenegative nick-names, unnecessary inclusion of honey in bogus health products, and la-dee-da tea-time human snack garnishments. MONTAGE IMAGES: Close-up on an ATF JACKET, with the YELLOW LETTERS. Camera pulls back. We see an ARMY OF BEE AND HUMAN AGENTS wearing hastily made “Alcohol, Tobacco, Firearms, and Honey” jackets. Barry supervises. The gate to Honey Farms is locked permanently. All the smokers are collected and locked up. All the bees leave the Apiary. CUT TO: EXT. ATF OUTSIDE OF SUPERMARKET - MONTAGE Agents begin YANKING honey off the supermarket shelves, and out of shopping baskets. CUT TO: EXT. NEW HIVE CITY - MONTAGE The bees tear down a honey-bear statue. CUT TO: EXT. YELLOWSTONE FOREST - MONTAGE POV of a sniper’s crosshairs. An animated BEAR character looka-like, turns his head towards camera. BARRY Wait for my signal. ANGLE ON: Barry lowering his binoculars. BARRY (CONT'D) Take him out. The sniper SHOOTS the bear. It hits him in the shoulder. The bear looks at it. He gets woozy and the honey jar falls out of his lap, an ATF&H agent catches it. Bee Movie - JS REVISIONS 8/13/07 96. BARRY (V.O) (CONT'D) ATF&H AGENT (to the bear’s pig friend) He’ll have a little nausea for a few hours, then he’ll be fine. CUT TO: EXT. STING’S HOUSE - MONTAGE ATF&H agents SLAP CUFFS on Sting, who is meditating. STING But it’s just a prance-about stage name! CUT TO: INT. A WOMAN’S SHOWER - MONTAGE A WOMAN is taking a shower, and using honey shampoo. An ATF&H agent pulls the shower curtain aside, and grabs her bottle of shampoo. The woman SCREAMS. The agent turns to the 3 other agents, and Barry. ANGLE ON: Barry looking at the label on the shampoo bottle, shaking his head and writing in his clipboard. CUT TO: EXT. SUPERMARKET CAFE - MONTAGE Another customer, an old lady having her tea with a little jar of honey, gets her face pushed down onto the table and turned to the side by two agents. One of the agents has a gun on her. OLD LADY Can’t breathe. CUT TO: EXT. CENTRAL PARK - MONTAGE An OIL DRUM of honey is connected to Barry’s hive. Bee Movie - JS REVISIONS 8/13/07 97. BARRY Bring it in, boys. CUT TO: SEQ. 3650 - “NO MORE WORK” INT. HONEX - MONTAGE ANGLE ON: The honey goes past the 3-cup hash-mark, and begins to overflow. A WORKER BEE runs up to Buzzwell. WORKER BEE 1 Mr. Buzzwell, we just passed 3 cups, and there’s gallons mores coming. I think we need to shutdown. KEYCHAIN BEE (to Buzzwell) Shutdown? We’ve never shutdown. ANGLE ON: Buzzwell overlooking the factory floor. BUZZWELL Shutdown honey production! Stop making honey! ANGLE ON: TWO BEES, each with a KEY. BUZZWELL (CONT’D) Turn your key, Sir! They turn the keys simultaneously, War Games-style, shutting down the honey machines. ANGLE ON: the Taffy-Pull machine, Centrifuge, and Krelman all slowly come to a stop. The bees look around, bewildered. WORKER BEE 5 What do we do now? A BEAT. WORKER BEE 6 Cannon ball!! He jumps into a HONEY VAT, doesn’t penetrate the surface. He looks around, and slowly sinks down to his waist. Bee Movie - JS REVISIONS 8/13/07 98. EXT. HONEX FACTORY THE WHISTLE BLOWS, and the bees all stream out the exit. CUT TO: INT. J-GATE - CONTINUOUS Lou Loduca gives orders to the pollen jocks. LOU LODUCA We’re shutting down honey production. Mission abort. CUT TO: EXT. CENTRAL PARK Jackson receives the orders, mid-pollination. JACKSON Aborting pollination and nectar detail. Returning to base. CUT TO: EXT. NEW HIVE CITY ANGLE ON: Bees, putting sun-tan lotion on their noses and antennae, and sunning themselves on the balconies of the gyms. CUT TO: EXT. CENTRAL PARK ANGLE ON: THE FLOWERS starting to DROOP. CUT TO: INT. J-GATE J-Gate is deserted. CUT TO: Bee Movie - JS REVISIONS 8/13/07 99. EXT. NEW HIVE CITY ANGLE ON: Bees sunning themselves. A TIMER DINGS, and they all turn over. CUT TO: EXT. CENTRAL PARK TIME LAPSE of Central Park turning brown. CUT TO: EXT. VANESSA’S FLORIST SHOP CLOSE-UP SHOT: Vanessa writes “Sorry. No more flowers.” on a “Closed” sign, an turns it facing out. CUT TO: SEQ. 3700 - “IDLE HIVE” EXT. NEW HIVE CITY - DAY Barry flies at high speed. TRACKING SHOT into the hive, through the lobby of Honex, and into Adam’s office. CUT TO: INT. ADAM’S OFFICE - CONTINUOUS Barry meets Adam in his office. Adam’s office is in disarray. There are papers everywhere. He’s filling up his cardboard hexagon box. BARRY (out of breath) Adam, you wouldn’t believe how much honey was out there. ADAM Oh yeah? BARRY What’s going on around here? Where is everybody? Are they out celebrating? Bee Movie - JS REVISIONS 8/13/07 100. ADAM (exiting with a cardboard box of belongings) No, they’re just home. They don’t know what to do. BARRY Hmmm. ADAM They’re laying out, they’re sleeping in. I heard your Uncle Carl was on his way to San Antonio with a cricket. BARRY At least we got our honey back. They walk through the empty factory. ADAM Yeah, but sometimes I think, so what if the humans liked our honey? Who wouldn’t? It’s the greatest thing in the world. I was excited to be a part of making it. ANGLE ON: Adam’s desk on it’s side in the hall. ADAM (CONT’D) This was my new desk. This was my new job. I wanted to do it really well. And now...and now I can’t. Adam EXITS. CUT TO: SEQ. 3900 - “WORLD WITHOUT BEES” INT. STAIRWELL Vanessa and Barry are walking up the stairs to the roof. BARRY I don’t understand why they’re not happy. We have so much now. I thought their lives would be better. Bee Movie - JS REVISIONS 8/13/07 101. VANESSA Hmmm. BARRY They’re doing nothing. It’s amazing, honey really changes people. VANESSA You don’t have any idea what’s going on, do you? BARRY What did you want to show me? VANESSA This. They reach the top of the stairs. Vanessa opens the door. CUT TO: EXT. VANESSA’S ROOFTOP - CONTINUOUS Barry sees Vanessa’s flower pots and small garden have all turned brown. BARRY What happened here? VANESSA That is not the half of it... Vanessa turns Barry around with her two fingers, revealing the view of Central Park, which is also all brown. BARRY Oh no. Oh my. They’re all wilting. VANESSA Doesn’t look very good, does it? BARRY No. VANESSA And who’s fault do you think that is? Bee Movie - JS REVISIONS 8/13/07 102. BARRY Mmmm...you know, I’m going to guess, bees. VANESSA Bees? BARRY Specifically me. I guess I didn’t think that bees not needing to make honey would affect all these other things. VANESSA And it’s not just flowers. Fruits, vegetables...they all need bees. BARRY Well, that’s our whole SAT test right there. VANESSA So, you take away the produce, that affects the entire animal kingdom. And then, of course... BARRY The human species? VANESSA (clearing throat) Ahem! BARRY Oh. So, if there’s no more pollination, it could all just go south here, couldn’t it? VANESSA And I know this is also partly my fault. Barry takes a long SIGH. BARRY How about a suicide pact? VANESSA (not sure if he’s joking) How would we do it? BARRY I’ll sting you, you step on me. Bee Movie - JS REVISIONS 8/13/07 103. VANESSA That just kills you twice. BARRY Right, right. VANESSA Listen Barry. Sorry but I’ve got to get going. She EXITS. BARRY (looking out over the park) Had to open my mouth and talk... (looking back) Vanessa..? Vanessa is gone. CUT TO: SEQ. 3935 - “GOING TO PASADENA” EXT. NY STREET - CONTINUOUS Vanessa gets into a cab. Barry ENTERS. BARRY Vanessa. Why are you leaving? Where are you going? VANESSA To the final Tournament of Roses parade in Pasadena. They moved it up to this weekend because all the flowers are dying. It’s the last chance I’ll ever have to see it. BARRY Vanessa, I just want to say I’m sorry. I never meant it to turn out like this. VANESSA I know. Me neither. Vanessa cab drives away. Bee Movie - JS REVISIONS 8/13/07 104. BARRY (chuckling to himself) Tournament of Roses. Roses can’t do sports. Wait a minute...roses. Roses? Roses!? Vanessa! Barry follows shortly after. He catches up to it, and he pounds on the window. Barry follows shortly after Vanessa’s cab. He catches up to it, and he pounds on the window. INT. TAXI - CONTINUOUS Barry motions for her to roll the window down. She does so. BARRY Roses?! VANESSA Barry? BARRY (as he flies next to the cab) Roses are flowers. VANESSA Yes, they are. BARRY Flowers, bees, pollen! VANESSA I know. That’s why this is the last parade. BARRY Maybe not. The cab starts pulling ahead of Barry. BARRY (CONT'D) (re: driver) Could you ask him to slow down? VANESSA Could you slow down? The cabs slows. Barry flies in the window, and lands in the change box, which closes on him. Bee Movie - JS REVISIONS 8/13/07 105. VANESSA (CONT'D) Barry! Vanessa lets him out. Barry stands on the change box, in front of the driver’s license. BARRY Okay, I made a huge mistake! This is a total disaster, and it’s all my fault! VANESSA Yes, it kind of is. BARRY I’ve ruined the planet. And, I wanted to help with your flower shop. Instead, I’ve made it worse. VANESSA Actually, it’s completely closed down. BARRY Oh, I thought maybe you were remodeling. Nonetheless, I have another idea. And it’s greater than all my previous great ideas combined. VANESSA I don’t want to hear it. Vanessa closes the change box on Barry. BARRY (opening it again) Alright, here’s what I’m thinking. They have the roses, the roses have the pollen. I know every bee, plant, and flower bud in this park. All we’ve got to do is get what they’ve got back here with what we’ve got. VANESSA Bees... BARRY Park... VANESSA Pollen... Bee Movie - JS REVISIONS 8/13/07 106. BARRY Flowers... VANESSA Repollination! BARRY (on luggage handle, going up) Across the nation! CUT TO: SEQ. 3950 - “ROSE PARADE” EXT. PASADENA PARADE BARRY (V.O) Alright. Tournament of Roses. Pasadena, California. They’ve got nothing but flowers, floats, and cotton candy. Security will be tight. VANESSA I have an idea. CUT TO: EXT. FLOAT STAGING AREA ANGLE ON: Barry and Vanessa approaching a HEAVILY ARMED GUARD in front of the staging area. VANESSA Vanessa Bloome, FTD. Official floral business. He leans in to look at her badge. She SNAPS IT SHUT, VANESSA (CONT’D) Oh, it’s real. HEAVILY ARMED GUARD Sorry ma’am. That’s a nice brooch, by the way. VANESSA Thank you. It was a gift. Bee Movie - JS REVISIONS 8/13/07 107. They ENTER the staging area. BARRY (V.O) Then, once we’re inside, we just pick the right float. VANESSA How about the Princess and the Pea? BARRY Yeah. VANESSA I can be the princess, and-- BARRY ...yes, I think-- VANESSA You could be-- BARRY I’ve-- VANESSA The pea. BARRY Got it. CUT TO: EXT. FLOAT STAGING AREA - A FEW MOMENTS LATER Barry, dressed as a PEA, flies up and hovers in front of the princess on the “Princess and the Pea” float. The float is sponsored by Inflat-a-bed and a SIGN READS: “Inflat-a-bed: If it blows, it’s ours.” BARRY Sorry I’m late. Where should I sit? PRINCESS What are you? BARRY I believe I’m the pea. PRINCESS The pea? It’s supposed to be under the mattresses. Bee Movie - JS REVISIONS 8/13/07 108. BARRY Not in this fairy tale, sweetheart. PRINCESS I’m going to go talk to the marshall. BARRY You do that. This whole parade is a fiasco! She EXITS. Vanessa removes the step-ladder. The princess FALLS. Barry and Vanessa take off in the float. BARRY (CONT’D) Let’s see what this baby will do. ANGLE ON: Guy with headset talking to drivers. HEADSET GUY Hey! The float ZOOMS by. A young CHILD in the stands, TIMMY, cries. CUT TO: EXT. FLOAT STAGING AREA - A FEW MOMENTS LATER ANGLE ON: Vanessa putting the princess hat on. BARRY (V.O) Then all we do is blend in with traffic, without arousing suspicion. CUT TO: EXT. THE PARADE ROUTE - CONTINUOUS The floats go flying by the crowds. Barry and Vanessa’s float CRASHES through the fence. CUT TO: Bee Movie - JS REVISIONS 8/13/07 109. EXT. LA FREEWAY Vanessa and Barry speed, dodging and weaving, down the freeway. BARRY (V.O) And once we’re at the airport, there’s no stopping us. CUT TO: EXT. LAX AIRPORT Barry and Vanessa pull up to the curb, in front of an TSA AGENT WITH CLIPBOARD. TSA AGENT Stop. Security. Did you and your insect pack your own float? VANESSA (O.C) Yes. TSA AGENT Has this float been in your possession the entire time? VANESSA (O.C) Since the parade...yes. ANGLE ON: Barry holding his shoes. TSA AGENT Would you remove your shoes and everything in your pockets? Can you remove your stinger, Sir? BARRY That’s part of me. TSA AGENT I know. Just having some fun. Enjoy your flight. CUT TO: EXT. RUNWAY Barry and Vanessa’s airplane TAKES OFF. Bee Movie - JS REVISIONS 8/13/07 110. BARRY (O.C) Then, if we’re lucky, we’ll have just enough pollen to do the job. DISSOLVE TO: SEQ. 4025 - “COCKPIT FIGHT” INT. AIRPLANE Vanessa is on the aisle. Barry is on a laptop calculating flowers, pollen, number of bees, airspeed, etc. He does a “Stomp” dance on the keyboard. BARRY Can you believe how lucky we are? We have just enough pollen to do the job. I think this is going to work, Vanessa. VANESSA It’s got to work. PILOT (V.O) Attention passengers. This is Captain Scott. I’m afraid we have a bit of bad weather in the New York area. And looks like we’re going to be experiencing a couple of hours delay. VANESSA Barry, these are cut flowers with no water. They’ll never make it. BARRY I’ve got to get up there and talk to these guys. VANESSA Be careful. Barry flies up to the cockpit door. CUT TO: INT. COCKPIT - CONTINUOUS A female flight attendant, ANGELA, is in the cockpit with the pilots. Bee Movie - JS REVISIONS 8/13/07 111. There’s a KNOCK at the door. BARRY (C.O) Hey, can I get some help with this Sky Mall Magazine? I’d like to order the talking inflatable travel pool filter. ANGELA (to the pilots, irritated) Excuse me. CUT TO: EXT. CABIN - CONTINUOUS Angela opens the cockpit door and looks around. She doesn’t see anybody. ANGLE ON: Barry hidden on the yellow and black “caution” stripe. As Angela looks around, Barry zips into the cockpit. CUT TO: INT. COCKPIT BARRY Excuse me, Captain. I am in a real situation here... PILOT (pulling an earphone back, to the co-pilot) What did you say, Hal? CO-PILOT I didn’t say anything. PILOT (he sees Barry) Ahhh! Bee! BARRY No, no! Don’t freak out! There’s a chance my entire species-- CO-PILOT (taking off his earphones) Ahhh! Bee Movie - JS REVISIONS 8/13/07 112. The pilot grabs a “DUSTBUSTER” vacuum cleaner. He aims it around trying to vacuum up Barry. The co-pilot faces camera, as the pilot tries to suck Barry up. Barry is on the other side of the co-pilot. As they dosey-do, the toupee of the co-pilot begins to come up, still attached to the front. CO-PILOT (CONT'D) What are you doing? Stop! The toupee comes off the co-pilot’s head, and sticks in the Dustbuster. Barry runs across the bald head. BARRY Wait a minute! I’m an attorney! CO-PILOT Who’s an attorney? PILOT Don’t move. The pilot uses the Dustbuster to try and mash Barry, who is hovering in front of the co-pilot’s nose, and knocks out the co-pilot who falls out of his chair, hitting the life raft release button. The life raft inflates, hitting the pilot, knocking him into a wall and out cold. Barry surveys the situation. BARRY Oh, Barry. CUT TO: INT. AIRPLANE CABIN Vanessa studies her laptop, looking serious. SFX: PA CRACKLE. BARRY (V.O) (in captain voice) Good afternoon passengers, this is your captain speaking. Would a Miss Vanessa Bloome in 24F please report to the cockpit. And please hurry! Bee Movie - JS REVISIONS 8/13/07 113. ANGLE ON: The aisle, and Vanessa head popping up. CUT TO: INT. COCKPIT Vanessa ENTERS. VANESSA What happened here? BARRY I tried to talk to them, but then there was a Dustbuster, a toupee, a life raft exploded...Now one’s bald, one’s in a boat, and they’re both unconscious. VANESSA Is that another bee joke? BARRY No. No one’s flying the plane. The AIR TRAFFIC CONTROLLER, BUD, speaks over the radio. BUD This is JFK control tower. Flight 356, what’s your status? Vanessa presses a button, and the intercom comes on. VANESSA This is Vanessa Bloome. I’m a florist from New York. BUD Where’s the pilot? VANESSA He’s unconscious and so is the copilot. BUD Not good. Is there anyone onboard who has flight experience? A BEAT. BARRY As a matter of fact, there is. Bee Movie - JS REVISIONS 8/13/07 114. BUD Who’s that? VANESSA Barry Benson. BUD From the honey trial? Oh great. BARRY Vanessa, this is nothing more than a big metal bee. It’s got giant wings, huge engines. VANESSA I can’t fly a plane. BARRY Why not? Isn’t John Travolta a pilot? VANESSA Yes? BARRY How hard could it be? VANESSA Wait a minute. Barry, we’re headed into some lightning. CUT TO: Vanessa shrugs, and takes the controls. SEQ. 4150 - “BARRY FLIES PLANE” INT. BENSON HOUSE The family is all huddled around the TV at the Benson house. ANGLE ON: TV. Bob Bumble is broadcasting. BOB BUMBLE This is Bob Bumble. We have some late-breaking news from JFK airport, where a very suspenseful scene is developing. Barry Benson, fresh off his stunning legal victory... Bee Movie - JS REVISIONS 8/13/07 115. Adam SPRAYS a can of HONEY-WHIP into his mouth. ADAM That’s Barry. BOB BUMBLE ...is now attempting to land a plane, loaded with people, flowers, and an incapacitated flight crew. EVERYONE Flowers?! CUT TO: INT. AIR TRAFFIC CONTROL TOWER BUD Well, we have an electrical storm in the area, and two individuals at the controls of a jumbo jet with absolutely no flight experience. JEANETTE CHUNG Just a minute, Mr. Ditchwater, there’s a honey bee on that plane. BUD Oh, I’m quite familiar with Mr. Benson’s work, and his no-account compadres. Haven’t they done enough damage already? JEANETTE CHUNG But isn’t he your only hope right now? BUD Come on, technically a bee shouldn’t be able to fly at all. CUT TO: INT. COCKPIT. Barry REACTS BUD The wings are too small, their bodies are too big-- Bee Movie - JS REVISIONS 8/13/07 116. BARRY (over PA) Hey, hold on a second. Haven’t we heard this million times? The surface area of the wings, and the body mass doesn’t make sense? JEANETTE CHUNG Get this on the air. CAMERAMAN You got it! CUT TO: INT. BEE TV CONTROL ROOM An engineer throws a switch. BEE ENGINEER Stand by. We’re going live. The “ON AIR” sign illuminates. CUT TO: INT. VARIOUS SHOTS OF NEW HIVE CITY The news report plays on TV. The pollen jocks are sitting around, playing paddle-ball, Wheel-o, and one of them is spinning his helmet on his finger. Buzzwell is in an office cubicle, playing computer solitaire. Barry’s family and Adam watch from their living room. Bees sitting on the street curb turn around to watch the TV. BARRY Mr. Ditchwater, the way we work may be a mystery to you, because making honey takes a lot of bees doing a lot of small jobs. But let me tell you something about a small job. If you do it really well, it makes a big difference. More than we realized. To us, to everyone. That’s why I want to get bees back to doing what we do best. Bee Movie - JS REVISIONS 8/13/07 117. Working together. That’s the bee way. We’re not made of Jello. We get behind a fellow. Black and yellow. CROWD OF BEES Hello! CUT TO: INT. COCKPIT Barry is giving orders to Vanessa. BARRY Left, right, down, hover. VANESSA Hover? BARRY Forget hover. VANESSA You know what? This isn’t so hard. Vanessa pretends to HONK THE HORN. VANESSA (CONT’D) Beep, beep! Beep, beep! A BOLT OF LIGHTNING HITS the plane. The plane takes a sharp dip. VANESSA (CONT’D) Barry, what happened? BARRY (noticing the control panel) Wait a minute. I think we were on autopilot that whole time. VANESSA That may have been helping me. BARRY And now we’re not! VANESSA (V.O.) (folding her arms) Well, then it turns out I cannot fly a plane. Bee Movie - JS REVISIONS 8/13/07 118. BARRY (CONT'D) Vanessa struggles with the yoke. CUT TO: EXT. AIRPLANE The airplane goes into a steep dive. CUT TO: SEQ. 4175 - “CRASH LANDING” INT. J-GATE An ALERT SIGN READING: “Hive Alert. We Need:” Then the SIGNAL goes from “Two Bees” “Some Bees” “Every Bee There Is” Lou Loduca gathers the pollen jocks at J-Gate. LOU LODUCA All of you, let’s get behind this fellow. Move it out! The bees follow Lou Loduca, and EXIT J-Gate. CUT TO: INT. AIRPLANE COCKPIT BARRY Our only chance is if I do what I would do, and you copy me with the wings of the plane! VANESSA You don’t have to yell. BARRY I’m not yelling. We happen to be in a lot of trouble here. VANESSA It’s very hard to concentrate with that panicky tone in your voice. BARRY It’s not a tone. I’m panicking! CUT TO: Bee Movie - JS REVISIONS 8/13/07 119. EXT. JFK AIRPORT ANGLE ON: The bees arriving and massing at the airport. CUT TO: INT. COCKPIT Barry and Vanessa alternately SLAP EACH OTHER IN THE FACE. VANESSA I don’t think I can do this. BARRY Vanessa, pull yourself together. Listen to me, you have got to snap out of it! VANESSA You snap out of it! BARRY You snap out of it! VANESSA You snap out of it! BARRY You snap out of it! VANESSA You snap out of it! CUT TO: EXT. AIRPLANE A GIGANTIC SWARM OF BEES flies in to hold the plane up. CUT TO: INT. COCKPIT - CONTINUOUS BARRY You snap out of it! VANESSA You snap out of it! Bee Movie - JS REVISIONS 8/13/07 120. BARRY You snap-- VANESSA Hold it! BARRY (about to slap her again) Why? Come on, it’s my turn. VANESSA How is the plane flying? Barry’s antennae ring. BARRY I don’t know. (answering) Hello? CUT TO: EXT. AIRPLANE ANGLE ON: The underside of the plane. The pollen jocks have massed all around the underbelly of the plane, and are holding it up. LOU LODUCA Hey Benson, have you got any flowers for a happy occasion in there? CUT TO: INT. COCKPIT Lou, Buzz, Splitz, and Jackson come up alongside the cockpit. BARRY The pollen jocks! VANESSA They do get behind a fellow. BARRY Black and yellow. LOU LODUCA (over headset) Hello. Bee Movie - JS REVISIONS 8/13/07 121. Alright you two, what do you say we drop this tin can on the blacktop? VANESSA What blacktop? Where? I can’t see anything. Can you? BARRY No, nothing. It’s all cloudy. CUT TO: EXT. RUNWAY Adam SHOUTS. ADAM Come on, you’ve got to think bee, Barry. Thinking bee, thinking bee. ANGLE ON: Overhead shot of runway. The bees are in the formation of a flower. In unison they move, causing the flower to FLASH YELLOW AND BLACK. BEES (chanting) Thinking bee, thinking bee. CUT TO: INT. COCKPIT We see through the swirling mist and clouds. A GIANT SHAPE OF A FLOWER is forming in the middle of the runway. BARRY Wait a minute. I think I’m feeling something. VANESSA What? BARRY I don’t know, but it’s strong. And it’s pulling me, like a 27 million year old instinct. Bring the nose of the plane down. Bee Movie - JS REVISIONS 8/13/07 122. LOU LODUCA (CONT'D) EXT. RUNWAY All the bees are on the runway chanting “Thinking Bee”. CUT TO: INT. CONTROL TOWER RICK What in the world is on the tarmac? ANGLE ON: Dave OTS onto runway seeing a flower being formed by millions of bees. BUD Get some lights on that! CUT TO: EXT. RUNWAY ANGLE ON: AIRCRAFT LANDING LIGHT SCAFFOLD by the side of the runway, illuminating the bees in their flower formation. INT. COCKPIT BARRY Vanessa, aim for the flower! VANESSA Oh, okay? BARRY Cut the engines! VANESSA Cut the engines? BARRY We’re going in on bee power. Ready boys? LOU LODUCA Affirmative. CUT TO: Bee Movie - JS REVISIONS 8/13/07 123. INT. AIRPLANE COCKPIT BARRY Good, good, easy now. Land on that flower! Ready boys? Give me full reverse. LOU LODUCA Spin it around! The plane attempts to land on top of an “Aloha Airlines” plane with flowers painted on it. BARRY (V.O) I mean the giant black and yellow pulsating flower made of millions of bees! VANESSA Which flower? BARRY That flower! VANESSA I’m aiming at the flower! The plane goes after a FAT GUY IN A HAWAIIAN SHIRT. BARRY (V.O) That’s a fat guy in a flowered shirt! The other other flower! The big one. He snaps a photo and runs away. BARRY (CONT'D) Full forward. Ready boys? Nose down. Bring your tail up. Rotate around it. VANESSA Oh, this is insane, Barry. BARRY This is the only way I know how to fly. CUT TO: Bee Movie - JS REVISIONS 8/13/07 124. AIR TRAFFIC CONTROL TOWER BUD Am I koo-koo kachoo, or is this plane flying in an insect-like pattern? CUT TO: EXT. RUNWAY BARRY (V.O) Get your nose in there. Don’t be afraid of it. Smell it. Full reverse! Easy, just drop it. Be a part of it. Aim for the center! Now drop it in. Drop it in, woman! The plane HOVERS and MANEUVERS, landing in the center of the giant flower, like a bee. The FLOWERS from the cargo hold spill out onto the runway. INT. AIPLANE CABIN The passengers are motionless for a beat. PASSENGER Come on already! They hear the “ding ding”, and all jump up to grab their luggage out of the overheads. SEQ. 4225 - “RUNWAY SPEECH” EXT. RUNWAY - CONTINUOUS The INFLATABLE SLIDES pop out the side of the plane. The passengers escape. Barry and Vanessa slide down out of the cockpit. Barry and Vanessa exhale a huge breath. VANESSA Barry, we did it. You taught me how to fly. Vanessa raises her hand up for a high five. Bee Movie - JS REVISIONS 8/13/07 125. BARRY Yes. No high five. VANESSA Right. ADAM Barry, it worked. Did you see the giant flower? BARRY What giant flower? Where? Of course I saw the flower! That was genius, man. Genius! ADAM Thank you. BARRY But we’re not done yet. Barry flies up to the wing of the plane, and addresses the bee crowd. BARRY (CONT’D) Listen everyone. This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our last chance. We’re the only ones who make honey, pollinate flowers, and dress like this. If we’re going to survive as a species, this is our moment. So what do you all say? Are we going to be bees, or just Museum of Natural History key chains? BEES We’re bees! KEYCHAIN BEE Keychain! BARRY Then follow me... Except Keychain. BUZZ Hold on Barry. You’ve earned this. Buzz puts a pollen jock jacket and helmet with Barry’s name on it on Barry. Bee Movie - JS REVISIONS 8/13/07 126. BARRY I’m a pollen jock! (looking at the jacket. The sleeves are a little long) And it’s a perfect fit. All I’ve got to do are the sleeves. The Pollen Jocks toss Barry a gun. BARRY (CONT’D) Oh yeah! ANGLE ON: Martin and Janet Benson. JANET BENSON That’s our Barry. All the bees descend upon the flowers on the tarmac, and start collecting pollen. CUT TO: SEQ. 4250 - “RE-POLLINATION” EXT. SKIES - CONTINUOUS The squadron FLIES over the city, REPOLLINATING trees and flowers as they go. Barry breaks off from the group, towards Vanessa’s flower shop. CUT TO: EXT. VANESSA’S FLOWER SHOP - CONTINUOUS Barry REPOLLINATES Vanessa’s flowers. CUT TO: EXT. CENTRAL PARK - CONTINUOUS ANGLE ON: Timmy with a frisbee, as the bees fly by. TIMMY Mom, the bees are back! Bee Movie - JS REVISIONS 8/13/07 127. Central Park is completely repollinated by the bees. DISSOLVE TO: INT. HONEX - CONTINUOUS Honex is back to normal and everyone is busily working. ANGLE ON: Adam, putting his Krelman hat on. ADAM If anyone needs to make a call, now’s the time. I’ve got a feeling we’ll be working late tonight! The bees CHEER. CUT TO: SEQ. 4355 EXT: VANESSA’S FLOWER SHOP With a new sign out front. “Vanessa & Barry: Flowers, Honey, Legal Advice” DISSOLVE TO: INT: FLOWER COUNTER Vanessa doing a brisk trade with many customers. CUT TO: INT: FLOWER SHOP - CONTINUOUS Vanessa is selling flowers. In the background, there are SHELVES STOCKED WITH HONEY. VANESSA (O.C.) Don’t forget these. Have a great afternoon. Yes, can I help who’s next? Who’s next? Would you like some honey with that? It is beeapproved. SIGN ON THE BACK ROOM DOOR READS: “Barry Benson: Insects at Law”. Bee Movie - JS REVISIONS 8/13/07 128. Camera moves into the back room. ANGLE ON: Barry. ANGLE ON: Barry’s COW CLIENT. COW Milk, cream, cheese...it’s all me. And I don’t see a nickel. BARRY Uh huh? Uh huh? COW (breaking down) Sometimes I just feel like a piece of meat. BARRY I had no idea. VANESSA Barry? I’m sorry, have you got a moment? BARRY Would you excuse me? My mosquito associate here will be able to help you. Mooseblood ENTERS. MOOSEBLOOD Sorry I’m late. COW He’s a lawyer too? MOOSEBLOOD Ma’am, I was already a bloodsucking parasite. All I needed was * a briefcase. * ANGLE ON: Flower Counter. VANESSA (to customer) Have a great afternoon! (to Barry) Barry, I just got this huge tulip order for a wedding, and I can’t get them anywhere. Bee Movie - JS REVISIONS 8/13/07 129. BARRY Not a problem, Vannie. Just leave it to me. Vanessa turns back to deal with a customer. VANESSA You’re a life-saver, Barry. (to the next customer) Can I help who’s next? Who’s next? ANGLE ON: Vanessa smiling back at Barry. Barry smiles too, then snaps himself out of it. BARRY (speaks into his antennae) Alright. Scramble jocks, it’s time to fly! VANESSA Thank you, Barry! EXT. FLOWER SHOP - CONTINUOUS ANGLE ON: Ken and Andy walking down the street. KEN (noticing the new sign) Augh! What in the world? It’s that bee again! ANDY (guiding Ken protectively) Let it go, Kenny. KEN That bee is living my life! When will this nightmare end? ANDY Let it all go. They don’t break stride. ANGLE ON: Camera in front of Barry as he flies out the door and up into the sky. Pollen jocks fold in formation behind him as they zoom into the park. BARRY (to Splitz) Beautiful day to fly. Bee Movie - JS REVISIONS 8/13/07 130. JACKSON Sure is. BARRY Between you and me, I was dying to get out of that office. FADE OUT: Bee Movie - JS REVISIONS 8/13/07 131."
| 56,502
| 112,985
| 0.759274
| 21,355
| 113,004
| 4.017794
| 0.148864
| 0.012214
| 0.015268
| 0.029009
| 0.085035
| 0.060478
| 0.051783
| 0.023205
| 0.013543
| 0.006807
| 0
| 0.012736
| 0.179401
| 113,004
| 2
| 112,985
| 56,502
| 0.912521
| 0
| 0
| 0
| 0
| 0.5
| 0.999708
| 0.000407
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0.5
| 0.5
| 0.5
| 1.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
|
0
| 11
|
940d259cc44236eb0ff4bd0c3bc582d8364a30e0
| 187
|
py
|
Python
|
arekit/contrib/networks/context/configurations/att_ef_pcnn.py
|
nicolay-r/AREk
|
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
|
[
"MIT"
] | 18
|
2019-12-14T18:43:11.000Z
|
2022-03-21T05:55:36.000Z
|
arekit/contrib/networks/context/configurations/att_ef_pcnn.py
|
nicolay-r/AREk
|
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
|
[
"MIT"
] | 284
|
2020-08-08T20:52:44.000Z
|
2022-03-31T05:26:20.000Z
|
arekit/contrib/networks/context/configurations/att_ef_pcnn.py
|
nicolay-r/AREk
|
19c39ec0dc9a17464cade03b9c4da0c6d1d21191
|
[
"MIT"
] | 1
|
2021-08-07T13:17:43.000Z
|
2021-08-07T13:17:43.000Z
|
from arekit.contrib.networks.context.configurations.att_ef_cnn import AttentionEndsAndFramesCNNConfig
class AttentionEndsAndFramesPCNNConfig(AttentionEndsAndFramesCNNConfig):
pass
| 26.714286
| 101
| 0.882353
| 15
| 187
| 10.866667
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074866
| 187
| 6
| 102
| 31.166667
| 0.942197
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 7
|
942429e27bfacd6ef9cc9d946cac489e6a972f50
| 31,825
|
py
|
Python
|
startup/users/30-user-Katz.py
|
NSLS-II-SMI/profile_collection
|
c1e2236a7520f605ac85e7591f05682add06357c
|
[
"BSD-3-Clause"
] | null | null | null |
startup/users/30-user-Katz.py
|
NSLS-II-SMI/profile_collection
|
c1e2236a7520f605ac85e7591f05682add06357c
|
[
"BSD-3-Clause"
] | 13
|
2018-09-25T19:35:08.000Z
|
2021-01-15T20:42:26.000Z
|
startup/users/30-user-Katz.py
|
NSLS-II-SMI/profile_collection
|
c1e2236a7520f605ac85e7591f05682add06357c
|
[
"BSD-3-Clause"
] | 3
|
2019-09-06T01:40:59.000Z
|
2020-07-01T20:27:39.000Z
|
def alignement_katz_2021_1():
global names, x_piezo, y_piezo, z_piezo, incident_angles, y_piezo_aligned
names = ['sample1', 'sample2', 'sample3', 'sample4', 'sample5', 'sample6', 'sample7']
x_piezo = [ 55000, 42000, 19000, 2000, -16000, -31000, -49000]
y_piezo = [ 4800, 2900, 2900, 2900, 2900, 2900, 3300]
x_hexa = [ 7, 0, 0, 0, 0, 0, 0]
incident_angles = [ 0, 0, 0, 0, 0, 0, 0]
y_piezo_aligned = [4757.703, 3054.9, 3133.065, 3031.989, 3414.158, 3546.666, 3715.74]
#sample2: y = 5332.784, th = 0.973826
#sample 4:: th [2, 0.9738, 2, 0.97, 0.582, 0.297, 0.0655], y: [7100, 5332.784, 5142.4, 4975.875, 5447.996, 5487.398, 5792.193]
# incident_angles = [2, 0.9738, 2, 0.97, 0.582, 0.297, 0.0655]
# y_piezo_aligned = [7100, 5332.784, 5142.4, 4975.875, 5447.996, 5487.398, 5792.193]
smi = SMI_Beamline()
yield from smi.modeAlignment(technique='gisaxs')
for name, xs_piezo, ys_piezo, xs_hexa in zip(names, x_piezo, y_piezo, x_hexa):
yield from bps.mv(stage.x, xs_hexa)
yield from bps.mv(piezo.x, xs_piezo)
yield from bps.mv(piezo.y, ys_piezo)
# yield from alignement_gisaxs(0.3)
yield from alignement_gisaxs_multisample_special(angle = 0.25)
y_piezo_aligned = y_piezo_aligned + [piezo.y.position]
yield from smi.modeMeasurement()
print(incident_angles)
def nexafs_Sedge_Katz(t=1):
dets = [pil300KW, pil900KW]
names = ['sample1', 'sample2', 'sample3', 'sample4', 'sample5', 'sample6', 'sample7']
x_piezo = [ 55000, 42000, 19000, 2000, -16000, -31000, -49000]
y_piezo = [ 4800, 2900, 2900, 2900, 2900, 2900, 3300]
x_hexa = [ 7, 0, 0, 0, 0, 0, 0]
incident_angles = [ 0, 0, 0, 0, 0, 0, 0]
y_piezo_aligned = [4757.703, 3054.9, 3133.065, 3031.989, 3414.158, 3546.666, 3715.74]
energies = 7 + np.asarray(np.arange(2445, 2470, 5).tolist() + np.arange(2470, 2480, 0.25).tolist() + np.arange(2480, 2490, 1).tolist()+ np.arange(2490, 2501, 5).tolist())
waxs_arc = [52.5]
for name, xs, ys, zs, aiss, ys in zip(names, x_piezo, y_piezo, z_piezo, incident_angles, y_piezo_aligned):
yield from bps.mv(piezo.x, xs)
yield from bps.mv(piezo.y, ys)
yield from bps.mv(piezo.z, zs)
yield from bps.mv(piezo.th, aiss + 0.7)
ai0 = piezo.th.position
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa60.0_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(1)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2490)
yield from bps.mv(energy, 2470)
yield from bps.mv(energy, 2450)
def nexafs_Caedge_Katz(t=1):
dets = [pil300KW]
names = ['sample7_1']
energies = np.linspace(4030, 4110, 81)
waxs_arc = [52.5]
for name in names:
ai0 = piezo.th.position
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa52.5_ai0.7deg_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(1)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 4100)
yield from bps.mv(energy, 4080)
yield from bps.mv(energy, 4050)
def saxs_14keV_Matt_2021_2(t=1):
xlocs = [44000, 35000, 21500, 11000, -1000, -12000, -23000, -36000, 44000, 32500, 21000, 10000, -2000, -13500]
ylocs = [-5000, -4500, -5000, -5000, -5000, -5000, -5000, -5000, 8000, 8000, 8000, 8000, 8000, 8000]
zlocs = [ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700]
names = ['MWET_01', 'MWET_02', 'MWET_03', 'MWET_04', 'MWET_05', 'MWET_06', 'MWET_07a', 'MWET_07b', 'MWET_08', 'MWET_09', 'MWET_10', 'MWET_11',
'MWET_12', 'MWET_13']
user = 'ML'
det_exposure_time(t,t)
assert len(xlocs) == len(names), f'Number of X coordinates ({len(xlocs)}) is different from number of samples ({len(names)})'
# Detectors, motors:
dets = [pil300KW, pil900KW, pil1M]
waxs_range = [0, 2, 19.5, 21.5, 39, 41]
ypos = [-500, 500, 3]
for wa in waxs_range[::-1]:
yield from bps.mv(waxs, wa)
for sam, x, y, z in zip(names, xlocs, ylocs, zlocs):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(piezo.z, z)
name_fmt = '{sam}_stats1_14.0keV_sdd8.3m_wa{waxs}'
sample_name = name_fmt.format(sam=sam, waxs='%2.1f'%wa)
sample_id(user_name=user, sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.y, *ypos)
yield from bps.sleep(2)
sample_id(user_name='test', sample_name='test')
det_exposure_time(0.3, 0.3)
def saxs_2p4keV_Matt_2021_2(t=1):
xlocs = [44000, 35000, 21500, 11000, -1000, -12000, -23000, -36000, 44000, 32500, 21000, 10000, -2000, -13500]
ylocs = [-5000, -4500, -5000, -5000, -5000, -5000, -5000, -5000, 8000, 8000, 8000, 8000, 8000, 8000]
zlocs = [ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700]
names = ['MWET_01', 'MWET_02', 'MWET_03', 'MWET_04', 'MWET_05', 'MWET_06', 'MWET_07a', 'MWET_07b', 'MWET_08', 'MWET_09', 'MWET_10', 'MWET_11',
'MWET_12', 'MWET_13']
user = 'ML'
det_exposure_time(t,t)
assert len(xlocs) == len(names), f'Number of X coordinates ({len(xlocs)}) is different from number of samples ({len(names)})'
# Detectors, motors:
dets = [pil300KW, pil900KW, pil1M]
waxs_range = [0, 2, 19.5, 21.5, 39, 41]
ypos = [-500, 500, 3]
for wa in waxs_range[::-1]:
yield from bps.mv(waxs, wa)
for sam, x, y, z in zip(names, xlocs, ylocs, zlocs):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(piezo.z, z)
name_fmt = '{sam}_stats1_2.45keV_sdd3.0m_wa{waxs}'
sample_name = name_fmt.format(sam=sam, waxs='%2.1f'%wa)
sample_id(user_name=user, sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.y, *ypos)
yield from bps.sleep(2)
sample_id(user_name='test', sample_name='test')
det_exposure_time(0.3, 0.3)
def nexafs_Sedge_Katz_2021_2(t=1):
dets = [pil300KW, pil900KW]
x_piezo = [ 32500]
y_piezo = [ 8000]
z_piezo = [ 2700]
names = ['MWET_09']
energies = np.linspace(2450, 2530, 81)
waxs_arc = [59]
for name, xs, ys, zs in zip(names, x_piezo, y_piezo, z_piezo):
yield from bps.mv(piezo.x, xs)
yield from bps.mv(piezo.y, ys)
yield from bps.mv(piezo.z, zs)
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa59_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2500)
yield from bps.mv(energy, 2480)
yield from bps.mv(energy, 2450)
def nexafs_Sedge_Katz_2021_3(t=1):
dets = [pil300KW, pil900KW]
x_piezo = [ 32500]
y_piezo = [ 8000]
z_piezo = [ 2700]
names = ['MWET_09']
energies = np.linspace(2450, 2530, 81)
waxs_arc = [59]
for name, xs, ys, zs in zip(names, x_piezo, y_piezo, z_piezo):
yield from bps.mv(piezo.x, xs)
yield from bps.mv(piezo.y, ys)
yield from bps.mv(piezo.z, zs)
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa59_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(3)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2500)
yield from bps.sleep(3)
yield from bps.mv(energy, 2480)
yield from bps.sleep(3)
yield from bps.mv(energy, 2450)
yield from bps.sleep(3)
def nexafs_Sedge_Katz_2021_2(t=1):
dets = [pil900KW]
# names = ['sample1', 'sample2', 'sample3', 'sample4', 'sample5']
# x_piezo = [ 54000, 38000, 18000, 3000, -17000]
# inc_angl = [ -0.6074, -0.4144, 0.185, -0.1982, -2.4638]
# y_piezo = [ 4647.88, 5180.45, 4970.04, 4909.86, 5090.90]
names = [ 'sample4_redo']
x_piezo = [ 3200]
inc_angl = [ -0.1982]
y_piezo = [ 4890.86]
energies = 7 + np.asarray(np.arange(2445, 2470, 5).tolist() + np.arange(2470, 2480, 0.25).tolist() + np.arange(2480, 2490, 1).tolist()+ np.arange(2490, 2501, 5).tolist())
waxs_arc = 60
angle_mes = [0.1]
for name, xs, ys, aiss in zip(names, x_piezo, y_piezo, inc_angl):
yield from bps.mv(piezo.x, xs)
yield from bps.mv(piezo.y, ys)
yield from bps.mv(piezo.th, aiss)
yield from bps.mv(waxs, 59)
det_exposure_time(t,t)
for angle_me in angle_mes:
yield from bps.mv(piezo.th, aiss + angle_me)
name_fmt = 'nexafs_{sample}_{energy}eV_wa60_bpm{xbpm}_ai{ai}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm, ai='%1.2f'%angle_me)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2490)
yield from bps.mv(energy, 2470)
yield from bps.mv(energy, 2450)
def nexafs_Caedge_David(t=1):
dets = [pil900KW]
# names = ['sample1', 'sample2', 'sample3', 'sample4', 'sample5']
# x_piezo = [ 54000, 38000, 18000, 3000, -17000]
# inc_angl = [ -0.6074, -0.4144, 0.185, -0.1982, -2.4638]
# y_piezo = 40 + np.asarray([ 4647.88, 5180.45, 4970.04, 4909.86, 5090.90])
names = ['sample3', 'sample4', 'sample5']
x_piezo = [ 18000, 3000, -17000]
inc_angl = [ 0.185, -0.1982, -2.4638]
y_piezo = 40 + np.asarray([ 4970.04, 4909.86, 5090.90])
# names = [ 'sample2', 'sample3', 'sample4', 'sample5']
# x_piezo = [ 38000, 18000, 3000, -17000]
# inc_angl = [ -0.4144, 0.185, -0.1982, -2.4638]
# y_piezo = 40 + np.asarray([ 5180.45, 4970.04, 4909.86, 5090.90])
# energies = np.linspace(4030, 4110, 81)
energies = np.asarray(np.arange(4020, 4035, 5).tolist() + np.arange(4035, 4042, 2).tolist() + np.arange(4042, 4070, 0.5).tolist() + np.arange(4070, 4080, 2).tolist() + np.arange(4080, 4130, 5).tolist())
for name, xs, ys, aiss in zip(names, x_piezo, y_piezo, inc_angl):
yield from bps.mv(piezo.x, xs)
yield from bps.mv(piezo.y, ys)
yield from bps.mv(piezo.th, aiss)
yield from bps.mv(waxs, 59)
det_exposure_time(t,t)
angle_mes = [0.1]
for angle_me in angle_mes:
yield from bps.mv(piezo.th, aiss + angle_me)
name_fmt = 'nexafs_{sample}_{energy}eV_wa60_ai{ai}_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, ai='%1.2f'%angle_me , xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 4100)
yield from bps.mv(energy, 4080)
yield from bps.mv(energy, 4050)
def nexafs_Caedge_Matt(t=0.5, name='test'):
yield from bps.mv(waxs, 59)
dets = [pil900KW]
energies = np.asarray(np.arange(4020, 4035, 5).tolist() + np.arange(4035, 4042, 2).tolist() + np.arange(4042, 4070, 0.5).tolist() + np.arange(4070, 4080, 2).tolist() + np.arange(4080, 4140, 5).tolist())
samples = ['mwet_01', 'mwet_02', 'mwet_03', 'mwet_04', 'mwet_05', 'mwet_06', 'mwet_07', 'mwet_08', 'mwet_09', 'mwet_10', 'mwet_11']
x_list = [ 46000, 35000, 22500, 11000, 0, -12000, -24000, -35000, 24000, 12000, 0]
y_list = [ -8500, -8500, -8500, -8500, -8500, -8500, -8500, -8500, 4500, 4500, 4500]
for name, x, y in zip(samples, x_list, y_list):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa60_bpm{xbpm}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GS', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 4110)
yield from bps.sleep(2)
yield from bps.mv(energy, 4070)
yield from bps.sleep(2)
yield from bps.mv(energy, 4030)
yield from bps.sleep(2)
sample_id(user_name='test', sample_name='test')
def saxs_prep_multisample(t=1):
dets = [pil900KW, pil1M]
energies = [4030, 4040, 4050, 4055, 4075]
det_exposure_time(t,t)
waxs_range = [0, 2, 19.5, 21.5, 39, 41]
det_exposure_time(t,t)
xpos = [-500, 500, 3]
for wa in waxs_range[::-1]:
yield from bps.mv(waxs, wa)
samples = ['mwet_01', 'mwet_02', 'mwet_03', 'mwet_04', 'mwet_05', 'mwet_06', 'mwet_07', 'mwet_08', 'mwet_09', 'mwet_10', 'mwet_11']
x_list = [ 46000, 35000, 22500, 11000, 0, -12000, -24000, -35000, 24000, 12000, 0]
y_list = 100+ np.asarray([ -8500, -8500, -8500, -8500, -8500, -8500, -8500, -8500, 4500, 4500, 4500])
for name, x, y in zip(samples, x_list, y_list):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
for k, e in enumerate(energies):
yield from bps.mv(energy, e)
yield from bps.sleep(2)
yield from bps.mv(piezo.y, y + k * 100)
name_fmt = '{sample}_{energy}eV_xbpm{xbpm}_wa{wa}'
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name,energy='%6.2f'%e, xbpm = '%3.1f'%bpm, wa='%2.1f'%wa)
sample_id(user_name='OS', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.x, *xpos)
yield from bps.mv(energy, 4050)
yield from bps.mv(energy, 4030)
def nexafs_Caedge_Katz_2021_3(t=1):
dets = [pil900KW]
# names = ['ref_calcite', 'ref_cacooh', 'calcium_01', 'calcium_02', 'calcium_03', 'calcium_04', 'calcium_05', 'calcium_06', 'calcium_07', 'calcium_08', 'calcium_09',
# 'calcium_10', 'calcium_11', 'calcium_12', 'calcium_13','calcium_14']
# xs = [43000, 33000, 21000, 9500, -1000, -13000, -25000, -36000, 45000, 35000, 29500, 24000, 14000, 2000, -10500, -24000]
# ys = [ -500, -500, -500, -500, -500, -500, -500, -1500, 2000, 2000, 1500, 1500, 1500, 1500, 1500, 1500]
# ys_hexa = [-5, -5, -5, -5, -5, -5, -5, -5, 5, 5, 5, 5, 5, 5, 5, 5]
names = ['calcium_13']
xs = [43000]
ys = [ -500]
ys_hexa = [-5]
assert len(xs) == len(names), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(names)})'
assert len(xs) == len(ys), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys)})'
assert len(xs) == len(ys_hexa), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys_hexa)})'
energies = np.asarray(np.arange(4020, 4035, 5).tolist() + np.arange(4035, 4042, 2).tolist() + np.arange(4042, 4070, 0.5).tolist() + np.arange(4070, 4080, 2).tolist() + np.arange(4080, 4140, 5).tolist())
waxs_arc = [50]
for x, y, y_hexa, name in zip(xs, ys, ys_hexa, names):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(stage.y, y_hexa)
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa50_bpm{xbpm}'
yss = np.linspace(y, y + 500, 80)
xss = np.linspace(x, x, 1)
yss, xss = np.meshgrid(yss, xss)
yss = yss.ravel()
xss = xss.ravel()
for e, xsss, ysss in zip(energies, xss, yss):
yield from bps.mv(energy, e)
yield from bps.sleep(3)
yield from bps.mv(piezo.y, ysss)
yield from bps.mv(piezo.x, xsss)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 4100)
yield from bps.sleep(3)
yield from bps.mv(energy, 4080)
yield from bps.sleep(3)
yield from bps.mv(energy, 4050)
yield from bps.sleep(3)
def swaxs_Caedge_Katz_2021_3(t=1):
dets = [pil900KW, pil1M]
energies = [4030, 4040, 4050, 4055, 4075]
det_exposure_time(t,t)
waxs_range = [0, 2, 20, 22, 40, 42]
det_exposure_time(t,t)
xpos = [-500, 500, 3]
# names = ['ref_calcite', 'ref_cacooh', 'calcium_01', 'calcium_02', 'calcium_03', 'calcium_04', 'calcium_05', 'calcium_06', 'calcium_07', 'calcium_08', 'calcium_09',
# 'calcium_10', 'calcium_11', 'calcium_12', 'calcium_13','calcium_14']
# xs = 300 + np.asarray([43000, 33000, 21000, 9500, -1000, -13000, -25000, -36000, 45000, 35000, 29500, 24000, 14000, 2000, -10500, -24000])
# ys = [ -500, -500, -500, -500, -500, -500, -500, -1500, 2000, 2000, 1500, 1500, 1500, 1500, 1500, 1500]
# ys_hexa = [-5, -5, -5, -5, -5, -5, -5, -5, 5, 5, 5, 5, 5, 5, 5, 5]
names = ['calcium_13']
xs = 300 + np.asarray([43000])
ys = [ -500]
ys_hexa = [-5]
assert len(xs) == len(names), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(names)})'
assert len(xs) == len(ys), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys)})'
assert len(xs) == len(ys_hexa), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys_hexa)})'
for wa in waxs_range[::-1]:
yield from bps.mv(waxs, wa)
for x, y, y_hexa, name in zip(xs, ys, ys_hexa, names):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(stage.y, y_hexa)
for k, e in enumerate(energies):
yield from bps.mv(energy, e)
yield from bps.sleep(3)
yield from bps.mv(piezo.y, y + k * 100)
name_fmt = '{sample}_{energy}eV_sdd1.7m_xbpm{xbpm}_wa{wa}'
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name,energy='%6.2f'%e, xbpm = '%3.1f'%bpm, wa='%2.1f'%wa)
sample_id(user_name='OS', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.x, *xpos)
yield from bps.mv(energy, 4050)
yield from bps.sleep(3)
yield from bps.mv(energy, 4030)
yield from bps.sleep(3)
def night_katz(t=1):
proposal_id('2021_3', '307898_Katz')
yield from nexafs_Caedge_Katz_2021_3(t=t)
proposal_id('2021_3', '307898_Katz2')
yield from swaxs_Caedge_Katz_2021_3(t=t)
def nexafs_Agedge_Katz_2021_3(t=1):
dets = [pil900KW]
names = ['silver_01', 'silver_02', 'silver_03', 'silver_04', 'silver_05', 'silver_06', 'silver_07', 'silver_08', 'silver_09', 'silver_10']
xs = [33400, 18000, 6000, -4000, -14000,-27000, 30000, 20000, 5000, -9000]
ys = [ -500, -500, -500, -500, -500, -500, 1500, 1500, 1500, 1500]
ys_hexa = [-5, -5, -5, -5, -5, -5, 5, 5, 5, 5]
assert len(xs) == len(names), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(names)})'
assert len(xs) == len(ys), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys)})'
assert len(xs) == len(ys_hexa), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys_hexa)})'
energies = np.asarray(np.arange(3300, 3340, 5).tolist() + np.arange(3340, 3350, 2).tolist() + np.arange(3350, 3390, 1).tolist() + np.arange(3390, 3400, 2).tolist() + np.arange(3400, 3450, 5).tolist())
waxs_arc = [40]
for x, y, y_hexa, name in zip(xs, ys, ys_hexa, names):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(stage.y, y_hexa)
yield from bps.mv(waxs, waxs_arc[0])
det_exposure_time(t,t)
name_fmt = 'nexafs_{sample}_{energy}eV_wa50_bpm{xbpm}'
yss = np.linspace(y, y + 500, 68)
xss = np.linspace(x, x, 1)
yss, xss = np.meshgrid(yss, xss)
yss = yss.ravel()
xss = xss.ravel()
for e, xsss, ysss in zip(energies, xss, yss):
yield from bps.mv(energy, e)
yield from bps.sleep(3)
yield from bps.mv(piezo.y, ysss)
yield from bps.mv(piezo.x, xsss)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 3410)
yield from bps.sleep(3)
yield from bps.mv(energy, 3370)
yield from bps.sleep(3)
yield from bps.mv(energy, 3320)
yield from bps.sleep(3)
def swaxs_Agedge_Katz_2021_3(t=1):
dets = [pil900KW, pil1M]
energies = [3300, 3350, 3357, 3367, 3400, 3430]
det_exposure_time(t,t)
waxs_range = [0, 20, 40]
det_exposure_time(t,t)
xpos = [-500, 500, 3]
names = ['silver_01', 'silver_02', 'silver_03', 'silver_04', 'silver_05', 'silver_06', 'silver_ref', 'silver_07', 'silver_08', 'silver_09', 'silver_10']
xs = [33400, 18000, 6000, -4000, -14000,-27000, 43000, 30000, 20000, 5000, -9000]
ys = [ -500, -500, -500, -500, -500, -500, 1500, 1500, 1500, 1500, 1500]
ys_hexa = [-5, -5, -5, -5, -5, -5, 5, 5, 5, 5, 5]
assert len(xs) == len(names), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(names)})'
assert len(xs) == len(ys), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys)})'
assert len(xs) == len(ys_hexa), f'Number of X coordinates ({len(xs)}) is different from number of samples ({len(ys_hexa)})'
for wa in waxs_range[::-1]:
if wa == 42:
dets = [pil1M]
yield from bps.mv(GV7.open_cmd, 1 )
yield from bps.mv(att2_10.open_cmd, 1)
yield from bps.mv(att2_11.open_cmd, 1)
else:
dets = [pil900KW]
yield from bps.mv(GV7.close_cmd, 1 )
yield from bps.mv(att2_10.close_cmd, 1)
yield from bps.mv(att2_11.close_cmd, 1)
yield from bps.mv(att2_9.open_cmd, 1)
yield from bps.mv(waxs, wa)
for x, y, y_hexa, name in zip(xs, ys, ys_hexa, names):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(stage.y, y_hexa)
for k, e in enumerate(energies):
yield from bps.mv(energy, e)
yield from bps.sleep(3)
yield from bps.mv(piezo.y, y + k * 100)
name_fmt = '{sample}_{energy}eV_sdd6.0m_xbpm{xbpm}_wa{wa}'
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name,energy='%6.2f'%e, xbpm = '%3.1f'%bpm, wa='%2.1f'%wa)
sample_id(user_name='OS', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.x, *xpos)
yield from bps.mv(energy, 3400)
yield from bps.sleep(3)
yield from bps.mv(energy, 3350)
yield from bps.sleep(3)
yield from bps.mv(energy, 3300)
yield from bps.sleep(3)
def alignement_SVA_(t=1):
global names, x_hexa, y_hexa, incident_angles, y_hexa_aligned
names = ['sample1', 'sample4']
x_hexa = [ 16, 22]
y_hexa = [0.6, 0.8]
incident_angles = []
y_hexa_aligned = []
# ai01 = 3.1
# ai02 = 3.1
for name, xs_hexa, ys_hexa in zip(names, x_hexa, y_hexa):
yield from bps.mv(stage.x, xs_hexa)
yield from bps.mv(stage.y, ys_hexa)
yield from alignement_special_hex(angle = 0.45)
incident_angles = incident_angles + [stage.th.position]
y_hexa_aligned = y_hexa_aligned + [stage.y.position]
def nexafs_Sedge_SVA_Katz_2021_3(t=1):
humidity = '%3.2f'%readHumidity(verbosity=0)
dets = [pil900KW]
energies = 7 + np.asarray(np.arange(2445, 2470, 5).tolist() + np.arange(2470, 2480, 0.25).tolist() + np.arange(2480, 2490, 1).tolist()+ np.arange(2490, 2501, 5).tolist())
waxs_arc = 30
angle_mes = [0.7]
for name, xs, aiss, ys in zip(['kapton'], x_hexa, incident_angles, y_hexa_aligned):
# yield from bps.mv(stage.x, xs)
# yield from bps.mv(stage.y, ys)
# yield from bps.mv(stage.th, aiss)
yield from bps.mv(waxs, waxs_arc)
det_exposure_time(t,t)
for angle_me in angle_mes:
# yield from bps.mv(stage.th, aiss + angle_me)
name_fmt = 'nexafs_{sample}_{energy}eV_wa40_bpm{xbpm}_ai{ai}_hum{hum}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm, ai='%1.2f'%angle_me, hum = humidity)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2490)
yield from bps.mv(energy, 2470)
yield from bps.mv(energy, 2450)
# # Measure at flow 100 percent
setDryFlow(0)
setWetFlow(5)
yield from bps.sleep(600)
humidity = '%3.2f'%readHumidity(verbosity=0)
dets = [pil900KW]
energies = 7 + np.asarray(np.arange(2445, 2470, 5).tolist() + np.arange(2470, 2480, 0.25).tolist() + np.arange(2480, 2490, 1).tolist()+ np.arange(2490, 2501, 5).tolist())
waxs_arc = 40
angle_mes = [0.1]
for name, xs, aiss, ys in zip(names, x_hexa, incident_angles, y_hexa_aligned):
yield from bps.mv(stage.x, xs)
yield from bps.mv(stage.y, ys)
yield from bps.mv(stage.th, aiss)
yield from bps.mv(waxs, 40)
det_exposure_time(t,t)
for angle_me in angle_mes:
yield from bps.mv(stage.th, aiss + angle_me)
name_fmt = 'nexafs_{sample}_{energy}eV_wa40_bpm{xbpm}_ai{ai}_hum{hum}'
for e in energies:
yield from bps.mv(energy, e)
yield from bps.sleep(2)
bpm = xbpm2.sumX.value
sample_name = name_fmt.format(sample=name, energy='%6.2f'%e, xbpm = '%4.3f'%bpm, ai='%1.2f'%angle_me, hum = humidity)
sample_id(user_name='GF', sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.count(dets, num=1)
yield from bps.mv(energy, 2490)
yield from bps.mv(energy, 2470)
yield from bps.mv(energy, 2450)
setDryFlow(0)
setWetFlow(0)
def saxs_2021_3(t=1):
xlocs = [39500, 28000, 16000, 6000, -6000, -18000, -29000, -41000, 42000, 30000]
ylocs = [-5200, -5200, -5200, -5200, -5200, -5200, -5200, -5200, 7200, 7200]
zlocs = [ 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700, 2700]
names = ['sample_01', 'sample_02', 'sample_03', 'sample_04', 'sample_05', 'sample_06', 'sample_07', 'sample_08', 'sample_09', 'sample_10']
user = 'ML'
det_exposure_time(t,t)
assert len(xlocs) == len(names), f'Number of X coordinates ({len(xlocs)}) is different from number of samples ({len(names)})'
# Detectors, motors:
dets = [pil1M]
waxs_range = [30]
ypos = [-200, 200, 3]
for wa in waxs_range[::-1]:
yield from bps.mv(waxs, wa)
for sam, x, y, z in zip(names, xlocs, ylocs, zlocs):
yield from bps.mv(piezo.x, x)
yield from bps.mv(piezo.y, y)
yield from bps.mv(piezo.z, z)
name_fmt = '{sam}_16.1keV_sdd8.3m_wa{waxs}'
sample_name = name_fmt.format(sam=sam, waxs='%2.1f'%wa)
sample_id(user_name=user, sample_name=sample_name)
print(f'\n\t=== Sample: {sample_name} ===\n')
yield from bp.rel_scan(dets, piezo.y, *ypos)
yield from bps.sleep(2)
sample_id(user_name='test', sample_name='test')
det_exposure_time(0.3, 0.3)
| 36.962834
| 206
| 0.557738
| 4,727
| 31,825
| 3.613285
| 0.078697
| 0.105386
| 0.123653
| 0.115574
| 0.919438
| 0.902752
| 0.883607
| 0.867916
| 0.851347
| 0.844906
| 0
| 0.149649
| 0.292192
| 31,825
| 861
| 207
| 36.962834
| 0.608586
| 0.082797
| 0
| 0.761553
| 0
| 0
| 0.129322
| 0.025419
| 0
| 0
| 0
| 0
| 0.027726
| 1
| 0.03512
| false
| 0
| 0
| 0
| 0.03512
| 0.033272
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
944076465e5256e81ee3ea4bbfb3e72225631586
| 9,204
|
py
|
Python
|
fonts/font10mono.py
|
robert-hh/SSD1963-TFT-Library-for-PyBoard
|
db9786cdd95f9dab5334a9de28bed4e26436815c
|
[
"MIT"
] | 16
|
2016-02-23T12:20:36.000Z
|
2021-02-02T06:41:49.000Z
|
fonts/font10mono.py
|
robert-hh/SSD1963-TFT-Library-for-PyBoard-and-RP2040
|
db9786cdd95f9dab5334a9de28bed4e26436815c
|
[
"MIT"
] | 2
|
2016-11-26T07:46:58.000Z
|
2017-12-10T08:44:38.000Z
|
fonts/font10mono.py
|
robert-hh/SSD1963-TFT-Library-for-PyBoard
|
db9786cdd95f9dab5334a9de28bed4e26436815c
|
[
"MIT"
] | 9
|
2016-06-04T08:22:55.000Z
|
2020-04-19T14:40:36.000Z
|
# Code generated by cfonts_to_trans_py.py
import TFTfont
_font10mono = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x00\x08\x00\x00\x00\x00'\
b'\x00\x05\x01\x40\x50\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x04\x81\x20\x48\x12\x1f\xc1\x20\x90\x7f\x09\x02\x40\x90\x24\x00\x00\x00\x00'\
b'\x08\x0f\x84\x91\x24\x48\x12\x03\x80\x38\x09\x02\x44\x91\x24\x3e\x02\x00\x80\x00'\
b'\x00\x1c\x08\x82\x22\x89\x22\x87\x40\x7c\x28\x92\x28\x88\x22\x07\x00\x00\x00\x00'\
b'\x00\x0e\x04\x41\x10\x44\x0a\x03\x01\x42\x89\x21\x48\x21\x14\x38\x80\x00\x00\x00'\
b'\x00\x02\x00\x80\x20\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x02\x01\x00\x40\x10\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20\x04\x01\x00\x40\x08'\
b'\x10\x02\x00\x80\x20\x04\x01\x00\x40\x10\x04\x01\x00\x40\x10\x08\x02\x00\x80\x40'\
b'\x00\x02\x00\x80\xf8\x08\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x08\x02\x00\x81\xfc\x08\x02\x00\x80\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x02\x00\x80\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00'\
b'\x00\x00\x80\x20\x08\x04\x01\x00\x40\x20\x08\x02\x01\x00\x40\x10\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x10\x44\x91\x04\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x01\x00\xc0\x50\x24\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x01\x00\x40\x10\x08\x04\x06\x02\x01\x00\x7f\x00\x00\x00\x00'\
b'\x00\x06\x02\x41\x08\x02\x01\x01\x80\x18\x01\x00\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x00\x80\x60\x28\x0a\x04\x81\x20\x88\x42\x1f\xc0\x20\x08\x02\x00\x00\x00\x00'\
b'\x00\x1f\x84\x01\x00\x40\x17\x06\x20\x04\x01\x00\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x07\x82\x11\x04\x40\x17\x06\x21\x04\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x1f\xc0\x10\x08\x04\x01\x00\x40\x20\x08\x02\x01\x00\x40\x10\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x08\x81\xc0\x88\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x10\x44\x10\x8c\x1d\x00\x44\x11\x08\x3c\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x08\x02\x00\x80\x00'\
b'\x00\x00\x00\x10\x18\x18\x08\x04\x00\x80\x18\x01\x80\x10\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x07\xf0\x00\x00\x1f\xc0\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x04\x00\xc0\x0c\x00\x80\x10\x08\x0c\x0c\x04\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x07\x82\x11\x02\x40\x80\x20\x10\x08\x02\x01\x00\x40\x00\x04\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x13\xc5\x11\x44\x4f\x10\x02\x00\x80\x1e\x00\x00\x00\x00'\
b'\x00\x02\x01\x40\x50\x14\x08\x82\x20\x88\x7f\x10\x44\x12\x02\x80\x80\x00\x00\x00'\
b'\x00\x1f\x04\x21\x08\x42\x10\x87\xc1\x08\x41\x10\x44\x11\x08\x7c\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x40\x10\x04\x01\x00\x40\x10\x04\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x1e\x04\x41\x08\x42\x10\x44\x11\x04\x41\x10\x84\x21\x10\x78\x00\x00\x00\x00'\
b'\x00\x1f\xc4\x01\x00\x40\x10\x07\xe1\x00\x40\x10\x04\x01\x00\x7f\x00\x00\x00\x00'\
b'\x00\x1f\xc4\x01\x00\x40\x10\x07\xe1\x00\x40\x10\x04\x01\x00\x40\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x40\x10\x04\x01\x1c\x41\x10\x44\x10\x84\x1e\x00\x00\x00\x00'\
b'\x00\x10\x44\x11\x04\x41\x10\x47\xf1\x04\x41\x10\x44\x11\x04\x41\x00\x00\x00\x00'\
b'\x00\x0f\x80\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20\x3e\x00\x00\x00\x00'\
b'\x00\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x44\x11\x08\x3c\x00\x00\x00\x00'\
b'\x00\x10\x24\x11\x08\x44\x12\x05\x01\xa0\x44\x10\x84\x21\x04\x40\x80\x00\x00\x00'\
b'\x00\x10\x04\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x7f\x00\x00\x00\x00'\
b'\x00\x10\x46\x31\x8c\x55\x15\x44\x91\x24\x41\x10\x44\x11\x04\x41\x00\x00\x00\x00'\
b'\x00\x10\x46\x11\x84\x51\x14\x44\x91\x24\x45\x11\x44\x31\x0c\x41\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x10\x44\x11\x04\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x1f\x04\x21\x04\x41\x10\x87\xc1\x00\x40\x10\x04\x01\x00\x40\x00\x00\x00\x00'\
b'\x00\x07\x02\x21\x04\x41\x10\x44\x11\x04\x41\x10\x44\xd0\x88\x1f\x00\x20\x00\x00'\
b'\x00\x1f\x04\x21\x04\x41\x10\x87\xc1\x10\x42\x10\x84\x11\x04\x40\x80\x00\x00\x00'\
b'\x00\x0f\x84\x11\x04\x40\x08\x01\x80\x10\x02\x00\x44\x11\x04\x3e\x00\x00\x00\x00'\
b'\x00\x3f\xe0\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x00\x00\x00\x00'\
b'\x00\x10\x44\x11\x04\x41\x10\x44\x11\x04\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x20\x28\x09\x04\x41\x10\x42\x20\x88\x22\x05\x01\x40\x50\x08\x00\x00\x00\x00'\
b'\x00\x20\x28\x0a\x02\x80\x92\x44\x91\x24\x55\x15\x45\x50\x88\x22\x00\x00\x00\x00'\
b'\x00\x20\x24\x10\x88\x22\x05\x00\x80\x20\x14\x08\x82\x21\x04\x80\x80\x00\x00\x00'\
b'\x00\x20\x24\x11\x04\x22\x08\x81\x40\x20\x08\x02\x00\x80\x20\x08\x00\x00\x00\x00'\
b'\x00\x0f\xc0\x10\x08\x02\x01\x00\x80\x20\x10\x04\x02\x01\x00\x7f\x00\x00\x00\x00'\
b'\x00\x03\x80\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x38'\
b'\x00\x04\x01\x00\x40\x08\x02\x00\x80\x10\x04\x01\x00\x20\x08\x02\x00\x00\x00\x00'\
b'\x00\x07\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x40\x70'\
b'\x00\x02\x01\x40\x50\x22\x08\x84\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xfc\x00'\
b'\x00\x06\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x3e\x10\x40\x10\x7c\x21\x10\x44\x11\x0c\x3d\x00\x00\x00\x00'\
b'\x00\x10\x04\x01\x00\x5c\x18\x84\x11\x04\x41\x10\x44\x11\x88\x5c\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1c\x08\x84\x11\x00\x40\x10\x04\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x00\x40\x10\x04\x1d\x08\xc4\x11\x04\x41\x10\x44\x10\x8c\x1d\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1c\x08\x84\x11\x04\x7f\x10\x04\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x01\xe0\x80\x20\x3f\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1d\x08\xc4\x11\x04\x41\x10\x44\x10\x8c\x1d\x00\x44\x20\xf0'\
b'\x00\x10\x04\x01\x00\x5c\x18\x84\x11\x04\x41\x10\x44\x11\x04\x41\x00\x00\x00\x00'\
b'\x00\x01\x00\x00\x00\x3c\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x00\x00\x00\x00'\
b'\x00\x01\x00\x00\x00\x3c\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x41\xe0'\
b'\x00\x10\x04\x01\x00\x42\x11\x04\x81\x40\x68\x11\x04\x21\x04\x40\x80\x00\x00\x00'\
b'\x00\x0f\x00\x40\x10\x04\x01\x00\x40\x10\x04\x01\x00\x40\x10\x04\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x5b\x1b\x44\x91\x24\x49\x12\x44\x91\x24\x49\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x5c\x18\x84\x11\x04\x41\x10\x44\x11\x04\x41\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x1c\x08\x84\x11\x04\x41\x10\x44\x10\x88\x1c\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x5c\x18\x84\x11\x04\x41\x10\x44\x11\x88\x5c\x10\x04\x01\x00'\
b'\x00\x00\x00\x00\x00\x1d\x08\xc4\x11\x04\x41\x10\x44\x10\x8c\x1d\x00\x40\x10\x04'\
b'\x00\x00\x00\x00\x00\x6e\x0c\x42\x00\x80\x20\x08\x02\x00\x80\x20\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x3e\x10\x44\x10\xc0\x0c\x00\x84\x11\x04\x3e\x00\x00\x00\x00'\
b'\x00\x04\x01\x00\x40\x7e\x04\x01\x00\x40\x10\x04\x01\x00\x40\x0f\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x41\x10\x44\x11\x04\x41\x10\x44\x10\x8c\x1d\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x80\x90\x44\x10\x88\x22\x08\x81\x40\x50\x08\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x88\xa7\x29\x49\x54\x55\x15\x45\x50\x88\x22\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x41\x08\x81\x40\x50\x08\x05\x01\x40\x88\x41\x00\x00\x00\x00'\
b'\x00\x00\x00\x00\x00\x41\x10\x42\x20\x88\x14\x05\x01\x40\x20\x08\x04\x01\x01\x80'\
b'\x00\x00\x00\x00\x00\x7f\x80\x20\x10\x08\x04\x02\x01\x00\x80\x7f\x80\x00\x00\x00'\
b'\x00\x01\x80\x80\x20\x08\x02\x00\x80\x60\x30\x06\x00\x80\x20\x08\x02\x00\x80\x18'\
b'\x00\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20\x08\x02\x00\x80\x20'\
b'\x00\x06\x00\x40\x10\x04\x01\x00\x40\x18\x03\x01\x80\x40\x10\x04\x01\x00\x40\x60'\
b'\x00\x00\x00\x00\x00\x00\x00\x03\x91\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x03\xe0\x88\x22\x08\x82\x20\x88\x22\x08\x82\x20\x88\x22\x08\x83\xe0\x00'\
_font10mono_index = b'\x00\x00\x14\x00\x28\x00\x3c\x00\x50\x00\x64\x00\x78\x00\x8c\x00'\
b'\xa0\x00\xb4\x00\xc8\x00\xdc\x00\xf0\x00\x04\x01\x18\x01\x2c\x01'\
b'\x40\x01\x54\x01\x68\x01\x7c\x01\x90\x01\xa4\x01\xb8\x01\xcc\x01'\
b'\xe0\x01\xf4\x01\x08\x02\x1c\x02\x30\x02\x44\x02\x58\x02\x6c\x02'\
b'\x80\x02\x94\x02\xa8\x02\xbc\x02\xd0\x02\xe4\x02\xf8\x02\x0c\x03'\
b'\x20\x03\x34\x03\x48\x03\x5c\x03\x70\x03\x84\x03\x98\x03\xac\x03'\
b'\xc0\x03\xd4\x03\xe8\x03\xfc\x03\x10\x04\x24\x04\x38\x04\x4c\x04'\
b'\x60\x04\x74\x04\x88\x04\x9c\x04\xb0\x04\xc4\x04\xd8\x04\xec\x04'\
b'\x00\x05\x14\x05\x28\x05\x3c\x05\x50\x05\x64\x05\x78\x05\x8c\x05'\
b'\xa0\x05\xb4\x05\xc8\x05\xdc\x05\xf0\x05\x04\x06\x18\x06\x2c\x06'\
b'\x40\x06\x54\x06\x68\x06\x7c\x06\x90\x06\xa4\x06\xb8\x06\xcc\x06'\
b'\xe0\x06\xf4\x06\x08\x07\x1c\x07\x30\x07\x44\x07\x58\x07\x6c\x07'\
b'\x80\x07'
font10mono = TFTfont.TFTFont(_font10mono, _font10mono_index, 16, 10, 96)
fonts = {"font10mono":font10mono,
}
| 77.344538
| 98
| 0.718166
| 2,248
| 9,204
| 2.936388
| 0.058274
| 0.443569
| 0.504469
| 0.474474
| 0.700348
| 0.680503
| 0.648841
| 0.624451
| 0.59082
| 0.545372
| 0
| 0.447017
| 0.014668
| 9,204
| 118
| 99
| 78
| 0.280847
| 0.004237
| 0
| 0
| 1
| 0.955752
| 0.924034
| 0.922069
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.00885
| 0
| 0.00885
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 10
|
046b5f61ce615c6d712272d65185158b01ea249f
| 1,626
|
py
|
Python
|
test/test_delete_group.py
|
mihushynmaksym/Python_Training
|
cc9c4d7319bd24f435e750feecd6c32ffc188ae3
|
[
"Apache-2.0"
] | null | null | null |
test/test_delete_group.py
|
mihushynmaksym/Python_Training
|
cc9c4d7319bd24f435e750feecd6c32ffc188ae3
|
[
"Apache-2.0"
] | null | null | null |
test/test_delete_group.py
|
mihushynmaksym/Python_Training
|
cc9c4d7319bd24f435e750feecd6c32ffc188ae3
|
[
"Apache-2.0"
] | null | null | null |
from random import randrange
__author__ = 'Max'
def test_delete_some_group(app):
app.group.find_group_button() # find button "group" on the page
app.group.if_not_group_create_group() # if not have any groups = create group
old_groups = app.group.get_group_list() # Check lists - 1 (delete group)
index = randrange(len(old_groups)) # add random for delete groups
app.group.delete_group_by_index(index) # add random for delete groups
new_group = app.group.get_group_list() # Check lists - 1 (delete group)
assert len(old_groups) - 1 == len(new_group) # Check lists - 1 (delete group)
old_groups[index:index + 1] = [] # Check lists - 1 (delete group), add random for delete groups
assert old_groups == new_group # Check lists - 1 (delete group)
# def test_delete_all_group(app):
# app.group.find_group_button() # find button "group" on the page
# app.group.if_not_group_create_group() # if not have any groups = create group
# old_groups = app.group.get_group_list() # Check lists - 1 (delete group)
# index =(len(old_groups)) # add random for delete groups
# app.group.delete_all_groups_by_index(index) # add random for delete groups
# new_group = app.group.get_group_list() # Check lists - 1 (delete group)
# assert len(old_groups)== len(new_group) # Check lists - 1 (delete group)
# old_groups[index:index + 1] = [] # Check lists - 1 (delete group), add random for delete groups
# assert old_groups == new_group # Check lists - 1 (delete group)
#need rework
| 50.8125
| 106
| 0.669127
| 237
| 1,626
| 4.367089
| 0.164557
| 0.116908
| 0.10628
| 0.164251
| 0.902415
| 0.902415
| 0.902415
| 0.902415
| 0.902415
| 0.902415
| 0
| 0.010408
| 0.231857
| 1,626
| 31
| 107
| 52.451613
| 0.818255
| 0.662977
| 0
| 0
| 0
| 0
| 0.005825
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.083333
| false
| 0
| 0.083333
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
04dc755a2eafddd8e852f0e6674535190e1ed85c
| 5,475
|
py
|
Python
|
AmbidexteriousBounce.py
|
l0vemachin3/AmbidexteriousBounce
|
fbb4499bf46f184e2d0b31900034847a4782257d
|
[
"MIT"
] | null | null | null |
AmbidexteriousBounce.py
|
l0vemachin3/AmbidexteriousBounce
|
fbb4499bf46f184e2d0b31900034847a4782257d
|
[
"MIT"
] | null | null | null |
AmbidexteriousBounce.py
|
l0vemachin3/AmbidexteriousBounce
|
fbb4499bf46f184e2d0b31900034847a4782257d
|
[
"MIT"
] | null | null | null |
from tkinter import *
import random
import time
class Ball:
def __init__(self, canvas, paddle, paddle2, color):
self.canvas = canvas
self.paddle = paddle
self.paddle2 = paddle2
self.id = canvas.create_oval(10, 10, 25, 25, fill=color)
self.canvas.move(self.id, 245, 100)
starts = [-3, -2, -1, 1, 2, 3]
random.shuffle(starts)
self.x = starts[0]
self.y = -3
self.canvas_height = self.canvas.winfo_height()
self.canvas_width = self.canvas.winfo_width()
self.hit_bottom = False
def draw(self):
self.canvas.move(self.id, self.x, self.y)
pos = self.canvas.coords(self.id)
if pos[1] <= 0:
self.y = 3
if pos[3] >= self.canvas_height:
self.hit_bottom = True
if self.hit_paddle(pos) == True:
self.y = -3
if self.hit_paddle2(pos) == True:
self.y = -3
if pos[0] <= 0:
self.x = 3
if pos[2] >= self.canvas_width:
self.x = -3
def hit_paddle(self, pos):
paddle_pos = self.canvas.coords(self.paddle.id)
if pos[2] >= paddle_pos[0] and pos[0] <= paddle_pos[2]:
if pos[3] >= paddle_pos[1] and pos[3] <= paddle_pos[3]:
return True
return False
def hit_paddle2(self, pos):
paddle2_pos = self.canvas.coords(self.paddle2.id)
if pos[2] >= paddle2_pos[0] and pos[0] <= paddle2_pos[2]:
if pos[3] >= paddle2_pos[1] and pos[3] <= paddle2_pos[3]:
return True
return False
class Ball2:
def __init__(self, canvas, paddle, paddle2, color):
self.canvas = canvas
self.paddle = paddle
self.paddle2 = paddle2
self.id = canvas.create_oval(10, 10, 25, 25, fill=color)
self.canvas.move(self.id, 245, 100)
starts = [-3, -2, -1, 1, 2, 3]
random.shuffle(starts)
self.x = starts[0]
self.y = -3
self.canvas_height = self.canvas.winfo_height()
self.canvas_width = self.canvas.winfo_width()
self.hit_bottom = False
def draw(self):
self.canvas.move(self.id, self.x, self.y)
pos = self.canvas.coords(self.id)
if pos[1] <= 0:
self.y = 3
if pos[3] >= self.canvas_height:
self.hit_bottom = True
if self.hit_paddle(pos) == True:
self.y = -3
if self.hit_paddle2(pos) == True:
self.y = -3
if pos[0] <= 0:
self.x = 3
if pos[2] >= self.canvas_width:
self.x = -3
def hit_paddle(self, pos):
paddle_pos = self.canvas.coords(self.paddle.id)
if pos[2] >= paddle_pos[0] and pos[0] <= paddle_pos[2]:
if pos[3] >= paddle_pos[1] and pos[3] <= paddle_pos[3]:
return True
return False
def hit_paddle2(self, pos):
paddle2_pos = self.canvas.coords(self.paddle2.id)
if pos[2] >= paddle2_pos[0] and pos[0] <= paddle2_pos[2]:
if pos[3] >= paddle2_pos[1] and pos[3] <= paddle2_pos[3]:
return True
return False
class Paddle:
def __init__(self, canvas, color):
self.canvas = canvas
self.id = canvas.create_rectangle(0, 0, 100, 10, fill=color)
self.canvas.move(self.id, 200, 300)
self.x = 0
self.canvas_width = self.canvas.winfo_width()
self.canvas.bind_all('<KeyPress-Left>', self.turn_left)
self.canvas.bind_all('<KeyPress-Right>', self.turn_right)
self.canvas.bind_all('<KeyPress-Button_1>')
def draw(self):
self.canvas.move(self.id, self.x, 0)
pos = self.canvas.coords(self.id)
if pos[0] <= 0:
self.x = 0
elif pos[2] >= self.canvas_width:
self.x = 0
def turn_left(self, evt):
self.x = -2
def turn_right(self, evt):
self.x = 2
class Paddle2:
def __init__(self, canvas, color):
self.canvas = canvas
self.id = canvas.create_rectangle(0, 0, 100, 10, fill=color)
self.canvas.move(self.id, 200, 300)
self.x = 0
self.canvas_width = self.canvas.winfo_width()
self.canvas.bind_all('<KeyPress-a>', self.turn_left)
self.canvas.bind_all('<KeyPress-d>', self.turn_right)
def draw(self):
self.canvas.move(self.id, self.x, 0)
pos = self.canvas.coords(self.id)
if pos[0] <= 0:
self.x = 0
elif pos[2] >= self.canvas_width:
self.x = 0
def turn_left(self, evt):
self.x = -2
def turn_right(self, evt):
self.x = 2
tk = Tk()
tk.title("Ambidexterious Bounce")
tk.resizable(0, 0)
tk.wm_attributes("-topmost", 1)
canvas = Canvas(tk, width=500, height=400, bd=0, highlightthickness=0)
canvas.pack()
tk.update()
paddle2 = Paddle2(canvas, 'blue')
paddle = Paddle(canvas, 'red')
ball2 = Ball2(canvas, paddle, paddle2, 'yellow')
ball = Ball(canvas, paddle, paddle2, 'green')
while 1:
if ball.hit_bottom == False:
if ball2.hit_bottom == False:
ball2.draw()
ball.draw()
paddle.draw()
paddle2.draw()
tk.update_idletasks()
tk.update()
time.sleep(0.01)
| 32.981928
| 71
| 0.534977
| 747
| 5,475
| 3.803213
| 0.108434
| 0.165435
| 0.042239
| 0.050686
| 0.828933
| 0.820134
| 0.820134
| 0.820134
| 0.794087
| 0.794087
| 0
| 0.052357
| 0.333699
| 5,475
| 165
| 72
| 33.181818
| 0.726425
| 0
| 0
| 0.789116
| 0
| 0
| 0.022787
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.108844
| false
| 0
| 0.020408
| 0
| 0.210884
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
04fbd8fb951cdac0969d9103a4ef43bde6b59f91
| 36,951
|
py
|
Python
|
out/manticoresearch-python/manticoresearch/api/index_api.py
|
vsmid/openapi
|
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
|
[
"MIT"
] | null | null | null |
out/manticoresearch-python/manticoresearch/api/index_api.py
|
vsmid/openapi
|
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
|
[
"MIT"
] | null | null | null |
out/manticoresearch-python/manticoresearch/api/index_api.py
|
vsmid/openapi
|
75c70e36707f7842fcfcf9c5b5765fbe96dc6caf
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
Manticore Search Client
Contact: info@manticoresearch.com
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from manticoresearch.api_client import ApiClient
from manticoresearch.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class IndexApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def bulk(self, body, **kwargs): # noqa: E501
"""Bulk index operations # noqa: E501
Sends multiple operatons like inserts, updates, replaces or deletes. For each operation it's object must have same format as in their dedicated method. The method expects a raw string as the batch in NDJSON. Each operation object needs to be serialized to JSON and separated by endline (\\n). An example of raw input: ``` {\"insert\": {\"index\": \"movies\", \"doc\": {\"plot\": \"A secret team goes to North Pole\", \"rating\": 9.5, \"language\": [2, 3], \"title\": \"This is an older movie\", \"lon\": 51.99, \"meta\": {\"keywords\":[\"travel\",\"ice\"],\"genre\":[\"adventure\"]}, \"year\": 1950, \"lat\": 60.4, \"advise\": \"PG-13\"}}} \\n {\"delete\": {\"index\": \"movies\",\"id\":700}} ``` Responds with an object telling whenever any errors occured and an array with status for each operation: ``` {'items':[{'update':{'_index':'products','_id':1,'result':'updated'}},{'update':{'_index':'products','_id':2,'result':'updated'}}],'errors':false} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.bulk(body, async_req=True)
>>> result = thread.get()
:param body: (required)
:type body: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: BulkResponse
"""
kwargs['_return_http_data_only'] = True
return self.bulk_with_http_info(body, **kwargs) # noqa: E501
def bulk_with_http_info(self, body, **kwargs): # noqa: E501
"""Bulk index operations # noqa: E501
Sends multiple operatons like inserts, updates, replaces or deletes. For each operation it's object must have same format as in their dedicated method. The method expects a raw string as the batch in NDJSON. Each operation object needs to be serialized to JSON and separated by endline (\\n). An example of raw input: ``` {\"insert\": {\"index\": \"movies\", \"doc\": {\"plot\": \"A secret team goes to North Pole\", \"rating\": 9.5, \"language\": [2, 3], \"title\": \"This is an older movie\", \"lon\": 51.99, \"meta\": {\"keywords\":[\"travel\",\"ice\"],\"genre\":[\"adventure\"]}, \"year\": 1950, \"lat\": 60.4, \"advise\": \"PG-13\"}}} \\n {\"delete\": {\"index\": \"movies\",\"id\":700}} ``` Responds with an object telling whenever any errors occured and an array with status for each operation: ``` {'items':[{'update':{'_index':'products','_id':1,'result':'updated'}},{'update':{'_index':'products','_id':2,'result':'updated'}}],'errors':false} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.bulk_with_http_info(body, async_req=True)
>>> result = thread.get()
:param body: (required)
:type body: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(BulkResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'body'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method bulk" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
local_var_params['body'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `body` when calling `bulk`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/x-ndjson']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/json/bulk', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='BulkResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def delete(self, delete_document_request, **kwargs): # noqa: E501
"""Delete a document in an index # noqa: E501
Delete one or several documents. The method has 2 ways of deleting: either by id, in case only one document is deleted or by using a match query, in which case multiple documents can be delete . Example of input to delete by id: ``` {'index':'movies','id':100} ``` Example of input to delete using a query: ``` {'index':'movies','query':{'bool':{'must':[{'query_string':'new movie'}]}}} ``` The match query has same syntax as in for searching. Responds with an object telling how many documents got deleted: ``` {'_index':'products','updated':1} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete(delete_document_request, async_req=True)
>>> result = thread.get()
:param delete_document_request: (required)
:type delete_document_request: DeleteDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: DeleteResponse
"""
kwargs['_return_http_data_only'] = True
return self.delete_with_http_info(delete_document_request, **kwargs) # noqa: E501
def delete_with_http_info(self, delete_document_request, **kwargs): # noqa: E501
"""Delete a document in an index # noqa: E501
Delete one or several documents. The method has 2 ways of deleting: either by id, in case only one document is deleted or by using a match query, in which case multiple documents can be delete . Example of input to delete by id: ``` {'index':'movies','id':100} ``` Example of input to delete using a query: ``` {'index':'movies','query':{'bool':{'must':[{'query_string':'new movie'}]}}} ``` The match query has same syntax as in for searching. Responds with an object telling how many documents got deleted: ``` {'_index':'products','updated':1} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_with_http_info(delete_document_request, async_req=True)
>>> result = thread.get()
:param delete_document_request: (required)
:type delete_document_request: DeleteDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(DeleteResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'delete_document_request'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method delete" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'delete_document_request' is set
if self.api_client.client_side_validation and ('delete_document_request' not in local_var_params or # noqa: E501
local_var_params['delete_document_request'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `delete_document_request` when calling `delete`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'delete_document_request' in local_var_params:
body_params = local_var_params['delete_document_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/json/delete', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DeleteResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def insert(self, insert_document_request, **kwargs): # noqa: E501
"""Create a new document in an index # noqa: E501
Insert a document. Expects an object like: ``` {'index':'movies','id':701,'doc':{'title':'This is an old movie','plot':'A secret team goes to North Pole','year':1950,'rating':9.5,'lat':60.4,'lon':51.99,'advise':'PG-13','meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}','language':[2,3]}} ``` The document id can also be missing, in which case an autogenerated one will be used: ``` {'index':'movies','doc':{'title':'This is a new movie','plot':'A secret team goes to North Pole','year':2020,'rating':9.5,'lat':60.4,'lon':51.99,'advise':'PG-13','meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}','language':[2,3]}} ``` It responds with an object in format: ``` {'_index':'products','_id':701,'created':true,'result':'created','status':201} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.insert(insert_document_request, async_req=True)
>>> result = thread.get()
:param insert_document_request: (required)
:type insert_document_request: InsertDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: SuccessResponse
"""
kwargs['_return_http_data_only'] = True
return self.insert_with_http_info(insert_document_request, **kwargs) # noqa: E501
def insert_with_http_info(self, insert_document_request, **kwargs): # noqa: E501
"""Create a new document in an index # noqa: E501
Insert a document. Expects an object like: ``` {'index':'movies','id':701,'doc':{'title':'This is an old movie','plot':'A secret team goes to North Pole','year':1950,'rating':9.5,'lat':60.4,'lon':51.99,'advise':'PG-13','meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}','language':[2,3]}} ``` The document id can also be missing, in which case an autogenerated one will be used: ``` {'index':'movies','doc':{'title':'This is a new movie','plot':'A secret team goes to North Pole','year':2020,'rating':9.5,'lat':60.4,'lon':51.99,'advise':'PG-13','meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}','language':[2,3]}} ``` It responds with an object in format: ``` {'_index':'products','_id':701,'created':true,'result':'created','status':201} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.insert_with_http_info(insert_document_request, async_req=True)
>>> result = thread.get()
:param insert_document_request: (required)
:type insert_document_request: InsertDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(SuccessResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'insert_document_request'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method insert" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'insert_document_request' is set
if self.api_client.client_side_validation and ('insert_document_request' not in local_var_params or # noqa: E501
local_var_params['insert_document_request'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `insert_document_request` when calling `insert`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'insert_document_request' in local_var_params:
body_params = local_var_params['insert_document_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/json/insert', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='SuccessResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def replace(self, insert_document_request, **kwargs): # noqa: E501
"""Replace new document in an index # noqa: E501
Replace an existing document. Input has same format as `insert` operation. <br/> Responds with an object in format: <br/> ``` {'_index':'products','_id':1,'created':false,'result':'updated','status':200} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace(insert_document_request, async_req=True)
>>> result = thread.get()
:param insert_document_request: (required)
:type insert_document_request: InsertDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: SuccessResponse
"""
kwargs['_return_http_data_only'] = True
return self.replace_with_http_info(insert_document_request, **kwargs) # noqa: E501
def replace_with_http_info(self, insert_document_request, **kwargs): # noqa: E501
"""Replace new document in an index # noqa: E501
Replace an existing document. Input has same format as `insert` operation. <br/> Responds with an object in format: <br/> ``` {'_index':'products','_id':1,'created':false,'result':'updated','status':200} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.replace_with_http_info(insert_document_request, async_req=True)
>>> result = thread.get()
:param insert_document_request: (required)
:type insert_document_request: InsertDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(SuccessResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'insert_document_request'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method replace" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'insert_document_request' is set
if self.api_client.client_side_validation and ('insert_document_request' not in local_var_params or # noqa: E501
local_var_params['insert_document_request'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `insert_document_request` when calling `replace`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'insert_document_request' in local_var_params:
body_params = local_var_params['insert_document_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/json/replace', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='SuccessResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def update(self, update_document_request, **kwargs): # noqa: E501
"""Update a document in an index # noqa: E501
Update one or several documents. The update can be made by passing the id or by using a match query in case multiple documents can be updated. For example update a document using document id: ``` {'index':'movies','doc':{'rating':9.49},'id':100} ``` And update by using a match query: ``` {'index':'movies','doc':{'rating':9.49},'query':{'bool':{'must':[{'query_string':'new movie'}]}}} ``` The match query has same syntax as for searching. Responds with an object that tells how many documents where updated in format: ``` {'_index':'products','updated':1} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update(update_document_request, async_req=True)
>>> result = thread.get()
:param update_document_request: (required)
:type update_document_request: UpdateDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: UpdateResponse
"""
kwargs['_return_http_data_only'] = True
return self.update_with_http_info(update_document_request, **kwargs) # noqa: E501
def update_with_http_info(self, update_document_request, **kwargs): # noqa: E501
"""Update a document in an index # noqa: E501
Update one or several documents. The update can be made by passing the id or by using a match query in case multiple documents can be updated. For example update a document using document id: ``` {'index':'movies','doc':{'rating':9.49},'id':100} ``` And update by using a match query: ``` {'index':'movies','doc':{'rating':9.49},'query':{'bool':{'must':[{'query_string':'new movie'}]}}} ``` The match query has same syntax as for searching. Responds with an object that tells how many documents where updated in format: ``` {'_index':'products','updated':1} ``` # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.update_with_http_info(update_document_request, async_req=True)
>>> result = thread.get()
:param update_document_request: (required)
:type update_document_request: UpdateDocumentRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(UpdateResponse, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'update_document_request'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method update" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'update_document_request' is set
if self.api_client.client_side_validation and ('update_document_request' not in local_var_params or # noqa: E501
local_var_params['update_document_request'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `update_document_request` when calling `update`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'update_document_request' in local_var_params:
body_params = local_var_params['update_document_request']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/json/update', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='UpdateResponse', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
| 52.043662
| 1,018
| 0.601553
| 4,215
| 36,951
| 5.060735
| 0.070463
| 0.030003
| 0.042661
| 0.025315
| 0.958417
| 0.956917
| 0.951667
| 0.946275
| 0.940931
| 0.939056
| 0
| 0.016596
| 0.303699
| 36,951
| 709
| 1,019
| 52.117066
| 0.812468
| 0.56694
| 0
| 0.712871
| 0
| 0
| 0.180485
| 0.065244
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036304
| false
| 0
| 0.016502
| 0
| 0.089109
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
b6c5251b00aada1b189465c759a7d830157a100b
| 75
|
py
|
Python
|
app/schemas/__init__.py
|
EZhivaikin/TrialPython
|
2424b85faabc8eecea108cc5b16a4ec6b7a12cf1
|
[
"BSD-2-Clause"
] | null | null | null |
app/schemas/__init__.py
|
EZhivaikin/TrialPython
|
2424b85faabc8eecea108cc5b16a4ec6b7a12cf1
|
[
"BSD-2-Clause"
] | null | null | null |
app/schemas/__init__.py
|
EZhivaikin/TrialPython
|
2424b85faabc8eecea108cc5b16a4ec6b7a12cf1
|
[
"BSD-2-Clause"
] | null | null | null |
from app.schemas.brand import Brand
from app.schemas.product import Product
| 37.5
| 39
| 0.853333
| 12
| 75
| 5.333333
| 0.5
| 0.21875
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093333
| 75
| 2
| 39
| 37.5
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
b6edb73ce1ebcc46955224377b7f36e48ef55273
| 11,970
|
py
|
Python
|
zz.py
|
JITENDRAMINDA/singh
|
0a92e4ca772dab34b9ac0fbe762a91209eb911b7
|
[
"MIT"
] | null | null | null |
zz.py
|
JITENDRAMINDA/singh
|
0a92e4ca772dab34b9ac0fbe762a91209eb911b7
|
[
"MIT"
] | null | null | null |
zz.py
|
JITENDRAMINDA/singh
|
0a92e4ca772dab34b9ac0fbe762a91209eb911b7
|
[
"MIT"
] | null | null | null |
from pyrogram import Client, Filters, Emoji
import random
import time
app = Client("session",bot_token="663574960:AAGWg1VGruCPuckHzjbpDLRIbPWkX6YcDlc",api_id=605563,api_hash="7f2c2d12880400b88764b9b304e14e0b")
@app.on_message(Filters.command('bowl'))
def ran(client, message):
b = client.get_chat_member(message.chat.id,message.from_user.id)
client.send_message(-1001250871922, message.text + " " + str(message.chat.id) +" " + str(message.from_user.id) + str(b.user.first_name+" "+ "@" +b.user.username))
if b.status == 'administrator' or b.status =="creator":
if len(message.text.split(' ')) > 1:
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("1"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("1"))
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("1"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("2"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("2"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("2"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("3"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("3"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("3"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("4"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("4"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("4"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("5"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("5"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("5"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("6"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("6"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball"])
if a.text == "Ball 0.1🎾: no ball" or a.text == "Ball 0.1🎾: wide ball":
a = message.reply(random.choice([ "**Ball 0.{}🎾**: Score **" + x + "** Runs","**Ball 0.{}🎾**: " + z, "**Ball 0.{}🎾**: Score **" + x + "** Runs" ,"**Ball 0.{}🎾**: " + z,"**Ball 0.{}🎾**:" + y ,"**Ball 0.{}🎾**: Score **" + x + "** Runs" , ]).format("6"))
time.sleep(2)
x = random.choice(["3","2","3","4","2","1","2","4","1","6","3","4","2","3","6","4","3"])
y = random.choice(["Run out","catch out","🚾 Wicket 🚾"])
z = random.choice(["dot ball","wide ball","no ball"])
else:
message.reply('Please write ball number after command!')
@app.on_message(Filters. command('leavechat'))
def ran(client,message):
if message.from_user.id == 312525402:
if len(message.text.split( )) > 1:
client.leave_chat(int(message.text.split(' ')[1]))
else:
client.leave_chat(message.chat.id)
@app.on_message(Filters. command('cnnn'))
def ran(client,message):
x = client.get_chat_member(message.chat.id , message.from_user.id).status
if x == "administrator" or x == "creator":
with open("sure.txt","w") as file:
file.write("no")
file.close()
message.reply("Success off")
app.run()
| 87.372263
| 280
| 0.47452
| 2,141
| 11,970
| 2.803363
| 0.043438
| 0.056648
| 0.161946
| 0.17994
| 0.892869
| 0.879873
| 0.872709
| 0.872709
| 0.872709
| 0.872709
| 0
| 0.060287
| 0.197661
| 11,970
| 136
| 281
| 88.014706
| 0.511558
| 0
| 0
| 0.825758
| 0
| 0
| 0.413132
| 0.006507
| 0
| 0
| 0
| 0
| 0
| 1
| 0.022727
| false
| 0
| 0.022727
| 0
| 0.045455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
8e4e21f18cfa6dcd42569d86c08e75f11e4d2fb8
| 7,193
|
py
|
Python
|
doc/source/examples/transform.py
|
WhiteSheet/pcsg
|
23d34a5dd76cf7b2715cb455c2105c90ecb9090c
|
[
"MIT"
] | null | null | null |
doc/source/examples/transform.py
|
WhiteSheet/pcsg
|
23d34a5dd76cf7b2715cb455c2105c90ecb9090c
|
[
"MIT"
] | null | null | null |
doc/source/examples/transform.py
|
WhiteSheet/pcsg
|
23d34a5dd76cf7b2715cb455c2105c90ecb9090c
|
[
"MIT"
] | null | null | null |
import math
import pcsg
from exampleimg import runtime
from exampleimg import conf
def _setAttributes2D (attributes):
return attributes.override ({
'camera.view': (0, 0, 0, 0, 0, 0, 8)
})
def _setAttributes (attributes):
return attributes.override ({
'camera.view': (0, 0, 0, 70, 0, 30, 12),
'camera.projection': 'perspective'
})
def _posttransform (item):
return pcsg.transform.Translate (pcsg.solid.LinearExtrude (height = 1, children = (item)), z = 2)
# Examples for transform.Translate
class Translate:
"""
"""
@staticmethod
def example_a (attributes, isThumbnail):
"""
Transform solid on x-axis
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Translate (body, y = 2)
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Translate (body, y = 2, attributes = {'material': conf.getMaterial (1)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_b (attributes, isThumbnail):
"""
Transform solid on x- and y-axis
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Translate (body, x = 1, y = 2)
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Translate (body, x = 1, y = 2, attributes = {'material': conf.getMaterial (1)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_c (attributes, isThumbnail):
"""
Transform solid by vector
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Translate (body, (1, 2, -2))
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Translate (body, (1, 2, -2), attributes = {'material': conf.getMaterial (1)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_d (attributes, isThumbnail):
"""
Transform shape by vector
import pcsg
body = pcsg.shape.Circle (radius = 0.5)
item = pcsg.transform.Translate (body, (0.5, 1))
"""
body = pcsg.shape.Circle (radius = 0.5, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Translate (body, (0.5, 1), attributes = {'material': conf.getMaterial (1)})
a = _setAttributes2D (attributes)
return ((a, body),(a, item))
# Examples for transform.Scale
class Scale:
"""
"""
@staticmethod
def example_a (attributes, isThumbnail):
"""
Scale solid on x-axis
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Scale (body, sy = 2)
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Scale (body, sy = 2, attributes = {'material': conf.getMaterial (2)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_b (attributes, isThumbnail):
"""
Scale solid on x- and y-axis
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Scale (body, sx = 0.6, sy = 1.3)
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Scale (body, sx = 0.6, sy = 1.3, attributes = {'material': conf.getMaterial (2)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_c (attributes, isThumbnail):
"""
Scale solid by vector
import pcsg
body = pcsg.solid.Sphere (radius = 1)
item = pcsg.transform.Scale (body, (1.7, 0.9, 1.2))
"""
body = pcsg.solid.Sphere (radius = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Scale (body, (1.7, 0.9, 1.2), attributes = {'material': conf.getMaterial (2)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_d (attributes, isThumbnail):
"""
Scale shape by vector
import pcsg
body = pcsg.shape.Circle (radius = 0.5)
item = pcsg.transform.Scale (body, (0.5, 1))
"""
body = pcsg.shape.Circle (radius = 0.5, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Scale (body, (0.5, 1), attributes = {'material': conf.getMaterial (2)})
a = _setAttributes2D (attributes)
return ((a, body),(a, item))
# Examples for transform.Rotate
class Rotate:
"""
"""
@staticmethod
def example_a (attributes, isThumbnail):
"""
Rotate solid around x-axis
import pcsg
body = pcsg.solid.Cube (size = 1)
item = pcsg.transform.Rotate (body, rx = 25)
"""
body = pcsg.solid.Cube (size = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Rotate (body, rx = 25, attributes = {'material': conf.getMaterial (3)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_b (attributes, isThumbnail):
"""
Rotate solid around x- and y-axis
import pcsg
body = pcsg.solid.Cube (size = 1)
item = pcsg.transform.Rotate (body, rx = 25, ry = 15)
"""
body = pcsg.solid.Cube (size = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Rotate (body, rx = 25, ry = 15, attributes = {'material': conf.getMaterial (3)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_c (attributes, isThumbnail):
"""
Rotate solid around vector
import pcsg
body = pcsg.solid.Cube (size = 1)
item = pcsg.transform.Rotate (body, (10, 20, 35))
"""
body = pcsg.solid.Cube (size = 1, attributes = {'material': conf.getMaterial (0)})
item = pcsg.transform.Rotate (body, (10, 20, 35), attributes = {'material': conf.getMaterial (3)})
a = _setAttributes (attributes)
return ((a, body),(a, item))
@staticmethod
def example_d (attributes, isThumbnail):
"""
Rotate shape around z-axis
import pcsg
body = pcsg.transform.Translate (
pcsg.shape.Square (size = 0.5),
x = 1
)
item = pcsg.transform.Rotate (body, rz = 30)
"""
body = pcsg.transform.Translate (
pcsg.shape.Square (size = 0.5),
x = 1,
attributes = {'material': conf.getMaterial (0)}
)
item = pcsg.transform.Rotate (body, rz = 30, attributes = {'material': conf.getMaterial (3)})
a = _setAttributes2D (attributes)
return ((a, body),(a, item))
| 26.444853
| 111
| 0.56986
| 812
| 7,193
| 5.014778
| 0.096059
| 0.086198
| 0.100196
| 0.194499
| 0.913556
| 0.905206
| 0.84725
| 0.837426
| 0.802063
| 0.774804
| 0
| 0.029994
| 0.290838
| 7,193
| 271
| 112
| 26.542435
| 0.768281
| 0.234256
| 0
| 0.670213
| 0
| 0
| 0.04955
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.159574
| false
| 0
| 0.042553
| 0.031915
| 0.393617
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
6d27592d87213e4eb990e1c7fd9c016c80efe4e4
| 2,214
|
py
|
Python
|
sphinx/util/stemmer/__init__.py
|
danieleades/sphinx
|
1c98aea126919b218766371e1fdf308a1167e95f
|
[
"BSD-2-Clause"
] | null | null | null |
sphinx/util/stemmer/__init__.py
|
danieleades/sphinx
|
1c98aea126919b218766371e1fdf308a1167e95f
|
[
"BSD-2-Clause"
] | null | null | null |
sphinx/util/stemmer/__init__.py
|
danieleades/sphinx
|
1c98aea126919b218766371e1fdf308a1167e95f
|
[
"BSD-2-Clause"
] | null | null | null |
"""Word stemming utilities for Sphinx."""
import warnings
import snowballstemmer
from sphinx.deprecation import RemovedInSphinx70Warning
class PorterStemmer:
def __init__(self):
warnings.warn(f"{self.__class__.__name__} is deprecated, use "
"snowballstemmer.stemmer('porter') instead.",
RemovedInSphinx70Warning, stacklevel=2)
self.stemmer = snowballstemmer.stemmer('porter')
def stem(self, p: str, i: int, j: int) -> str:
warnings.warn(f"{self.__class__.__name__}.stem() is deprecated, use "
"snowballstemmer.stemmer('porter').stemWord() instead.",
RemovedInSphinx70Warning, stacklevel=2)
return self.stemmer.stemWord(p)
class BaseStemmer:
def __init__(self):
warnings.warn(f"{self.__class__.__name__} is deprecated, use "
"snowballstemmer.stemmer('porter') instead.",
RemovedInSphinx70Warning, stacklevel=3)
def stem(self, word: str) -> str:
raise NotImplementedError
class PyStemmer(BaseStemmer):
def __init__(self): # NoQA
super().__init__()
self.stemmer = snowballstemmer.stemmer('porter')
def stem(self, word: str) -> str:
warnings.warn(f"{self.__class__.__name__}.stem() is deprecated, use "
"snowballstemmer.stemmer('porter').stemWord() instead.",
RemovedInSphinx70Warning, stacklevel=2)
return self.stemmer.stemWord(word)
class StandardStemmer(BaseStemmer):
def __init__(self): # NoQA
super().__init__()
self.stemmer = snowballstemmer.stemmer('porter')
def stem(self, word: str) -> str:
warnings.warn(f"{self.__class__.__name__}.stem() is deprecated, use "
"snowballstemmer.stemmer('porter').stemWord() instead.",
RemovedInSphinx70Warning, stacklevel=2)
return self.stemmer.stemWord(word)
def get_stemmer() -> BaseStemmer:
warnings.warn("get_stemmer() is deprecated, use "
"snowballstemmer.stemmer('porter') instead.",
RemovedInSphinx70Warning, stacklevel=2)
return PyStemmer()
| 35.142857
| 78
| 0.629178
| 208
| 2,214
| 6.379808
| 0.211538
| 0.149209
| 0.189902
| 0.135644
| 0.791258
| 0.786737
| 0.770912
| 0.770912
| 0.733233
| 0.733233
| 0
| 0.012143
| 0.256098
| 2,214
| 62
| 79
| 35.709677
| 0.793564
| 0.020777
| 0
| 0.681818
| 0
| 0
| 0.26932
| 0.174456
| 0
| 0
| 0
| 0
| 0
| 1
| 0.204545
| false
| 0
| 0.068182
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
6d2f7d08eb9e4401b804da1d9d08830491463977
| 1,485
|
py
|
Python
|
game/util/configurations.py
|
xelahalo/khet
|
c4aca94703c24c01d106959849240b890fa6744b
|
[
"MIT"
] | null | null | null |
game/util/configurations.py
|
xelahalo/khet
|
c4aca94703c24c01d106959849240b890fa6744b
|
[
"MIT"
] | null | null | null |
game/util/configurations.py
|
xelahalo/khet
|
c4aca94703c24c01d106959849240b890fa6744b
|
[
"MIT"
] | 1
|
2022-03-19T22:25:54.000Z
|
2022-03-19T22:25:54.000Z
|
CLASSIC = [
['▢', '▢', '▢', '▢', 'R▩', 'R▣', 'R▩', 'R◩', '▢', '▢'],
['▢', '▢', 'R⬔', '▢', '▢', '▢', '▢', '▢', '▢', '▢'],
['▢', '▢', '▢', 'B◪', '▢', '▢', '▢', '▢', '▢', '▢'],
['R⬕', '▢', 'B⬔', '▢', 'R\\', 'R/', '▢', 'R◩', '▢', 'B◪'],
['R◩', '▢', 'B◪', '▢', 'B/', 'B\\', '▢', 'R⬕', '▢', 'B⬔'],
['▢', '▢', '▢', '▢', '▢', '▢', 'R◩', '▢', '▢', '▢'],
['▢', '▢', '▢', '▢', '▢', '▢', '▢', 'B⬕', '▢', '▢'],
['▢', '▢', 'B◪', 'B▩', 'B▣', 'B▩', '▢', '▢', '▢', '▢'],
]
IMHOTEP = [
['▢', '▢', '▢', '▢', 'R▩', 'R▣', 'R▩', 'R/', '▢', '▢'],
['▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢'],
['▢', '▢', '▢', 'B◪', '▢', '▢', 'R⬕', '▢', '▢', '▢'],
['R⬕', 'B⬔', '▢', '▢', 'B◩', 'R/', '▢', '▢', 'R◩', 'B◪'],
['R◩', 'B◪', '▢', '▢', 'B/', 'R◪', '▢', '▢', 'R⬕', 'B⬔'],
['▢', '▢', '▢', 'B⬔', '▢', '▢', 'R◩', '▢', '▢', '▢'],
['▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢', '▢'],
['▢', '▢', 'B/', 'B▩', 'B▣', 'B▩', '▢', '▢', '▢', '▢'],
]
# -1 == wall, 1 == red, 2 == blue
BOARD_MASK = [
[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
[-1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, -1],
[-1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, -1],
[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
]
| 42.428571
| 62
| 0.138721
| 330
| 1,485
| 1.081818
| 0.057576
| 0.470588
| 0.537815
| 0.560224
| 0.829132
| 0.778711
| 0.747899
| 0.689076
| 0.644258
| 0.644258
| 0
| 0.1141
| 0.274074
| 1,485
| 35
| 63
| 42.428571
| 0.076067
| 0.020875
| 0
| 0.3125
| 0
| 0
| 0.144529
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
ed9064589a3f75bf239ce30746e972c9630bf6bd
| 34
|
py
|
Python
|
tsundoku/blueprints/api/__init__.py
|
fossabot/Tsundoku
|
45ed2492ca003130e1b32a64127ee5cb79404089
|
[
"MIT"
] | null | null | null |
tsundoku/blueprints/api/__init__.py
|
fossabot/Tsundoku
|
45ed2492ca003130e1b32a64127ee5cb79404089
|
[
"MIT"
] | null | null | null |
tsundoku/blueprints/api/__init__.py
|
fossabot/Tsundoku
|
45ed2492ca003130e1b32a64127ee5cb79404089
|
[
"MIT"
] | null | null | null |
from .routes import api_blueprint
| 17
| 33
| 0.852941
| 5
| 34
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
|
0
| 7
|
ed964155ec45969ee7febe333ae7298b1d6334e6
| 94
|
py
|
Python
|
tests/test_clusterStructures/__init__.py
|
alekLukanen/pyDist
|
ffb2c3feb20afba078fec7381c8785eb1e2b0543
|
[
"MIT"
] | 5
|
2017-12-24T08:11:16.000Z
|
2019-02-07T22:13:26.000Z
|
tests/test_clusterStructures/__init__.py
|
alekLukanen/pyDist
|
ffb2c3feb20afba078fec7381c8785eb1e2b0543
|
[
"MIT"
] | 1
|
2021-06-01T23:17:31.000Z
|
2021-06-01T23:17:31.000Z
|
tests/test_clusterStructures/__init__.py
|
alekLukanen/pyDist
|
ffb2c3feb20afba078fec7381c8785eb1e2b0543
|
[
"MIT"
] | null | null | null |
#import tests.test_clusterStructures.star
from tests.test_clusterStructures.star import *
| 23.5
| 48
| 0.829787
| 11
| 94
| 6.909091
| 0.545455
| 0.236842
| 0.684211
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 94
| 3
| 49
| 31.333333
| 0.904762
| 0.425532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
eddd8ebe6df10239aca49b965e619b21266050b2
| 2,623
|
py
|
Python
|
Baxter/ros_ws/build/baxter_simulator/baxter_sim_hardware/catkin_generated/pkg.develspace.context.pc.py
|
keke02/Fast-reconfiguration-of-robotic-production-systems
|
44ffe14b8a4a4798b559eede9b3766acb55f294e
|
[
"CC0-1.0"
] | null | null | null |
Baxter/ros_ws/build/baxter_simulator/baxter_sim_hardware/catkin_generated/pkg.develspace.context.pc.py
|
keke02/Fast-reconfiguration-of-robotic-production-systems
|
44ffe14b8a4a4798b559eede9b3766acb55f294e
|
[
"CC0-1.0"
] | null | null | null |
Baxter/ros_ws/build/baxter_simulator/baxter_sim_hardware/catkin_generated/pkg.develspace.context.pc.py
|
keke02/Fast-reconfiguration-of-robotic-production-systems
|
44ffe14b8a4a4798b559eede9b3766acb55f294e
|
[
"CC0-1.0"
] | null | null | null |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/etudiant/M1_ISTR/Baxter/ros_ws/src/baxter_simulator/baxter_sim_hardware/include;/usr/include/opencv;/usr/include".split(';') if "/home/etudiant/M1_ISTR/Baxter/ros_ws/src/baxter_simulator/baxter_sim_hardware/include;/usr/include/opencv;/usr/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;baxter_core_msgs;cv_bridge;image_transport;baxter_sim_kinematics".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lbaxter_sim_hardware;-l:/usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_video.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_superres.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_stitching.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_photo.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_ocl.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_ml.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_legacy.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_gpu.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_flann.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_features2d.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_contrib.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.2.4.8".split(';') if "-lbaxter_sim_hardware;-l:/usr/lib/x86_64-linux-gnu/libopencv_videostab.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_video.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_superres.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_stitching.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_photo.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_ocl.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_objdetect.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_ml.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_legacy.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_gpu.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_flann.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_features2d.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_contrib.so.2.4.8;-l:/usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.2.4.8" != "" else []
PROJECT_NAME = "baxter_sim_hardware"
PROJECT_SPACE_DIR = "/home/etudiant/M1_ISTR/Baxter/ros_ws/devel"
PROJECT_VERSION = "1.2.12"
| 291.444444
| 1,988
| 0.774304
| 550
| 2,623
| 3.496364
| 0.141818
| 0.070723
| 0.123765
| 0.176807
| 0.846074
| 0.846074
| 0.846074
| 0.830993
| 0.830993
| 0.830993
| 0
| 0.096362
| 0.014868
| 2,623
| 8
| 1,989
| 327.875
| 0.647833
| 0.020587
| 0
| 0
| 1
| 0.571429
| 0.895208
| 0.883911
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 14
|
b65d67b885072922f1cb6f6403d321af9ba7beb4
| 1,551
|
py
|
Python
|
scripts/colum.py
|
OkanoShogo0903/character_estimation
|
a1bab033e61aae1d9fd0ad7eba1700ddc05166ab
|
[
"MIT"
] | 8
|
2019-05-15T13:32:28.000Z
|
2020-07-12T13:32:18.000Z
|
scripts/colum.py
|
OkanoShogo0903/character_estimation
|
a1bab033e61aae1d9fd0ad7eba1700ddc05166ab
|
[
"MIT"
] | 4
|
2019-04-16T06:09:14.000Z
|
2019-07-01T08:59:06.000Z
|
scripts/colum.py
|
OkanoShogo0903/character_estimation
|
a1bab033e61aae1d9fd0ad7eba1700ddc05166ab
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf-8 -*-
COLUMNS=[
'angle-R-mid-0', 'angle-R-mid-1', 'angle-R-mid-2',
'angle-L-mid-0', 'angle-L-mid-1', 'angle-L-mid-2',
'angle-R-top-0', 'angle-R-top-1',
'angle-L-top-0', 'angle-L-top-1',
'angle-R-bot-0', 'angle-R-bot-1', 'angle-R-bot-2',
'angle-L-bot-0', 'angle-L-bot-1', 'angle-L-bot-2',
'length-C-top-0',
'length-R-mid-0', 'length-R-mid-1', 'length-R-mid-2',
'length-L-mid-0', 'length-L-mid-1', 'length-L-mid-2',
'length-R-bot-0', 'length-R-bot-1', 'length-R-bot-2',
'length-L-bot-0', 'length-L-bot-1', 'length-L-bot-2',
'length-R-top-0', 'length-R-top-1',
'length-L-top-0', 'length-L-top-1',
'Label']
FLIP_COLUMNS=[
'angle-L-mid-0', 'angle-L-mid-1', 'angle-L-mid-2',
'angle-R-mid-0', 'angle-R-mid-1', 'angle-R-mid-2',
'angle-L-top-0', 'angle-L-top-1',
'angle-R-top-0', 'angle-R-top-1',
'angle-L-bot-0', 'angle-L-bot-1', 'angle-L-bot-2',
'angle-R-bot-0', 'angle-R-bot-1', 'angle-R-bot-2',
'length-C-top-0',
'length-R-mid-0', 'length-R-mid-1', 'length-R-mid-2',
'length-L-mid-0', 'length-L-mid-1', 'length-L-mid-2',
'length-R-bot-0', 'length-R-bot-1', 'length-R-bot-2',
'length-L-bot-0', 'length-L-bot-1', 'length-L-bot-2',
'length-R-top-0', 'length-R-top-1',
'length-L-top-0', 'length-L-top-1',
'Label']
DROP_LIST=[
'angle-L-top-0', 'angle-L-top-1',
'angle-R-top-0', 'angle-R-top-1',
'length-R-top-0', 'length-R-top-1',
'length-L-top-0', 'length-L-top-1',
]
| 36.928571
| 57
| 0.540297
| 309
| 1,551
| 2.705502
| 0.071197
| 0.129187
| 0.086124
| 0.065789
| 0.942584
| 0.942584
| 0.942584
| 0.942584
| 0.942584
| 0.942584
| 0
| 0.057296
| 0.156028
| 1,551
| 41
| 58
| 37.829268
| 0.58136
| 0.0245
| 0
| 0.888889
| 0
| 0
| 0.668432
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
b68fde9e2a5cc5b6de7127782e81ac7688b72984
| 5,045
|
py
|
Python
|
week7/lecture13/test2.py
|
nobodysshadow/edX_MITx_6.00.1x
|
d2e5ab0bd9951153ddc5fa09f01425c54854178e
|
[
"MIT"
] | 622
|
2018-07-17T09:05:41.000Z
|
2022-03-29T02:57:02.000Z
|
MITx-6.00.2x/Lecture 4 - Plotting/test2.py
|
thientvse/Courses-
|
263ff4680ed1dfd253be3652f7f13ad707af1a36
|
[
"Apache-2.0"
] | 21
|
2019-11-10T02:06:09.000Z
|
2022-01-22T23:54:11.000Z
|
MITx-6.00.2x/Lecture 4 - Plotting/test2.py
|
thientvse/Courses-
|
263ff4680ed1dfd253be3652f7f13ad707af1a36
|
[
"Apache-2.0"
] | 906
|
2018-07-17T09:05:43.000Z
|
2022-03-31T12:55:49.000Z
|
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 12 07:17:17 2016
@author: ericgrimson
"""
#import numpy as np
import pylab as plt
mySamples = []
myLinear = []
myQuadratic = []
myCubic = []
myExponential = []
for i in range(0, 30):
mySamples.append(i)
myLinear.append(i)
myQuadratic.append(i**2)
myCubic.append(i**3)
myExponential.append(1.5**i)
# first trial
plt.plot(mySamples, myLinear)
plt.plot(mySamples, myQuadratic)
plt.plot(mySamples, myCubic)
plt.plot(mySamples, myExponential)
# second trial
#plt.figure('lin')
#plt.plot(mySamples, myLinear)
#plt.figure('quad')
#plt.plot(mySamples, myQuadratic)
#plt.figure('cube')
#plt.plot(mySamples, myCubic)
#plt.figure('expo')
#plt.plot(mySamples, myExponential)
# third trial
#plt.figure('lin')
#plt.xlabel('sample points')
#plt.ylabel('linear function')
#plt.plot(mySamples, myLinear)
#plt.figure('quad')
#plt.plot(mySamples, myQuadratic)
#plt.figure('cube')
#plt.plot(mySamples, myCubic)
#plt.figure('expo')
#plt.plot(mySamples, myExponential)
#plt.figure('quad')
#plt.ylabel('quadratic function')
# fourth trial
#plt.figure('lin')
#plt.plot(mySamples, myLinear)
#plt.figure('quad')
#plt.plot(mySamples, myQuadratic)
#plt.figure('cube')
#plt.plot(mySamples, myCubic)
#plt.figure('expo')
#plt.plot(mySamples, myExponential)
#plt.figure('lin')
#plt.title('Linear')
#plt.figure('quad')
#plt.title('Quadratic')
#plt.figure('cube')
#plt.title('Cubic')
#plt.figure('expo')
#plt.title('Exponential')
# fifth trial
#plt.figure('lin')
#plt.clf()
#plt.plot(mySamples, myLinear)
#plt.figure('quad')
#plt.clf()
#plt.plot(mySamples, myQuadratic)
#plt.figure('cube')
#plt.clf()
#plt.plot(mySamples, myCubic)
#plt.figure('expo')
#plt.clf()
#plt.plot(mySamples, myExponential)
#plt.figure('lin')
#plt.title('Linear')
#plt.figure('quad')
#plt.title('Quadratic')
#plt.figure('cube')
#plt.title('Cubic')
#plt.figure('expo')
#plt.title('Exponential')
# sixth trial
#plt.figure('lin')
#plt.clf()
#plt.ylim(0,1000)
#plt.plot(mySamples, myLinear)
#plt.figure('quad')
#plt.clf()
#plt.ylim(0,1000)
#plt.plot(mySamples, myQuadratic)
#plt.figure('lin')
#plt.title('Linear')
#plt.figure('quad')
#plt.title('Quadratic')
# seventh trial
#plt.figure('lin quad')
#plt.clf()
#plt.plot(mySamples, myLinear)
#plt.plot(mySamples, myQuadratic)
#plt.figure('cube exp')
#plt.clf()
#plt.plot(mySamples, myCubic)
#plt.plot(mySamples, myExponential)
#plt.figure('lin quad')
#plt.title('Linear vs. Quadratic')
#plt.figure('cube exp')
#plt.title('Cubic vs. Exponential')
# eighth trial
#plt.figure('lin quad')
#plt.clf()
#plt.plot(mySamples, myLinear, label = 'linear')
#plt.plot(mySamples, myQuadratic, label = 'quadratic')
#plt.legend(loc = 'upper left')
#plt.title('Linear vs. Quadratic')
#plt.figure('cube exp')
#plt.clf()
#plt.plot(mySamples, myCubic, label = 'cubic')
#plt.plot(mySamples, myExponential, label = 'exponential')
#plt.legend()
#plt.title('Cubic vs. Exponential')
# ninth trial
#plt.figure('lin quad')
#plt.clf()
#plt.plot(mySamples, myLinear, 'b-', label = 'linear')
#plt.plot(mySamples, myQuadratic,'ro', label = 'quadratic')
#plt.legend(loc = 'upper left')
#plt.title('Linear vs. Quadratic')
#plt.figure('cube exp')
#plt.clf()
#plt.plot(mySamples, myCubic, 'g^', label = 'cubic')
#plt.plot(mySamples, myExponential, 'r--',label = 'exponential')
#plt.legend()
#plt.title('Cubic vs. Exponential')
# tenth trial
#plt.figure('lin quad')
#plt.clf()
#plt.plot(mySamples, myLinear, 'b-', label = 'linear', linewidth = 2.0)
#plt.plot(mySamples, myQuadratic,'r', label = 'quadratic', linewidth = 3.0)
#plt.legend(loc = 'upper left')
#plt.title('Linear vs. Quadratic')
#plt.figure('cube exp')
#plt.clf()
#plt.plot(mySamples, myCubic, 'g--', label = 'cubic', linewidth = 4.0)
#plt.plot(mySamples, myExponential, 'r',label = 'exponential', linewidth = 5.0)
#plt.legend()
#plt.title('Cubic vs. Exponential')
# eleventh trial
#plt.figure('lin quad')
#plt.clf()
#plt.subplot(211)
#plt.ylim(0, 900)
#plt.plot(mySamples, myLinear, 'b-', label = 'linear', linewidth = 2.0)
#plt.subplot(212)
#plt.ylim(0, 900)
#plt.plot(mySamples, myQuadratic,'r', label = 'quadratic', linewidth = 3.0)
#plt.legend(loc = 'upper left')
#plt.title('Linear vs. Quadratic')
#plt.figure('cube exp')
#plt.clf()
#plt.subplot(121)
#plt.ylim(0, 140000)
#plt.plot(mySamples, myCubic, 'g--', label = 'cubic', linewidth = 4.0)
#plt.subplot(122)
#plt.ylim(0, 140000)
#plt.plot(mySamples, myExponential, 'r',label = 'exponential', linewidth = 5.0)
#plt.legend()
#plt.title('Cubic vs. Exponential')
# twelfth trial
#plt.figure('cube exp log')
#plt.clf()
#plt.plot(mySamples, myCubic, 'g--', label = 'cubic', linewidth = 2.0)
#plt.plot(mySamples, myExponential, 'r',label = 'exponential', linewidth = 4.0)
#plt.yscale('log')
#plt.legend()
#plt.title('Cubic vs. Exponential')
#plt.figure('cube exp linear')
#plt.clf()
#plt.plot(mySamples, myCubic, 'g--', label = 'cubic', linewidth = 2.0)
#plt.plot(mySamples, myExponential, 'r',label = 'exponential', linewidth = 4.0)
#plt.legend()
#plt.title('Cubic vs. Exponential')
| 23.909953
| 79
| 0.688603
| 706
| 5,045
| 4.92068
| 0.126062
| 0.092689
| 0.21186
| 0.052389
| 0.862694
| 0.848302
| 0.815199
| 0.766264
| 0.703224
| 0.638169
| 0
| 0.019353
| 0.098712
| 5,045
| 210
| 80
| 24.02381
| 0.744667
| 0.852131
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.0625
| 0
| 0.0625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
1e1ec35ff363dbf4fe7c931022d18542003029dc
| 639
|
py
|
Python
|
tests/unit/compress/CompressCssCompiler.py
|
wangjeaf/CSSCheckStyle
|
d1b1ed89c61ca80d65f398ec4a07d73789197b04
|
[
"BSD-3-Clause"
] | 21
|
2015-04-27T14:54:45.000Z
|
2021-11-08T09:12:08.000Z
|
tests/unit/compress/CompressCssCompiler.py
|
wangjeaf/CSSCheckStyle
|
d1b1ed89c61ca80d65f398ec4a07d73789197b04
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit/compress/CompressCssCompiler.py
|
wangjeaf/CSSCheckStyle
|
d1b1ed89c61ca80d65f398ec4a07d73789197b04
|
[
"BSD-3-Clause"
] | 6
|
2015-03-02T08:08:59.000Z
|
2016-03-16T14:52:38.000Z
|
from helper import *
def doTest():
_no_space()
_has_space()
_just_prefix()
def _no_space():
msg = doCssCompress('@-css-compiler{selector-compile:no-combinator;rule-compile:all}html{width:100px;}')
equal(msg, 'html{width:100px}', '@css-compiler compressed')
def _has_space():
msg = doCssCompress('@-css-compiler {selector-compile:no-combinator;rule-compile:all}html{width:100px;}')
equal(msg, 'html{width:100px}', '@css-compiler compressed')
def _just_prefix():
msg = doCssCompress('@-css-compiler-prefix fdsafdsafdsa;html{width:100px;}')
equal(msg, 'html{width:100px}', '@css-compiler compressed')
| 35.5
| 111
| 0.701095
| 81
| 639
| 5.382716
| 0.308642
| 0.151376
| 0.192661
| 0.18578
| 0.740826
| 0.740826
| 0.740826
| 0.740826
| 0.740826
| 0.740826
| 0
| 0.032143
| 0.123631
| 639
| 18
| 112
| 35.5
| 0.746429
| 0
| 0
| 0.357143
| 0
| 0.142857
| 0.532813
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.071429
| 0
| 0.357143
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
1e8093f9b3606f3aa82e6cced36f69d686769629
| 598
|
py
|
Python
|
make_pizzas.py
|
yiyidhuang/PythonCrashCrouse2nd
|
3512f9ab8fcf32c6145604a37e2a62feddf174d1
|
[
"MIT"
] | null | null | null |
make_pizzas.py
|
yiyidhuang/PythonCrashCrouse2nd
|
3512f9ab8fcf32c6145604a37e2a62feddf174d1
|
[
"MIT"
] | null | null | null |
make_pizzas.py
|
yiyidhuang/PythonCrashCrouse2nd
|
3512f9ab8fcf32c6145604a37e2a62feddf174d1
|
[
"MIT"
] | null | null | null |
# import pizza
# pizza.make_pizza(16, 'pepperoni')
# pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
# from pizza import make_pizza
# make_pizza(16, 'pepperoni')
# make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
# from pizza import make_pizza as mp
# mp(16, 'pepperoni')
# mp(12, 'mushrooms', 'green peppers', 'extra cheese')
# import pizza as p
# p.make_pizza(16, 'pepperoni')
# p.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
from pizza import *
make_pizza(16, 'pepperoni')
make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')
| 19.933333
| 68
| 0.69398
| 83
| 598
| 4.879518
| 0.180723
| 0.222222
| 0.197531
| 0.283951
| 0.824691
| 0.762963
| 0.679012
| 0.679012
| 0.679012
| 0.679012
| 0
| 0.039063
| 0.143813
| 598
| 29
| 69
| 20.62069
| 0.751953
| 0.752508
| 0
| 0
| 0
| 0
| 0.318519
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 8
|
1e8a88638253dd35e170b254658641fa7457eb56
| 81
|
py
|
Python
|
bot.py
|
iryabuhin/proictis_dialogflow_webhook
|
833c21fa1fdb422962cd6abedc5690ddcac46f53
|
[
"MIT"
] | null | null | null |
bot.py
|
iryabuhin/proictis_dialogflow_webhook
|
833c21fa1fdb422962cd6abedc5690ddcac46f53
|
[
"MIT"
] | 1
|
2021-04-30T21:17:43.000Z
|
2021-04-30T21:17:43.000Z
|
bot.py
|
iryabuhin/proictis_diagflow_chatbot
|
833c21fa1fdb422962cd6abedc5690ddcac46f53
|
[
"MIT"
] | null | null | null |
from app import app, db
from app.models import ProjectInfo
from app import route
| 20.25
| 34
| 0.814815
| 14
| 81
| 4.714286
| 0.5
| 0.318182
| 0.393939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160494
| 81
| 3
| 35
| 27
| 0.970588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
94a1407f2d035d220fcc3a121ef79bfba1e0bc04
| 79
|
py
|
Python
|
mathfuncs.py
|
Jeanne-Chris/DXCPythonBootcamp
|
9d394035a700d4364acfebf80316cb6281a5776b
|
[
"MIT"
] | 1
|
2022-03-03T09:54:06.000Z
|
2022-03-03T09:54:06.000Z
|
mathfuncs.py
|
Jeanne-Chris/DXCPythonBootcamp
|
9d394035a700d4364acfebf80316cb6281a5776b
|
[
"MIT"
] | null | null | null |
mathfuncs.py
|
Jeanne-Chris/DXCPythonBootcamp
|
9d394035a700d4364acfebf80316cb6281a5776b
|
[
"MIT"
] | null | null | null |
def add(x, y=2):
return x + y
def multiply(x, y=2):
return x * y
| 13.166667
| 22
| 0.493671
| 16
| 79
| 2.4375
| 0.4375
| 0.205128
| 0.153846
| 0.461538
| 0.564103
| 0.564103
| 0
| 0
| 0
| 0
| 0
| 0.039216
| 0.35443
| 79
| 6
| 23
| 13.166667
| 0.72549
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
94b7e1a59ba68163f020fef68b1470f03622c5ba
| 15,152
|
py
|
Python
|
sdk/python/pulumi_openstack/identity/role_assignment.py
|
pulumi/pulumi-openstack
|
945eed22a82784e9f0b3aa56168b2397c2f503e8
|
[
"ECL-2.0",
"Apache-2.0"
] | 34
|
2018-09-12T12:37:51.000Z
|
2022-02-04T19:32:13.000Z
|
sdk/python/pulumi_openstack/identity/role_assignment.py
|
pulumi/pulumi-openstack
|
945eed22a82784e9f0b3aa56168b2397c2f503e8
|
[
"ECL-2.0",
"Apache-2.0"
] | 72
|
2018-08-15T13:04:57.000Z
|
2022-03-31T15:39:49.000Z
|
sdk/python/pulumi_openstack/identity/role_assignment.py
|
pulumi/pulumi-openstack
|
945eed22a82784e9f0b3aa56168b2397c2f503e8
|
[
"ECL-2.0",
"Apache-2.0"
] | 7
|
2019-03-14T08:28:49.000Z
|
2021-12-29T04:23:55.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['RoleAssignmentArgs', 'RoleAssignment']
@pulumi.input_type
class RoleAssignmentArgs:
def __init__(__self__, *,
role_id: pulumi.Input[str],
domain_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a RoleAssignment resource.
:param pulumi.Input[str] role_id: The role to assign.
:param pulumi.Input[str] domain_id: The domain to assign the role in.
:param pulumi.Input[str] group_id: The group to assign the role to.
:param pulumi.Input[str] project_id: The project to assign the role in.
:param pulumi.Input[str] user_id: The user to assign the role to.
"""
pulumi.set(__self__, "role_id", role_id)
if domain_id is not None:
pulumi.set(__self__, "domain_id", domain_id)
if group_id is not None:
pulumi.set(__self__, "group_id", group_id)
if project_id is not None:
pulumi.set(__self__, "project_id", project_id)
if region is not None:
pulumi.set(__self__, "region", region)
if user_id is not None:
pulumi.set(__self__, "user_id", user_id)
@property
@pulumi.getter(name="roleId")
def role_id(self) -> pulumi.Input[str]:
"""
The role to assign.
"""
return pulumi.get(self, "role_id")
@role_id.setter
def role_id(self, value: pulumi.Input[str]):
pulumi.set(self, "role_id", value)
@property
@pulumi.getter(name="domainId")
def domain_id(self) -> Optional[pulumi.Input[str]]:
"""
The domain to assign the role in.
"""
return pulumi.get(self, "domain_id")
@domain_id.setter
def domain_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "domain_id", value)
@property
@pulumi.getter(name="groupId")
def group_id(self) -> Optional[pulumi.Input[str]]:
"""
The group to assign the role to.
"""
return pulumi.get(self, "group_id")
@group_id.setter
def group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "group_id", value)
@property
@pulumi.getter(name="projectId")
def project_id(self) -> Optional[pulumi.Input[str]]:
"""
The project to assign the role in.
"""
return pulumi.get(self, "project_id")
@project_id.setter
def project_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "project_id", value)
@property
@pulumi.getter
def region(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "region")
@region.setter
def region(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "region", value)
@property
@pulumi.getter(name="userId")
def user_id(self) -> Optional[pulumi.Input[str]]:
"""
The user to assign the role to.
"""
return pulumi.get(self, "user_id")
@user_id.setter
def user_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user_id", value)
@pulumi.input_type
class _RoleAssignmentState:
def __init__(__self__, *,
domain_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering RoleAssignment resources.
:param pulumi.Input[str] domain_id: The domain to assign the role in.
:param pulumi.Input[str] group_id: The group to assign the role to.
:param pulumi.Input[str] project_id: The project to assign the role in.
:param pulumi.Input[str] role_id: The role to assign.
:param pulumi.Input[str] user_id: The user to assign the role to.
"""
if domain_id is not None:
pulumi.set(__self__, "domain_id", domain_id)
if group_id is not None:
pulumi.set(__self__, "group_id", group_id)
if project_id is not None:
pulumi.set(__self__, "project_id", project_id)
if region is not None:
pulumi.set(__self__, "region", region)
if role_id is not None:
pulumi.set(__self__, "role_id", role_id)
if user_id is not None:
pulumi.set(__self__, "user_id", user_id)
@property
@pulumi.getter(name="domainId")
def domain_id(self) -> Optional[pulumi.Input[str]]:
"""
The domain to assign the role in.
"""
return pulumi.get(self, "domain_id")
@domain_id.setter
def domain_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "domain_id", value)
@property
@pulumi.getter(name="groupId")
def group_id(self) -> Optional[pulumi.Input[str]]:
"""
The group to assign the role to.
"""
return pulumi.get(self, "group_id")
@group_id.setter
def group_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "group_id", value)
@property
@pulumi.getter(name="projectId")
def project_id(self) -> Optional[pulumi.Input[str]]:
"""
The project to assign the role in.
"""
return pulumi.get(self, "project_id")
@project_id.setter
def project_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "project_id", value)
@property
@pulumi.getter
def region(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "region")
@region.setter
def region(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "region", value)
@property
@pulumi.getter(name="roleId")
def role_id(self) -> Optional[pulumi.Input[str]]:
"""
The role to assign.
"""
return pulumi.get(self, "role_id")
@role_id.setter
def role_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "role_id", value)
@property
@pulumi.getter(name="userId")
def user_id(self) -> Optional[pulumi.Input[str]]:
"""
The user to assign the role to.
"""
return pulumi.get(self, "user_id")
@user_id.setter
def user_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "user_id", value)
class RoleAssignment(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
domain_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a V3 Role assignment within OpenStack Keystone.
> **Note:** You _must_ have admin privileges in your OpenStack cloud to use
this resource.
## Example Usage
```python
import pulumi
import pulumi_openstack as openstack
project1 = openstack.identity.Project("project1")
user1 = openstack.identity.User("user1", default_project_id=project1.id)
role1 = openstack.identity.Role("role1")
role_assignment1 = openstack.identity.RoleAssignment("roleAssignment1",
project_id=project1.id,
role_id=role1.id,
user_id=user1.id)
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] domain_id: The domain to assign the role in.
:param pulumi.Input[str] group_id: The group to assign the role to.
:param pulumi.Input[str] project_id: The project to assign the role in.
:param pulumi.Input[str] role_id: The role to assign.
:param pulumi.Input[str] user_id: The user to assign the role to.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: RoleAssignmentArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a V3 Role assignment within OpenStack Keystone.
> **Note:** You _must_ have admin privileges in your OpenStack cloud to use
this resource.
## Example Usage
```python
import pulumi
import pulumi_openstack as openstack
project1 = openstack.identity.Project("project1")
user1 = openstack.identity.User("user1", default_project_id=project1.id)
role1 = openstack.identity.Role("role1")
role_assignment1 = openstack.identity.RoleAssignment("roleAssignment1",
project_id=project1.id,
role_id=role1.id,
user_id=user1.id)
```
:param str resource_name: The name of the resource.
:param RoleAssignmentArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(RoleAssignmentArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
domain_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = RoleAssignmentArgs.__new__(RoleAssignmentArgs)
__props__.__dict__["domain_id"] = domain_id
__props__.__dict__["group_id"] = group_id
__props__.__dict__["project_id"] = project_id
__props__.__dict__["region"] = region
if role_id is None and not opts.urn:
raise TypeError("Missing required property 'role_id'")
__props__.__dict__["role_id"] = role_id
__props__.__dict__["user_id"] = user_id
super(RoleAssignment, __self__).__init__(
'openstack:identity/roleAssignment:RoleAssignment',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
domain_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
role_id: Optional[pulumi.Input[str]] = None,
user_id: Optional[pulumi.Input[str]] = None) -> 'RoleAssignment':
"""
Get an existing RoleAssignment resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] domain_id: The domain to assign the role in.
:param pulumi.Input[str] group_id: The group to assign the role to.
:param pulumi.Input[str] project_id: The project to assign the role in.
:param pulumi.Input[str] role_id: The role to assign.
:param pulumi.Input[str] user_id: The user to assign the role to.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _RoleAssignmentState.__new__(_RoleAssignmentState)
__props__.__dict__["domain_id"] = domain_id
__props__.__dict__["group_id"] = group_id
__props__.__dict__["project_id"] = project_id
__props__.__dict__["region"] = region
__props__.__dict__["role_id"] = role_id
__props__.__dict__["user_id"] = user_id
return RoleAssignment(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="domainId")
def domain_id(self) -> pulumi.Output[Optional[str]]:
"""
The domain to assign the role in.
"""
return pulumi.get(self, "domain_id")
@property
@pulumi.getter(name="groupId")
def group_id(self) -> pulumi.Output[Optional[str]]:
"""
The group to assign the role to.
"""
return pulumi.get(self, "group_id")
@property
@pulumi.getter(name="projectId")
def project_id(self) -> pulumi.Output[Optional[str]]:
"""
The project to assign the role in.
"""
return pulumi.get(self, "project_id")
@property
@pulumi.getter
def region(self) -> pulumi.Output[str]:
return pulumi.get(self, "region")
@property
@pulumi.getter(name="roleId")
def role_id(self) -> pulumi.Output[str]:
"""
The role to assign.
"""
return pulumi.get(self, "role_id")
@property
@pulumi.getter(name="userId")
def user_id(self) -> pulumi.Output[Optional[str]]:
"""
The user to assign the role to.
"""
return pulumi.get(self, "user_id")
| 37.228501
| 134
| 0.614572
| 1,845
| 15,152
| 4.796206
| 0.085637
| 0.09696
| 0.12024
| 0.126794
| 0.806645
| 0.788451
| 0.779975
| 0.75986
| 0.748446
| 0.725506
| 0
| 0.002455
| 0.274155
| 15,152
| 406
| 135
| 37.320197
| 0.802146
| 0.254026
| 0
| 0.767241
| 1
| 0
| 0.078686
| 0.004623
| 0
| 0
| 0
| 0
| 0
| 1
| 0.159483
| false
| 0.00431
| 0.021552
| 0.012931
| 0.275862
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
94bc84eb50dc6420487627902b81a12869152124
| 204
|
py
|
Python
|
aioarango/__init__.py
|
mirrorrim/aioarango
|
eb902b8793e4c2dd4b1d90ed6c7d68f461c73fd3
|
[
"MIT"
] | 10
|
2021-07-05T10:28:04.000Z
|
2022-03-24T08:53:26.000Z
|
aioarango/__init__.py
|
mirrorrim/aioarango
|
eb902b8793e4c2dd4b1d90ed6c7d68f461c73fd3
|
[
"MIT"
] | 1
|
2022-03-12T11:02:25.000Z
|
2022-03-12T11:02:25.000Z
|
aioarango/__init__.py
|
mirrorrim/aioarango
|
eb902b8793e4c2dd4b1d90ed6c7d68f461c73fd3
|
[
"MIT"
] | 2
|
2021-12-14T07:29:55.000Z
|
2022-03-29T07:14:22.000Z
|
import aioarango.errno as errno # noqa: F401
from aioarango.client import ArangoClient # noqa: F401
from aioarango.exceptions import * # noqa: F401 F403
from aioarango.http import * # noqa: F401 F403
| 40.8
| 55
| 0.764706
| 28
| 204
| 5.571429
| 0.428571
| 0.205128
| 0.153846
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105882
| 0.166667
| 204
| 4
| 56
| 51
| 0.811765
| 0.259804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
94e8143d3f76d1b4dc94862e10da6cf6d3fd477c
| 458
|
py
|
Python
|
home/pi/GrovePi/Software/Python/others/temboo/Library/Fitbit/OAuth/__init__.py
|
lupyuen/RaspberryPiImage
|
664e8a74b4628d710feab5582ef59b344b9ffddd
|
[
"Apache-2.0"
] | 7
|
2016-03-07T02:07:21.000Z
|
2022-01-21T02:22:41.000Z
|
home/pi/GrovePi/Software/Python/others/temboo/Library/Fitbit/OAuth/__init__.py
|
lupyuen/RaspberryPiImage
|
664e8a74b4628d710feab5582ef59b344b9ffddd
|
[
"Apache-2.0"
] | null | null | null |
home/pi/GrovePi/Software/Python/others/temboo/Library/Fitbit/OAuth/__init__.py
|
lupyuen/RaspberryPiImage
|
664e8a74b4628d710feab5582ef59b344b9ffddd
|
[
"Apache-2.0"
] | 8
|
2016-06-14T06:01:11.000Z
|
2020-04-22T09:21:44.000Z
|
from temboo.Library.Fitbit.OAuth.FinalizeOAuth import FinalizeOAuth, FinalizeOAuthInputSet, FinalizeOAuthResultSet, FinalizeOAuthChoreographyExecution
from temboo.Library.Fitbit.OAuth.InitializeOAuth import InitializeOAuth, InitializeOAuthInputSet, InitializeOAuthResultSet, InitializeOAuthChoreographyExecution
from temboo.Library.Fitbit.OAuth.RefreshToken import RefreshToken, RefreshTokenInputSet, RefreshTokenResultSet, RefreshTokenChoreographyExecution
| 114.5
| 160
| 0.908297
| 33
| 458
| 12.606061
| 0.545455
| 0.072115
| 0.122596
| 0.165865
| 0.201923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045852
| 458
| 3
| 161
| 152.666667
| 0.951945
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
bf5bb655c9418aac109893ef2ad4945eac8248a0
| 1,272
|
py
|
Python
|
mod_ngarn/connection.py
|
hotkit/mod-ngarn
|
e068c4ec5377e5c70cf0afba598afaee4ba380a3
|
[
"MIT"
] | 3
|
2019-10-10T08:02:46.000Z
|
2022-01-04T16:21:33.000Z
|
mod_ngarn/connection.py
|
hotkit/mod-ngarn
|
e068c4ec5377e5c70cf0afba598afaee4ba380a3
|
[
"MIT"
] | 5
|
2018-10-01T13:05:46.000Z
|
2019-03-17T19:09:09.000Z
|
mod_ngarn/connection.py
|
Proteus-tech/mod-ngarn
|
e068c4ec5377e5c70cf0afba598afaee4ba380a3
|
[
"MIT"
] | 1
|
2019-02-27T07:18:07.000Z
|
2019-02-27T07:18:07.000Z
|
import json
import os
import asyncpg
async def get_connection():
PGDBNAME = os.getenv("PGDBNAME")
PGHOST = os.getenv("PGHOST")
PGPASSWORD = os.getenv("PGPASSWORD")
PGUSER = os.getenv("PGUSER")
cnx = await asyncpg.connect(
user=PGUSER, password=PGPASSWORD, database=PGDBNAME, host=PGHOST
)
await cnx.set_type_codec(
"jsonb", encoder=json.dumps, decoder=json.loads, schema="pg_catalog"
)
await cnx.set_type_codec(
"json", encoder=json.dumps, decoder=json.loads, schema="pg_catalog"
)
return cnx
class DBConnection:
async def __aenter__(self):
PGDBNAME = os.getenv("PGDBNAME")
PGHOST = os.getenv("PGHOST")
PGPASSWORD = os.getenv("PGPASSWORD")
PGUSER = os.getenv("PGUSER")
self.cnx = await asyncpg.connect(
user=PGUSER, password=PGPASSWORD, database=PGDBNAME, host=PGHOST
)
await self.cnx.set_type_codec(
"jsonb", encoder=json.dumps, decoder=json.loads, schema="pg_catalog"
)
await self.cnx.set_type_codec(
"json", encoder=json.dumps, decoder=json.loads, schema="pg_catalog"
)
return self.cnx
async def __aexit__(self, exc_type, exc, tb):
await self.cnx.close()
| 29.581395
| 80
| 0.637579
| 152
| 1,272
| 5.190789
| 0.263158
| 0.081115
| 0.050697
| 0.076046
| 0.813688
| 0.813688
| 0.803549
| 0.803549
| 0.803549
| 0.803549
| 0
| 0
| 0.243711
| 1,272
| 42
| 81
| 30.285714
| 0.820166
| 0
| 0
| 0.5
| 0
| 0
| 0.092767
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.111111
| 0.083333
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 7
|
bf81f3f804d66b7a8da99b98d3cebafb2ccf958e
| 17,670
|
py
|
Python
|
fixGanExperment/model.py
|
okingjerryo/modelExperiment
|
6e6a7b6055a2e4efff7d7e599fa8b79a2ca3270e
|
[
"Apache-2.0"
] | null | null | null |
fixGanExperment/model.py
|
okingjerryo/modelExperiment
|
6e6a7b6055a2e4efff7d7e599fa8b79a2ca3270e
|
[
"Apache-2.0"
] | null | null | null |
fixGanExperment/model.py
|
okingjerryo/modelExperiment
|
6e6a7b6055a2e4efff7d7e599fa8b79a2ca3270e
|
[
"Apache-2.0"
] | 1
|
2018-01-08T03:03:32.000Z
|
2018-01-08T03:03:32.000Z
|
'''
sunkejia
GAN network
'''
import tensorflow as tf
import tensorflow.contrib.slim as slim
def inst_norm(inputs, epsilon=1e-3, suffix=''):
"""
Assuming TxHxWxC dimensions on the tensor, will normalize over
the H,W dimensions. Use this before the activation layer.
This function borrows from:
http://r2rt.com/implementing-batch-normalization-in-tensorflow.html
Note this is similar to batch_normalization, which normalizes each
neuron by looking at its statistics over the batch.
:param input_:
input tensor of NHWC format
"""
# Create scale + shift. Exclude batch dimension.
stat_shape = inputs.get_shape().as_list()
print(stat_shape)
scale = tf.get_variable('INscale' + suffix,
initializer=tf.ones(stat_shape[3]))
shift = tf.get_variable('INshift' + suffix,
initializer=tf.zeros(stat_shape[3]))
# batch nrom axes=[0,1,2] 出来的结果只有1 * C,而 instanse norm 结果为 B* C
inst_means, inst_vars = tf.nn.moments(inputs, axes=[1, 2], keep_dims=True)
# Normalization
inputs_normed = (inputs - inst_means) / tf.sqrt(inst_vars + epsilon)
# Perform trainable shift.
output = scale * inputs_normed + shift
return output
def dense_block(layer_input, kernel_size, k, filiter_num, scopename):
# todo: desnet修改
pass
def netG_encoder_gamma_32(image_input, reuse=False):
'''
08-04 删除了line reshape层
:param image_input:
:param reuse:
:return:
'''
with tf.variable_scope('generator', reuse=reuse) as vs:
if reuse:
vs.reuse_variables()
kernel_size = [3, 3]
filter_num = 64
imageshape = image_input.get_shape().as_list()[1]
print(imageshape)
with tf.variable_scope('encoding'):
# 目前用的是lrelu,其实应该用elu,后面注意跟换
with slim.arg_scope([slim.conv2d], normalizer_fn=inst_norm, activation_fn=tf.nn.elu, padding='SAME',
weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 32
net = slim.conv2d(image_input, filter_num, kernel_size, normalizer_fn=None, scope='conv1')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv2')
# 16
net = slim.conv2d(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='conv3')
net = slim.conv2d(net, filter_num * 4, kernel_size, scope='conv4')
# 8
net = slim.conv2d(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='conv6')
net = slim.conv2d(net, filter_num * 6, kernel_size, scope='conv7')
# 4
net = slim.conv2d(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='conv9')
net = slim.conv2d(net, filter_num * 8, kernel_size, scope='conv10')
net = tf.reshape(slim.flatten(net),
[-1, 1, 1, int(imageshape / 8) * int(imageshape / 8) * filter_num * 8], name='fc1')
logits = slim.fully_connected(net, 1024, activation_fn=None, normalizer_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='bottleneck')
output = logits # 1024维的向量
return output
def netG_deconder_gamma_32(feature, output_channel, reuse=False):
'''
01-02 instanse norm
@brief:
feature:1*1*320+13+50
pose:1*1*13r
noise:1*1*50
'''
with tf.variable_scope('generator', reuse=reuse):
kernel_size = [3, 3]
filter_num = 64
with tf.variable_scope('decoding') as vs:
if reuse:
vs.reuse_variables()
with slim.arg_scope([slim.conv2d_transpose], activation_fn=tf.nn.elu, normalizer_fn=inst_norm,
padding='SAME', weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 先将vector组织为6*6*320的tensor#slim.batch_norm
fc1 = slim.fully_connected(feature, 4 * 4 * filter_num * 8, activation_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='fc1')
# reshape the vector[n,6,6,320]
inputs_img = tf.reshape(fc1, [-1, 4, 4, filter_num * 8])
# print 'inputs_img',inputs_img.shape
# 4
net = slim.conv2d_transpose(inputs_img, filter_num * 8, kernel_size, scope='deconv01')
net = slim.conv2d_transpose(net, filter_num * 6, kernel_size, scope='deconv02')
# 8
net = slim.conv2d_transpose(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='deconv2')
net = slim.conv2d_transpose(net, filter_num * 4, kernel_size, scope='deconv3')
# 16
net = slim.conv2d_transpose(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='deconv5')
net = slim.conv2d_transpose(net, filter_num * 2, kernel_size, scope='deconv6')
# 32
net = slim.conv2d_transpose(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='deconv8')
net = slim.conv2d_transpose(net, filter_num, kernel_size, scope='deconv9')
# 为什么放到外面就好了呢?
net = slim.conv2d_transpose(net, output_channel, kernel_size, activation_fn=tf.nn.tanh, normalizer_fn=None,
scope='deconv13', weights_initializer=tf.contrib.layers.xavier_initializer())
output = net
return output
def netD_discriminator_adloss_32(image_input, reuse=False):
with tf.variable_scope('discriminator', reuse=reuse) as vs:
kernel_size = [3, 3]
filter_num = 64
imageshape = image_input.get_shape().as_list()[1]
with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, activation_fn=tf.nn.elu, padding='SAME',
weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 224/96/32
net = slim.conv2d(image_input, filter_num, kernel_size, normalizer_fn=None, scope='conv1')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv2')
# 112/48/16
net = slim.conv2d(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='conv3')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv4')
# 56/24/8
net = slim.conv2d(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='conv6')
net = slim.conv2d(net, filter_num * 4, kernel_size, scope='conv7')
# 28/12/4
net = slim.conv2d(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='conv9')
net = slim.conv2d(net, filter_num * 6, kernel_size, scope='conv10')
# 14/6/2
net = slim.conv2d(net, filter_num * 8, stride=2, kernel_size=kernel_size, scope='conv12')
net = slim.conv2d(net, filter_num * 8, kernel_size, scope='conv13')
avgpool = slim.pool(net, [int(imageshape / 16), int(imageshape / 16)], stride=int(imageshape / 32),
pooling_type="AVG", scope='avgpool')
adlogits = slim.fully_connected(slim.flatten(avgpool), 1, activation_fn=None, normalizer_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='ad_soft')
return adlogits
def netG_encoder_gamma(image_input, reuse=False):
'''
08-04 删除了line reshape层
:param image_input:
:param reuse:
:return:
'''
with tf.variable_scope('generator', reuse=reuse) as vs:
if reuse:
vs.reuse_variables()
kernel_size = [3, 3]
filter_num = 32
imageshape = image_input.get_shape().as_list()[1]
print(imageshape)
with tf.variable_scope('encoding'):
# 目前用的是lrelu,其实应该用elu,后面注意跟换
with slim.arg_scope([slim.conv2d], normalizer_fn=inst_norm, activation_fn=tf.nn.elu, padding='SAME',
weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 224
net = slim.conv2d(image_input, filter_num, kernel_size, normalizer_fn=None, scope='conv1')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv2')
# 112
net = slim.conv2d(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='conv3')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv4')
# 56
net = slim.conv2d(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='conv6')
net = slim.conv2d(net, filter_num * 3, kernel_size, scope='conv7')
# 28
net = slim.conv2d(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='conv9')
net = slim.conv2d(net, filter_num * 4, kernel_size, scope='conv10')
# 14
net = slim.conv2d(net, filter_num * 8, stride=2, kernel_size=kernel_size, scope='conv12')
net = slim.conv2d(net, filter_num * 6, kernel_size, scope='conv13')
# avg出来之后应该是1*1*320的tensor
# 7
net = slim.conv2d(net, filter_num * 10, stride=2, kernel_size=kernel_size, scope='conv15')
net = slim.conv2d(net, filter_num * 8, kernel_size, scope='conv16')
net = tf.reshape(slim.flatten(net),
[-1, 1, 1, int(imageshape / 32) * int(imageshape / 32) * filter_num * 8])
logits = slim.fully_connected(net, 512, activation_fn=None, normalizer_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='bottleneck')
output = logits # 512维的向量
return output
def netG_deconder_gamma(feature, output_channel, reuse=False):
'''
01-02 instanse norm
@brief:
feature:1*1*320+13+50
pose:1*1*13r
noise:1*1*50
'''
with tf.variable_scope('generator', reuse=reuse):
kernel_size = [3, 3]
filter_num = 32
with tf.variable_scope('decoding') as vs:
if reuse:
vs.reuse_variables()
with slim.arg_scope([slim.conv2d_transpose], activation_fn=tf.nn.elu, normalizer_fn=inst_norm,
padding='SAME', weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 先将vector组织为6*6*320的tensor#slim.batch_norm
fc1 = slim.fully_connected(feature, 3 * 3 * filter_num * 8, activation_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='fc1')
# reshape the vector[n,6,6,320]
inputs_img = tf.reshape(fc1, [-1, 3, 3, 256])
# print 'inputs_img',inputs_img.shape
# 7
net = slim.conv2d(inputs_img, filter_num * 8, kernel_size, scope='deconv01')
net = slim.conv2d(net, filter_num * 10, kernel_size, scope='deconv02')
# 14
net = slim.conv2d_transpose(net, filter_num * 10, stride=2, kernel_size=kernel_size, scope='deconv03')
net = slim.conv2d_transpose(net, filter_num * 6, kernel_size, scope='deconv0')
# 28
net = slim.conv2d_transpose(net, filter_num * 8, stride=2, kernel_size=kernel_size, scope='deconv2')
net = slim.conv2d_transpose(net, filter_num * 4, kernel_size, scope='deconv3')
# 56
net = slim.conv2d_transpose(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='deconv5')
net = slim.conv2d_transpose(net, filter_num * 3, kernel_size, scope='deconv6')
# 112
net = slim.conv2d_transpose(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='deconv8')
net = slim.conv2d_transpose(net, filter_num * 2, kernel_size, scope='deconv9')
# 224
net = slim.conv2d_transpose(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='deconv11')
net = slim.conv2d_transpose(net, filter_num * 1, kernel_size, scope='deconv12')
# 为什么放到外面就好了呢?
net = slim.conv2d_transpose(net, output_channel, kernel_size, activation_fn=tf.nn.tanh, normalizer_fn=None,
scope='deconv13', weights_initializer=tf.contrib.layers.xavier_initializer())
output = net
return output
def netD_discriminator_adloss(image_input, reuse=False):
with tf.variable_scope('discriminator', reuse=reuse) as vs:
kernel_size = [3, 3]
filter_num = 32
imageshape = image_input.get_shape().as_list()[1]
with slim.arg_scope([slim.conv2d], normalizer_fn=slim.batch_norm, activation_fn=tf.nn.elu, padding='SAME',
weights_initializer=tf.truncated_normal_initializer(
stddev=0.02)):
# 224/96/32
net = slim.conv2d(image_input, filter_num, kernel_size, normalizer_fn=None, scope='conv1')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv2')
# 112/48/16
net = slim.conv2d(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='conv3')
net = slim.conv2d(net, filter_num * 2, kernel_size, scope='conv4')
# 56/24/8
net = slim.conv2d(net, filter_num * 4, stride=2, kernel_size=kernel_size, scope='conv6')
net = slim.conv2d(net, filter_num * 4, kernel_size, scope='conv7')
# 28/12/4
net = slim.conv2d(net, filter_num * 6, stride=2, kernel_size=kernel_size, scope='conv9')
net = slim.conv2d(net, filter_num * 6, kernel_size, scope='conv10')
# 14/6/2
net = slim.conv2d(net, filter_num * 8, stride=2, kernel_size=kernel_size, scope='conv12')
net = slim.conv2d(net, filter_num * 8, kernel_size, scope='conv13')
# two path -feature -W Omegapredict_r_label
# avg出来之后应该是1*1*320的tensor
# 7/3
# net = slim.conv2d(net, filter_num * 10, stride=2, kernel_size=kernel_size, scope='conv15')
net = slim.conv2d(net, filter_num * 10, kernel_size, scope='conv16')
avgpool = slim.pool(net, [int(imageshape / 32), int(imageshape / 32)], stride=int(imageshape / 32),
pooling_type="AVG", scope='avgpool')
adlogits = slim.fully_connected(slim.flatten(avgpool), 1, activation_fn=None, normalizer_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='ad_soft')
return adlogits
def netG_Unet_decoder_gamma_32(feature, output_channel, reuse=False):
with tf.variable_scope('generator', reuse=reuse):
kernel_size = [3, 3]
filter_num = 32
with tf.variable_scope('decoding') as vs:
if reuse:
vs.reuse_variables()
with slim.arg_scope([slim.conv2d_transpose], activation_fn=tf.nn.elu, normalizer_fn=inst_norm,
padding='SAME', weights_initializer=tf.truncated_normal_initializer(stddev=0.02)):
# 先将vector组织为6*6*320的tensor#slim.batch_norm
fc1 = slim.fully_connected(feature, 4 * 4 * filter_num * 8, activation_fn=None,
weights_initializer=tf.truncated_normal_initializer(stddev=0.02),
scope='fc1')
# reshape the vector[n,6,6,320]
inputs_img = tf.reshape(fc1, [-1, 4, 4, filter_num * 8])
# Unet改变
fc1_en = slim.get_variables_by_name('fc1', 'encoding')[0]
tf.concat([fc1_en, inputs_img], axis=3, name='defc1')
# print 'inputs_img',inputs_img.shape
# 4
net = slim.conv2d(inputs_img, filter_num * 8, kernel_size, scope='deconv01')
net = slim.conv2d(net, filter_num * 6, kernel_size, scope='deconv02')
# 8
net = slim.conv2d_transpose(net, filter_num * 3, stride=2, kernel_size=kernel_size, scope='deconv2')
net = slim.conv2d_transpose(net, filter_num * 4, kernel_size, scope='deconv3')
# 16
net = slim.conv2d_transpose(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='deconv5')
net = slim.conv2d_transpose(net, filter_num * 2, kernel_size, scope='deconv6')
# 32
net = slim.conv2d_transpose(net, filter_num * 2, stride=2, kernel_size=kernel_size, scope='deconv8')
net = slim.conv2d_transpose(net, filter_num, kernel_size, scope='deconv9')
# 为什么放到外面就好了呢?
net = slim.conv2d_transpose(net, output_channel, kernel_size, activation_fn=tf.nn.tanh, normalizer_fn=None,
scope='deconv13', weights_initializer=tf.contrib.layers.xavier_initializer())
output = net
return output
| 53.708207
| 119
| 0.585399
| 2,145
| 17,670
| 4.617716
| 0.117483
| 0.110045
| 0.09581
| 0.064614
| 0.867441
| 0.860071
| 0.841595
| 0.825946
| 0.825745
| 0.825745
| 0
| 0.052199
| 0.303962
| 17,670
| 328
| 120
| 53.871951
| 0.753151
| 0.093435
| 0
| 0.705
| 0
| 0
| 0.043195
| 0
| 0
| 0
| 0
| 0.003049
| 0
| 1
| 0.045
| false
| 0.005
| 0.01
| 0
| 0.095
| 0.015
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
44bbeba6b3d86f356e1abd8804654a39b467e879
| 311
|
py
|
Python
|
adclassifier/feature_selection.py
|
BoudhayanBanerjee/political-ad-classifier
|
e7b7bd76eadd4bde536862449e71370903d22114
|
[
"MIT"
] | 2
|
2017-06-20T19:18:20.000Z
|
2017-06-30T19:01:44.000Z
|
adclassifier/feature_selection.py
|
BoudhayanBanerjee/political-ad-classifier
|
e7b7bd76eadd4bde536862449e71370903d22114
|
[
"MIT"
] | null | null | null |
adclassifier/feature_selection.py
|
BoudhayanBanerjee/political-ad-classifier
|
e7b7bd76eadd4bde536862449e71370903d22114
|
[
"MIT"
] | null | null | null |
from sklearn.feature_selection import VarianceThreshold
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import chi2
from sklearn.feature_selection import mutual_info_classif
from sklearn.feature_selection import RFE
from sklearn.feature_selection import SelectFromModel
# TODO
| 34.555556
| 57
| 0.890675
| 39
| 311
| 6.897436
| 0.358974
| 0.245353
| 0.401487
| 0.60223
| 0.736059
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003521
| 0.086817
| 311
| 8
| 58
| 38.875
| 0.943662
| 0.012862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 8
|
7851e38128a7f26e888b55035182c8011e58c683
| 4,105
|
py
|
Python
|
get_mismatch.py
|
TuanjieNew/SeqDesignTool
|
8ee1a7631ac62378b406287fd082da6d47ac4236
|
[
"MIT"
] | null | null | null |
get_mismatch.py
|
TuanjieNew/SeqDesignTool
|
8ee1a7631ac62378b406287fd082da6d47ac4236
|
[
"MIT"
] | null | null | null |
get_mismatch.py
|
TuanjieNew/SeqDesignTool
|
8ee1a7631ac62378b406287fd082da6d47ac4236
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
#fn; get_mismatch.py
#ACTGCAGCGTCATAGTTTTTGAG
import os
import copy
def getMismatch(start,seq,name,end):
#name = seq
quality = 'IIIIIIIIIIIIIIIIIIIIII'
OUTFILE = open('./mis_test.fastq','a')
ls = list(seq)
ls_1 = copy.deepcopy(ls)
ii = start+1
for i in ls_1[ii:end]:
if i == 'A':
ls_1[ii] = 'T'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'G'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'C'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
if i == 'T':
ls_1[ii] = 'A'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'G'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'C'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
if i == 'G':
ls_1[ii] = 'T'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'A'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'C'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
if i == 'C':
ls_1[ii] = 'T'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'G'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ls_1[ii] = 'A'
ls_1[21] = 'G'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
ls_1[22] = 'A'
OUTFILE.write('@'+name+'\n'+''.join(ls_1)+'\n'+'+'+name+'\n'+quality+'\n')
getMismatch(ii,ls_1,name,end - 1)
ii+=1
seq = 'GCTGCGTCGTCGTAGTTTTTTGG'
getMismatch(-1, seq, seq, 21)
| 37.66055
| 86
| 0.429963
| 584
| 4,105
| 2.892123
| 0.075342
| 0.131439
| 0.227353
| 0.241563
| 0.843694
| 0.843694
| 0.843694
| 0.843694
| 0.843694
| 0.843694
| 0
| 0.047408
| 0.285749
| 4,105
| 108
| 87
| 38.009259
| 0.528649
| 0.01754
| 0
| 0.818182
| 0
| 0
| 0.084885
| 0.011169
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011364
| false
| 0
| 0.022727
| 0
| 0.034091
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
7874bc7bc13244705a4387d681fc1dd47ef68895
| 190
|
py
|
Python
|
public/views/base.py
|
cmisid/Wasty-Database
|
c2e350e3be2cb60df87c9a1481e5da3342c6b73b
|
[
"Apache-2.0"
] | null | null | null |
public/views/base.py
|
cmisid/Wasty-Database
|
c2e350e3be2cb60df87c9a1481e5da3342c6b73b
|
[
"Apache-2.0"
] | null | null | null |
public/views/base.py
|
cmisid/Wasty-Database
|
c2e350e3be2cb60df87c9a1481e5da3342c6b73b
|
[
"Apache-2.0"
] | null | null | null |
from django.http import HttpResponse
def ping(request):
return HttpResponse(status=200)
def parse_user(request):
users = json.loads(request.body)
return HttpResponse(status=200)
| 21.111111
| 36
| 0.763158
| 25
| 190
| 5.76
| 0.68
| 0.25
| 0.333333
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03681
| 0.142105
| 190
| 9
| 37
| 21.111111
| 0.846626
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 8
|
78771f610c378272f48c301cea2e0b478e0a360f
| 189
|
py
|
Python
|
platform/hwconf_data/efr32mg21/modules/PIN/PIN_Snippets.py
|
lenloe1/v2.7
|
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
|
[
"Zlib"
] | null | null | null |
platform/hwconf_data/efr32mg21/modules/PIN/PIN_Snippets.py
|
lenloe1/v2.7
|
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
|
[
"Zlib"
] | 1
|
2020-08-25T02:36:22.000Z
|
2020-08-25T02:36:22.000Z
|
platform/hwconf_data/efr32mg21/modules/PIN/PIN_Snippets.py
|
lenloe1/v2.7
|
9ac9c4a7bb37987af382c80647f42d84db5f2e1d
|
[
"Zlib"
] | 1
|
2020-08-25T01:56:04.000Z
|
2020-08-25T01:56:04.000Z
|
"""
Generated from a template
"""
import efr32mg21.PythonSnippet.RuntimeModel as RuntimeModel
from efr32mg21.modules.PIN.PIN_Defs import PORT_PINS
def activate_runtime():
pass
| 11.117647
| 59
| 0.767196
| 23
| 189
| 6.173913
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050314
| 0.15873
| 189
| 16
| 60
| 11.8125
| 0.842767
| 0.132275
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 7
|
788caa5cd2c442f468e0b52721f2be5056340add
| 145
|
py
|
Python
|
dotfiles/config/offlineimap/custom.py
|
nathbo/dotfiles
|
fb0cc8efbd4c9b65e488331c40e7ba5bdb2d060a
|
[
"MIT"
] | 1
|
2017-10-22T14:55:49.000Z
|
2017-10-22T14:55:49.000Z
|
dotfiles/config/offlineimap/custom.py
|
nathbo/dotfiles
|
fb0cc8efbd4c9b65e488331c40e7ba5bdb2d060a
|
[
"MIT"
] | null | null | null |
dotfiles/config/offlineimap/custom.py
|
nathbo/dotfiles
|
fb0cc8efbd4c9b65e488331c40e7ba5bdb2d060a
|
[
"MIT"
] | 1
|
2017-09-30T08:41:44.000Z
|
2017-09-30T08:41:44.000Z
|
from subprocess import check_output
def get_password(account):
return check_output("authinfo.sh machine="+account, shell=True).strip(b'\n')
| 29
| 80
| 0.772414
| 21
| 145
| 5.190476
| 0.857143
| 0.201835
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 145
| 4
| 81
| 36.25
| 0.838462
| 0
| 0
| 0
| 0
| 0
| 0.151724
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 0
|
0
| 8
|
152427c5f788f88c5e06abdde5fbcd23a11845d7
| 2,606
|
py
|
Python
|
FEM/src/test/StatisticsTest.py
|
BartSiwek/Neurotransmitter2D
|
200c1b7e74de0786b1bb52d456e227f9d64cebc6
|
[
"MIT"
] | null | null | null |
FEM/src/test/StatisticsTest.py
|
BartSiwek/Neurotransmitter2D
|
200c1b7e74de0786b1bb52d456e227f9d64cebc6
|
[
"MIT"
] | null | null | null |
FEM/src/test/StatisticsTest.py
|
BartSiwek/Neurotransmitter2D
|
200c1b7e74de0786b1bb52d456e227f9d64cebc6
|
[
"MIT"
] | null | null | null |
import unittest, math
import Pslg, ElementAwarePslg
import Statistics
class ParametersTest(unittest.TestCase):
def testComputeElementAngleRange(self):
#Angle of zero
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(1,0)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.0 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 45 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(1,1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.25 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 45 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(1,-1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.25 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 90 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(0,1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.5 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 90 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(0,-1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.5 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 135 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(-1,1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.75 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 135 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(-1,-1)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 0.75 * math.pi
self.assertAlmostEquals(angle, expected, 9)
#Angle of 180 degrees
a = Pslg.GridPoint(0,0)
b = Pslg.GridPoint(-1,0)
c = Pslg.GridPoint(1,0)
angle = Statistics.ComputeAngleBetweenPoints(a, b, c)
expected = 1.0 * math.pi
self.assertAlmostEquals(angle, expected, 9)
if __name__ == '__main__':
unittest.main()
| 29.280899
| 61
| 0.550269
| 299
| 2,606
| 4.769231
| 0.123746
| 0.218794
| 0.137447
| 0.105189
| 0.882889
| 0.882889
| 0.882889
| 0.882889
| 0.852034
| 0.852034
| 0
| 0.054545
| 0.345741
| 2,606
| 88
| 62
| 29.613636
| 0.781818
| 0.057176
| 0
| 0.690909
| 0
| 0
| 0.003267
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 1
| 0.018182
| false
| 0
| 0.054545
| 0
| 0.090909
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
152593dd375d6bb572f3b24beca19b14fca5f55a
| 21,719
|
py
|
Python
|
dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/dn_20020325.py
|
aleasims/Peach
|
bb56841e943d719d5101fee0a503ed34308eda04
|
[
"MIT"
] | null | null | null |
dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/dn_20020325.py
|
aleasims/Peach
|
bb56841e943d719d5101fee0a503ed34308eda04
|
[
"MIT"
] | null | null | null |
dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/dn_20020325.py
|
aleasims/Peach
|
bb56841e943d719d5101fee0a503ed34308eda04
|
[
"MIT"
] | 1
|
2020-07-26T03:57:45.000Z
|
2020-07-26T03:57:45.000Z
|
# Examples from the article "Two-stage recursive algorithms in XSLT"
# By Dimitre Novatchev and Slawomir Tyszko
# http://www.topxml.com/xsl/articles/recurse/
from Xml.Xslt import test_harness
BOOKS = """ <book>
<title>Angela's Ashes</title>
<author>Frank McCourt</author>
<publisher>HarperCollins</publisher>
<isbn>0 00 649840 X</isbn>
<price>6.99</price>
<sales>235</sales>
</book>
<book>
<title>Sword of Honour</title>
<author>Evelyn Waugh</author>
<publisher>Penguin Books</publisher>
<isbn>0 14 018967 X</isbn>
<price>12.99</price>
<sales>12</sales>
</book>"""
BOOKLIST_XML = """<?xml version="1.0" encoding="utf-8"?>
<booklist>
%s
</booklist>"""
BOOKS_TOTAL = 6.99 * 235 + 12.99 * 12
# total-sales/simple.xsl
sheet_1 = """<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="/*/book"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="sumSales1">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:choose>
<xsl:when test="$pNodes">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="$pNodes[position()!=1]"/>
<xsl:with-param name="result" select="$result+$pNodes[1]/sales*$pNodes[1]/price"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
# total-sales/dvc.xsl
sheet_2 = """<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="/*/book"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="sumSales">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:variable name="vcntNodes" select="count($pNodes)"/>
<xsl:choose>
<xsl:when test="$vcntNodes = 1">
<xsl:value-of select="$result + $pNodes/sales * $pNodes/price"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="vcntHalf" select="floor($vcntNodes div 2)"/>
<xsl:variable name="vValue1">
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="$pNodes[position() <= $vcntHalf]"/>
<xsl:with-param name="result" select="$result"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="$pNodes[position() > $vcntHalf]"/>
<xsl:with-param name="result" select="$vValue1"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
# total-sales/two-stage.xsl
# (with $t param added so threshold can be adjusted)
#
# The threshold is the # of elements above which DVC will be used,
# and below which recursion will be used.
#
sheet_3="""<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="t" select="20"/>
<xsl:template match="/">
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="/*/book"/>
<xsl:with-param name="threshold" select="$t"/>
</xsl:call-template>
</xsl:template>
<!-- DVC template: -->
<xsl:template name="sumSales">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="threshold" select="10"/>
<xsl:param name="result" select="0"/>
<xsl:variable name="vcntNodes" select="count($pNodes)"/>
<xsl:choose>
<xsl:when test="$vcntNodes <= $threshold">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="$pNodes"/>
<xsl:with-param name="result" select="$result"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="vcntHalf" select="floor($vcntNodes div 2)"/>
<xsl:variable name="vValue1">
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="$pNodes[position() <= $vcntHalf]"/>
<xsl:with-param name="threshold" select="$threshold"/>
<xsl:with-param name="result" select="$result"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="sumSales">
<xsl:with-param name="pNodes" select="$pNodes[position() > $vcntHalf]"/>
<xsl:with-param name="threshold" select="$threshold"/>
<xsl:with-param name="result" select="$vValue1"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- simple recursive template: -->
<xsl:template name="sumSales1">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:choose>
<xsl:when test="$pNodes">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="$pNodes[position()!=1]"/>
<xsl:with-param name="result" select="$result+$pNodes[1]/sales*$pNodes[1]/price"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise><xsl:value-of select="$result"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
DIGITS = "0123456789"
DIGITS_XML = """<?xml version="1.0" encoding="utf-8"?>
<text>%s</text>"""
REVERSED_DIGITS = "9876543210"
# reverse/lrReverse.xsl
sheet_4 = """<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="/*/text()"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="reverse2">
<xsl:param name="theString"/>
<xsl:variable name="thisLength" select="string-length($theString)"/>
<xsl:choose>
<xsl:when test="$thisLength = 1">
<xsl:value-of select="$theString"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="length1" select="floor($thisLength div 2)"/>
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="substring($theString,$length1+1, $thisLength - $length1)"/>
</xsl:call-template>
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="substring($theString, 1, $length1)"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
# reverse/lrReverse2.xsl
# (with $t param added so threshold can be adjusted)
#
# The threshold is the # of chars above which DVC will be used,
# and below which recursion will be used.
#
sheet_5 = """<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:param name="t" select="75"/>
<xsl:template match="/">
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="/*/text()"/>
<xsl:with-param name="threshold" select="$t"/>
</xsl:call-template>
</xsl:template>
<!-- DVC template: -->
<xsl:template name="reverse2">
<xsl:param name="theString"/>
<xsl:param name="threshold" select="30"/>
<xsl:variable name="thisLength" select="string-length($theString)"/>
<xsl:choose>
<xsl:when test="$thisLength <= $threshold">
<xsl:call-template name="reverse">
<xsl:with-param name="theString" select="$theString"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="length1" select="floor($thisLength div 2)"/>
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="substring($theString,$length1+1, $thisLength - $length1)"/>
<xsl:with-param name="threshold" select="$threshold"/>
</xsl:call-template>
<xsl:call-template name="reverse2">
<xsl:with-param name="theString" select="substring($theString, 1, $length1)"/>
<xsl:with-param name="threshold" select="$threshold"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- simple recursive template: -->
<xsl:template name="reverse">
<xsl:param name="theString"/>
<xsl:variable name="thisLength" select="string-length($theString)"/>
<xsl:choose>
<xsl:when test="$thisLength = 1">
<xsl:value-of select="$theString"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($theString,$thisLength,1)"/>
<xsl:call-template name="reverse">
<xsl:with-param name="theString" select="substring($theString, 1, $thisLength -1)"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
GOBBLEDY = "dfd dh AAAsrter xcbxb AAAA gghmjk gfghjk ghAAAkghk dgsdfgAAA sdsdg AAA sdsdfg\n"
GOBBLEDY_XML = """<?xml version="1.0" encoding="utf-8"?>
<text>%s</text>"""
GOBBLEDY_OUT = GOBBLEDY.replace('AAA','ZZZ')
sheet_6="""<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common">
<xsl:output method="text" encoding="iso-8859-1" />
<xsl:template match="/">
<xsl:variable name="Result">
<xsl:call-template name="lrReplace">
<xsl:with-param name="theString" select="/*/text()"/>
<xsl:with-param name="target" select="'AAA'" />
<xsl:with-param name="replacement" select="'ZZZ'" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$Result" />
</xsl:template>
<xsl:template name="lrReplace">
<xsl:param name="theString"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
<xsl:variable name="lStr" select="string-length($theString)"/>
<xsl:variable name="resRTF">
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString" select="$theString"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="resNode-set" select="exsl:node-set($resRTF)"/>
<xsl:value-of select="$resNode-set/text()"/>
<xsl:value-of select="substring($theString, $lStr - $resNode-set/u+1)" />
</xsl:template>
<xsl:template name="lrReplace2">
<xsl:param name="theString"/>
<xsl:param name="target"/>
<xsl:param name="replacement" select="''" />
<xsl:variable name="lStr" select="string-length($theString)" />
<xsl:variable name="lTarget" select="string-length($target)" />
<xsl:choose>
<xsl:when test="$lStr < $lTarget + $lTarget">
<xsl:choose>
<xsl:when
test="contains($theString,$target)">
<xsl:value-of select="substring-before($theString,$target)" />
<xsl:value-of select="$replacement" />
<u>
<xsl:value-of select="string-length(substring-after($theString,$target))" />
</u>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$lStr >= $lTarget">
<xsl:value-of select="substring($theString, 1, $lStr - $lTarget + 1)"/>
<u>
<xsl:value-of select="$lTarget - 1" />
</u>
</xsl:when>
<xsl:otherwise>
<u>
<xsl:value-of select="$lStr" />
</u>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Now the general case - theString is not less than twice the replacement -->
<xsl:otherwise>
<xsl:variable name="halfLength" select="floor($lStr div 2)"/>
<xsl:variable name="processedHalf">
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString" select="substring($theString, 1, $halfLength)"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="nodePrHalf" select="exsl:node-set($processedHalf)"/>
<xsl:value-of select="$nodePrHalf/text()"/>
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString"
select="substring($theString, $halfLength - $nodePrHalf/u + 1)" />
<xsl:with-param name="target" select="$target" />
<xsl:with-param name="replacement" select="$replacement" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
sheet_7="""<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common">
<xsl:output method="text" encoding="iso-8859-1" />
<xsl:template match="/">
<xsl:variable name="Result">
<xsl:call-template name="lrReplace">
<xsl:with-param name="theString" select="/*/text()"/>
<xsl:with-param name="target" select="'AAA'"/>
<xsl:with-param name="replacement" select="'ZZZ'"/>
<xsl:with-param name="threshold" select="2000"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$Result" />
</xsl:template>
<xsl:template name="lrReplace">
<xsl:param name="theString"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
<xsl:param name="threshold" select="150"/>
<xsl:variable name="lStr" select="string-length($theString)"/>
<xsl:variable name="resRTF">
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString" select="$theString"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
<xsl:with-param name="threshold" select="$threshold"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="resNode-set" select="exsl:node-set($resRTF)"/>
<xsl:value-of select="$resNode-set/text()"/>
<xsl:value-of select="substring($theString, $lStr - $resNode-set/u+1)"/>
</xsl:template>
<!-- DVC template: -->
<xsl:template name="lrReplace2">
<xsl:param name="theString"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
<xsl:param name="threshold" select="150"/>
<xsl:variable name="lStr" select="string-length($theString)"/>
<xsl:variable name="lTarget" select="string-length($target)"/>
<xsl:choose>
<xsl:when test="$lStr <= $threshold">
<xsl:call-template name="lrReplace3">
<xsl:with-param name="theString" select="$theString"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="halfLength" select="floor($lStr div 2)"/>
<xsl:variable name="processedHalf">
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString" select="substring($theString, 1, $halfLength)" />
<xsl:with-param name="target" select="$target" />
<xsl:with-param name="replacement" select="$replacement"/>
<xsl:with-param name="threshold" select="$threshold"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="nodePrHalf" select="exsl:node-set($processedHalf)"/>
<xsl:value-of select="$nodePrHalf/text()"/>
<xsl:call-template name="lrReplace2">
<xsl:with-param name="theString" select="substring($theString, $halfLength - $nodePrHalf/u + 1)"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
<xsl:with-param name="threshold" select="$threshold" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- simple recursive template: -->
<xsl:template name="lrReplace3">
<xsl:param name="theString" />
<xsl:param name="target" />
<xsl:param name="replacement" />
<xsl:choose>
<xsl:when test="contains($theString, $target)">
<xsl:value-of select="substring-before($theString, $target)"/>
<xsl:value-of select="$replacement"/>
<xsl:call-template name="lrReplace3">
<xsl:with-param name="theString" select="substring-after($theString, $target)"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="lStr" select="string-length($theString)"/>
<xsl:variable name="lTarget" select="string-length($target)"/>
<xsl:choose>
<xsl:when test="$lStr >= $lTarget">
<xsl:value-of select="substring($theString, 1, $lStr -$lTarget+1)" />
<u>
<xsl:value-of select="$lTarget -1"/>
</u>
</xsl:when>
<xsl:otherwise>
<u>
<xsl:value-of select="$lStr"/>
</u>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>"""
def Test(tester):
# how many repetitions of BOOKS for the shortest source doc
MULTIPLIER = 10
# how many binary orders of magnitude to go up to
EXPLIMIT = 1
sheet = test_harness.FileInfo(string=sheet_1)
for i in range(EXPLIMIT):
elements = (2 * MULTIPLIER) * 2 ** i
title = "simple recursion with %d element" % elements + "s" * (elements > 0)
source_xml = BOOKLIST_XML % ((BOOKS * MULTIPLIER) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = str((BOOKS_TOTAL * MULTIPLIER) * 2 ** i)
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title)
sheet = test_harness.FileInfo(string=sheet_2)
for i in range(EXPLIMIT):
elements = (2 * MULTIPLIER) * 2 ** i
title = "divide and conquer with %d element" % elements + "s" * (elements > 0)
source_xml = BOOKLIST_XML % ((BOOKS * MULTIPLIER) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = str((BOOKS_TOTAL * MULTIPLIER) * 2 ** i)
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title)
sheet = test_harness.FileInfo(string=sheet_3)
for i in range(EXPLIMIT):
threshold = 8 # seems to be best as of 2003-03-23
elements = (2 * MULTIPLIER) * 2 ** i
title = "2-stage divide and conquer with %d element" % elements + "s" * (elements > 0)
title += " (threshold=%d)" % threshold
source_xml = BOOKLIST_XML % ((BOOKS * MULTIPLIER) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = str((BOOKS_TOTAL * MULTIPLIER) * 2 ** i)
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title,
topLevelParams={'t': threshold})
sheet = test_harness.FileInfo(string=sheet_4)
for i in range(EXPLIMIT):
chars = 1000 * 2 ** i
title = "divide and conquer reversal of %d-char string" % chars
source_xml = DIGITS_XML % ((DIGITS * 100) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = (REVERSED_DIGITS * 100) * 2 ** i
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title)
sheet = test_harness.FileInfo(string=sheet_5)
for i in range(EXPLIMIT):
threshold = 75
chars = 1000 * 2 ** i
title = "2-stage divide and conquer reversal of %d-char string" % chars
title += " (threshold=%d)" % threshold
source_xml = DIGITS_XML % ((DIGITS * 100) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = (REVERSED_DIGITS * 100) * 2 ** i
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title,
topLevelParams={'t': threshold})
sheet = test_harness.FileInfo(string=sheet_6)
for i in range(EXPLIMIT):
chars = (len(GOBBLEDY) * 20) * 2 ** i
title = "divide and conquer search/replace on %d-char string" % chars
source_xml = GOBBLEDY_XML % ((GOBBLEDY * 20) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = (GOBBLEDY_OUT * 20) * 2 ** i
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title)
sheet = test_harness.FileInfo(string=sheet_7)
for i in range(EXPLIMIT):
chars = (len(GOBBLEDY) * 20) * 2 ** i
title = "2-stage divide and conquer search/replace on %d-char string" % chars
source_xml = GOBBLEDY_XML % ((GOBBLEDY * 20) * 2 ** i)
source_1 = test_harness.FileInfo(string=source_xml)
expected_1 = (GOBBLEDY_OUT * 20) * 2 ** i
test_harness.XsltTest(tester, source_1, [sheet], expected_1,
title=title)
return
| 35.430669
| 110
| 0.595423
| 2,585
| 21,719
| 4.964797
| 0.089362
| 0.068022
| 0.060776
| 0.081035
| 0.914602
| 0.90533
| 0.883357
| 0.88172
| 0.872604
| 0.864578
| 0
| 0.021078
| 0.22455
| 21,719
| 612
| 111
| 35.488562
| 0.740945
| 0.032782
| 0
| 0.82438
| 0
| 0.045455
| 0.815604
| 0.114908
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002066
| false
| 0
| 0.002066
| 0
| 0.006198
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
1539510aefa3035d2187157e5249c98d9f87bb5d
| 2,577
|
py
|
Python
|
test/test_mod_group.py
|
dvkruchinin/python_tr
|
eaa901759e78f6036491556f71f9f19d5830bd98
|
[
"MIT"
] | null | null | null |
test/test_mod_group.py
|
dvkruchinin/python_tr
|
eaa901759e78f6036491556f71f9f19d5830bd98
|
[
"MIT"
] | null | null | null |
test/test_mod_group.py
|
dvkruchinin/python_tr
|
eaa901759e78f6036491556f71f9f19d5830bd98
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding:utf-8
"""
Name : test_mod_group.py
Author : Dmitry Kruchinin
Date : 6/21/2021
Desc:
"""
from model.group import Group
from random import randrange
def test_modification_some_group(app, db, check_ui):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test"))
old_groups = db.get_group_list()
index = randrange(len(old_groups))
group = Group(name="111", header="222", footer="333")
group.id = old_groups[index].id
app.group.modification_group_by_id(group.id, group)
new_groups = db.get_group_list()
old_groups[index] = group
assert old_groups == new_groups
if check_ui:
assert sorted(old_groups, key=Group.id_or_max) == sorted(app.group.get_group_list(), key=Group.id_or_max)
def test_modification_some_group_name(app, db, check_ui):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test"))
old_groups = db.get_group_list()
index = randrange(len(old_groups))
group = Group(name="New group")
group.id = old_groups[index].id
app.group.modification_group_by_id(group.id, group)
new_groups = db.get_group_list()
old_groups[index] = group
assert old_groups == new_groups
if check_ui:
assert sorted(old_groups, key=Group.id_or_max) == sorted(app.group.get_group_list(), key=Group.id_or_max)
def test_modification_some_group_header(app, db, check_ui):
if len(db.get_group_list()) == 0:
app.group.create(Group(name="test"))
old_groups = db.get_group_list()
index = randrange(len(old_groups))
group = Group(header="New header")
group.id = old_groups[index].id
group.name = old_groups[index].name
app.group.modification_group_by_id(group.id, group)
new_groups = db.get_group_list()
old_groups[index] = group
assert old_groups == new_groups
if check_ui:
assert sorted(old_groups, key=Group.id_or_max) == sorted(app.group.get_group_list(), key=Group.id_or_max)
def test_modification_some_group_footer(app, db, check_ui):
app.group.create_group_if_missing()
old_groups = db.get_group_list()
index = randrange(len(old_groups))
group = Group(footer="New footer")
group.id = old_groups[index].id
group.name = old_groups[index].name
app.group.modification_group_by_id(group.id, group)
new_groups = db.get_group_list()
old_groups[index] = group
assert old_groups == new_groups
if check_ui:
assert sorted(old_groups, key=Group.id_or_max) == sorted(app.group.get_group_list(), key=Group.id_or_max)
| 35.30137
| 113
| 0.704307
| 404
| 2,577
| 4.195545
| 0.136139
| 0.138053
| 0.106195
| 0.090855
| 0.856047
| 0.839528
| 0.839528
| 0.839528
| 0.839528
| 0.839528
| 0
| 0.009355
| 0.170353
| 2,577
| 72
| 114
| 35.791667
| 0.783442
| 0.045402
| 0
| 0.8
| 0
| 0
| 0.0204
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 1
| 0.072727
| false
| 0
| 0.036364
| 0
| 0.109091
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
157e9c435fb007c2d2c77391f8ba1bfe428ad718
| 2,041
|
py
|
Python
|
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/feature_column/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | 2
|
2020-09-30T00:11:09.000Z
|
2021-10-04T13:00:38.000Z
|
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/feature_column/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | null | null | null |
ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/feature_column/__init__.py
|
Lube-Project/ProgettoLube
|
cbf33971e2c2e865783ec1a2302625539186a338
|
[
"MIT"
] | 1
|
2021-01-28T01:57:41.000Z
|
2021-01-28T01:57:41.000Z
|
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.feature_column namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow.python.feature_column.feature_column import input_layer
from tensorflow.python.feature_column.feature_column import linear_model
from tensorflow.python.feature_column.feature_column import make_parse_example_spec
from tensorflow.python.feature_column.feature_column_v2 import bucketized_column
from tensorflow.python.feature_column.feature_column_v2 import categorical_column_with_hash_bucket
from tensorflow.python.feature_column.feature_column_v2 import categorical_column_with_identity
from tensorflow.python.feature_column.feature_column_v2 import categorical_column_with_vocabulary_file
from tensorflow.python.feature_column.feature_column_v2 import categorical_column_with_vocabulary_list
from tensorflow.python.feature_column.feature_column_v2 import crossed_column
from tensorflow.python.feature_column.feature_column_v2 import embedding_column
from tensorflow.python.feature_column.feature_column_v2 import indicator_column
from tensorflow.python.feature_column.feature_column_v2 import numeric_column
from tensorflow.python.feature_column.feature_column_v2 import shared_embedding_columns
from tensorflow.python.feature_column.feature_column_v2 import weighted_categorical_column
from tensorflow.python.feature_column.sequence_feature_column import sequence_categorical_column_with_hash_bucket
from tensorflow.python.feature_column.sequence_feature_column import sequence_categorical_column_with_identity
from tensorflow.python.feature_column.sequence_feature_column import sequence_categorical_column_with_vocabulary_file
from tensorflow.python.feature_column.sequence_feature_column import sequence_categorical_column_with_vocabulary_list
from tensorflow.python.feature_column.sequence_feature_column import sequence_numeric_column
del _print_function
| 65.83871
| 117
| 0.907398
| 279
| 2,041
| 6.218638
| 0.200717
| 0.292219
| 0.21902
| 0.295677
| 0.798847
| 0.798847
| 0.795389
| 0.795389
| 0.705476
| 0.621902
| 0
| 0.005702
| 0.054875
| 2,041
| 30
| 118
| 68.033333
| 0.893727
| 0.083293
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.954545
| 0
| 0.954545
| 0.090909
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 11
|
1584d2226a3642e36797239be0509b2d837c07a7
| 1,002,679
|
py
|
Python
|
fhir/resources/DSTU2/tests/test_conformance.py
|
cstoltze/fhir.resources
|
52f99738935b7313089d89daf94d73ce7d167c9d
|
[
"BSD-3-Clause"
] | 144
|
2019-05-08T14:24:43.000Z
|
2022-03-30T02:37:11.000Z
|
fhir/resources/DSTU2/tests/test_conformance.py
|
cstoltze/fhir.resources
|
52f99738935b7313089d89daf94d73ce7d167c9d
|
[
"BSD-3-Clause"
] | 82
|
2019-05-13T17:43:13.000Z
|
2022-03-30T16:45:17.000Z
|
fhir/resources/DSTU2/tests/test_conformance.py
|
cstoltze/fhir.resources
|
52f99738935b7313089d89daf94d73ce7d167c9d
|
[
"BSD-3-Clause"
] | 48
|
2019-04-04T14:14:53.000Z
|
2022-03-30T06:07:31.000Z
|
# -*- coding: utf-8 -*-
from datetime import date, datetime
from pydantic.datetime_parse import parse_date, parse_datetime
from .. import fhirtypes # noqa: F401
from .. import conformance
def test_Conformance_1(base_settings):
filename = base_settings["unittest_data_dir"] / "conformance-base.canonical.json"
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_1(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_1(inst2)
def impl_Conformance_1(inst):
assert inst.acceptUnknown == "both"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://hl7.org/fhir"
assert inst.date == parse_datetime("2015-10-24T07:41:03+11:00")
assert (
inst.description
== "This is the base conformance statement for FHIR. It represents a server that provides the full set of functionality defined by FHIR. It is provided to use as a template for system designers to build their own conformance statements from"
)
assert inst.experimental == True
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "base"
assert inst.kind == "capability"
assert inst.name == "Base FHIR Conformance Statement (Full)"
assert inst.publisher == "FHIR Project Team"
assert inst.rest[0].documentation == "All the functionality defined in FHIR"
assert inst.rest[0].interaction[0].code == "transaction"
assert (
inst.rest[0].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].interaction[1].code == "history-system"
assert (
inst.rest[0].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].interaction[2].code == "search-system"
assert (
inst.rest[0].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].mode == "server"
assert (
inst.rest[0].operation[0].definition.reference
== "http://hl7.org/fhir/OperationDefinition/resource-validate"
)
assert inst.rest[0].operation[0].name == "validate"
assert (
inst.rest[0].operation[1].definition.reference
== "http://hl7.org/fhir/OperationDefinition/resource-meta"
)
assert inst.rest[0].operation[1].name == "meta"
assert (
inst.rest[0].operation[2].definition.reference
== "http://hl7.org/fhir/OperationDefinition/resource-meta-add"
)
assert inst.rest[0].operation[2].name == "meta-add"
assert (
inst.rest[0].operation[3].definition.reference
== "http://hl7.org/fhir/OperationDefinition/resource-meta-delete"
)
assert inst.rest[0].operation[3].name == "meta-delete"
assert (
inst.rest[0].operation[4].definition.reference
== "http://hl7.org/fhir/OperationDefinition/composition-document"
)
assert inst.rest[0].operation[4].name == "document"
assert (
inst.rest[0].operation[5].definition.reference
== "http://hl7.org/fhir/OperationDefinition/conceptmap-translate"
)
assert inst.rest[0].operation[5].name == "translate"
assert (
inst.rest[0].operation[6].definition.reference
== "http://hl7.org/fhir/OperationDefinition/conceptmap-closure"
)
assert inst.rest[0].operation[6].name == "closure"
assert (
inst.rest[0].operation[7].definition.reference
== "http://hl7.org/fhir/OperationDefinition/encounter-everything"
)
assert inst.rest[0].operation[7].name == "everything"
assert (
inst.rest[0].operation[8].definition.reference
== "http://hl7.org/fhir/OperationDefinition/list-find"
)
assert inst.rest[0].operation[8].name == "find"
assert (
inst.rest[0].operation[9].definition.reference
== "http://hl7.org/fhir/OperationDefinition/messageheader-process-message"
)
assert inst.rest[0].operation[9].name == "process-message"
assert (
inst.rest[0].operation[10].definition.reference
== "http://hl7.org/fhir/OperationDefinition/patient-everything"
)
assert inst.rest[0].operation[10].name == "everything"
assert (
inst.rest[0].operation[11].definition.reference
== "http://hl7.org/fhir/OperationDefinition/questionnaire-populate"
)
assert inst.rest[0].operation[11].name == "populate"
assert (
inst.rest[0].operation[12].definition.reference
== "http://hl7.org/fhir/OperationDefinition/structuredefinition-questionnaire"
)
assert inst.rest[0].operation[12].name == "questionnaire"
assert (
inst.rest[0].operation[13].definition.reference
== "http://hl7.org/fhir/OperationDefinition/valueset-expand"
)
assert inst.rest[0].operation[13].name == "expand"
assert (
inst.rest[0].operation[14].definition.reference
== "http://hl7.org/fhir/OperationDefinition/valueset-lookup"
)
assert inst.rest[0].operation[14].name == "lookup"
assert (
inst.rest[0].operation[15].definition.reference
== "http://hl7.org/fhir/OperationDefinition/valueset-validate-code"
)
assert inst.rest[0].operation[15].name == "validate-code"
assert inst.rest[0].resource[0].conditionalCreate == True
assert inst.rest[0].resource[0].conditionalDelete == "multiple"
assert inst.rest[0].resource[0].conditionalUpdate == True
assert inst.rest[0].resource[0].interaction[0].code == "read"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[1].code == "vread"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[2].code == "update"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[3].code == "delete"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[5].code == "validate"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[7].code == "create"
assert (
inst.rest[0].resource[0].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[0].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Account"
)
assert inst.rest[0].resource[0].searchInclude[0] == "Account.patient"
assert inst.rest[0].resource[0].searchInclude[1] == "Account.subject"
assert inst.rest[0].resource[0].searchInclude[2] == "Account.owner"
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/account-balance"
)
assert (
inst.rest[0].resource[0].searchParam[0].documentation
== "How much is in account?"
)
assert inst.rest[0].resource[0].searchParam[0].name == "balance"
assert inst.rest[0].resource[0].searchParam[0].type == "quantity"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/account-patient"
)
assert (
inst.rest[0].resource[0].searchParam[1].documentation
== "What is account tied to?"
)
assert inst.rest[0].resource[0].searchParam[1].name == "patient"
assert inst.rest[0].resource[0].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/account-status"
)
assert inst.rest[0].resource[0].searchParam[2].documentation == "active | inactive"
assert inst.rest[0].resource[0].searchParam[2].name == "status"
assert inst.rest[0].resource[0].searchParam[2].type == "token"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/account-subject"
)
assert (
inst.rest[0].resource[0].searchParam[3].documentation
== "What is account tied to?"
)
assert inst.rest[0].resource[0].searchParam[3].name == "subject"
assert inst.rest[0].resource[0].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/account-name"
)
assert (
inst.rest[0].resource[0].searchParam[4].documentation == "Human-readable label"
)
assert inst.rest[0].resource[0].searchParam[4].name == "name"
assert inst.rest[0].resource[0].searchParam[4].type == "string"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/account-owner"
)
assert (
inst.rest[0].resource[0].searchParam[5].documentation == "Who is responsible?"
)
assert inst.rest[0].resource[0].searchParam[5].name == "owner"
assert inst.rest[0].resource[0].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/account-period"
)
assert inst.rest[0].resource[0].searchParam[6].documentation == "Transaction window"
assert inst.rest[0].resource[0].searchParam[6].name == "period"
assert inst.rest[0].resource[0].searchParam[6].type == "date"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/account-type"
)
assert (
inst.rest[0].resource[0].searchParam[7].documentation
== "E.g. patient, expense, depreciation"
)
assert inst.rest[0].resource[0].searchParam[7].name == "type"
assert inst.rest[0].resource[0].searchParam[7].type == "token"
assert (
inst.rest[0].resource[0].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/account-identifier"
)
assert inst.rest[0].resource[0].searchParam[8].documentation == "Account number"
assert inst.rest[0].resource[0].searchParam[8].name == "identifier"
assert inst.rest[0].resource[0].searchParam[8].type == "token"
assert inst.rest[0].resource[0].type == "Account"
assert inst.rest[0].resource[1].conditionalCreate == True
assert inst.rest[0].resource[1].conditionalDelete == "multiple"
assert inst.rest[0].resource[1].conditionalUpdate == True
assert inst.rest[0].resource[1].interaction[0].code == "read"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[1].code == "vread"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[2].code == "update"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[3].code == "delete"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[5].code == "validate"
assert (
inst.rest[0].resource[1].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[1].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[7].code == "create"
assert (
inst.rest[0].resource[1].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[1].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"
)
assert inst.rest[0].resource[1].searchInclude[0] == "AllergyIntolerance.reporter"
assert inst.rest[0].resource[1].searchInclude[1] == "AllergyIntolerance.patient"
assert inst.rest[0].resource[1].searchInclude[2] == "AllergyIntolerance.recorder"
assert (
inst.rest[0].resource[1].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-status"
)
assert (
inst.rest[0].resource[1].searchParam[0].documentation
== "active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error"
)
assert inst.rest[0].resource[1].searchParam[0].name == "status"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert (
inst.rest[0].resource[1].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-onset"
)
assert (
inst.rest[0].resource[1].searchParam[1].documentation
== "Date(/time) when manifestations showed"
)
assert inst.rest[0].resource[1].searchParam[1].name == "onset"
assert inst.rest[0].resource[1].searchParam[1].type == "date"
assert (
inst.rest[0].resource[1].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-last-date"
)
assert (
inst.rest[0].resource[1].searchParam[2].documentation
== "Date(/time) of last known occurrence of a reaction"
)
assert inst.rest[0].resource[1].searchParam[2].name == "last-date"
assert inst.rest[0].resource[1].searchParam[2].type == "date"
assert (
inst.rest[0].resource[1].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-severity"
)
assert (
inst.rest[0].resource[1].searchParam[3].documentation
== "mild | moderate | severe (of event as a whole)"
)
assert inst.rest[0].resource[1].searchParam[3].name == "severity"
assert inst.rest[0].resource[1].searchParam[3].type == "token"
assert (
inst.rest[0].resource[1].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-type"
)
assert (
inst.rest[0].resource[1].searchParam[4].documentation
== "allergy | intolerance - Underlying mechanism (if known)"
)
assert inst.rest[0].resource[1].searchParam[4].name == "type"
assert inst.rest[0].resource[1].searchParam[4].type == "token"
assert (
inst.rest[0].resource[1].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-date"
)
assert inst.rest[0].resource[1].searchParam[5].documentation == "When recorded"
assert inst.rest[0].resource[1].searchParam[5].name == "date"
assert inst.rest[0].resource[1].searchParam[5].type == "date"
assert (
inst.rest[0].resource[1].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-reporter"
)
assert (
inst.rest[0].resource[1].searchParam[6].documentation
== "Source of the information about the allergy"
)
assert inst.rest[0].resource[1].searchParam[6].name == "reporter"
assert inst.rest[0].resource[1].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[1].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-substance"
)
assert (
inst.rest[0].resource[1].searchParam[7].documentation
== "Substance, (or class) considered to be responsible for risk"
)
assert inst.rest[0].resource[1].searchParam[7].name == "substance"
assert inst.rest[0].resource[1].searchParam[7].type == "token"
assert (
inst.rest[0].resource[1].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-criticality"
)
assert (
inst.rest[0].resource[1].searchParam[8].documentation == "CRITL | CRITH | CRITU"
)
assert inst.rest[0].resource[1].searchParam[8].name == "criticality"
assert inst.rest[0].resource[1].searchParam[8].type == "token"
assert (
inst.rest[0].resource[1].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-category"
)
assert (
inst.rest[0].resource[1].searchParam[9].documentation
== "food | medication | environment | other - Category of Substance"
)
assert inst.rest[0].resource[1].searchParam[9].name == "category"
assert inst.rest[0].resource[1].searchParam[9].type == "token"
assert (
inst.rest[0].resource[1].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-patient"
)
assert (
inst.rest[0].resource[1].searchParam[10].documentation
== "Who the sensitivity is for"
)
assert inst.rest[0].resource[1].searchParam[10].name == "patient"
assert inst.rest[0].resource[1].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[1].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-recorder"
)
assert (
inst.rest[0].resource[1].searchParam[11].documentation
== "Who recorded the sensitivity"
)
assert inst.rest[0].resource[1].searchParam[11].name == "recorder"
assert inst.rest[0].resource[1].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[1].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-route"
)
assert (
inst.rest[0].resource[1].searchParam[12].documentation
== "How the subject was exposed to the substance"
)
assert inst.rest[0].resource[1].searchParam[12].name == "route"
assert inst.rest[0].resource[1].searchParam[12].type == "token"
assert (
inst.rest[0].resource[1].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-identifier"
)
assert (
inst.rest[0].resource[1].searchParam[13].documentation
== "External ids for this item"
)
assert inst.rest[0].resource[1].searchParam[13].name == "identifier"
assert inst.rest[0].resource[1].searchParam[13].type == "token"
assert (
inst.rest[0].resource[1].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/allergyintolerance-manifestation"
)
assert (
inst.rest[0].resource[1].searchParam[14].documentation
== "Clinical symptoms/signs associated with the Event"
)
assert inst.rest[0].resource[1].searchParam[14].name == "manifestation"
assert inst.rest[0].resource[1].searchParam[14].type == "token"
assert inst.rest[0].resource[1].searchRevInclude[0] == "ClinicalImpression.problem"
assert (
inst.rest[0].resource[1].searchRevInclude[1]
== "ImmunizationRecommendation.information"
)
assert inst.rest[0].resource[1].type == "AllergyIntolerance"
assert inst.rest[0].resource[2].conditionalCreate == True
assert inst.rest[0].resource[2].conditionalDelete == "multiple"
assert inst.rest[0].resource[2].conditionalUpdate == True
assert inst.rest[0].resource[2].interaction[0].code == "read"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[1].code == "vread"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[2].code == "update"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[3].code == "delete"
assert (
inst.rest[0].resource[2].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[2].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[5].code == "validate"
assert (
inst.rest[0].resource[2].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[2].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[7].code == "create"
assert (
inst.rest[0].resource[2].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[2].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[2].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[2].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Appointment"
)
assert inst.rest[0].resource[2].searchInclude[0] == "Appointment.patient"
assert inst.rest[0].resource[2].searchInclude[1] == "Appointment.practitioner"
assert inst.rest[0].resource[2].searchInclude[2] == "Appointment.location"
assert inst.rest[0].resource[2].searchInclude[3] == "Appointment.actor"
assert (
inst.rest[0].resource[2].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/appointment-patient"
)
assert (
inst.rest[0].resource[2].searchParam[0].documentation
== "One of the individuals of the appointment is this patient"
)
assert inst.rest[0].resource[2].searchParam[0].name == "patient"
assert inst.rest[0].resource[2].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/appointment-practitioner"
)
assert (
inst.rest[0].resource[2].searchParam[1].documentation
== "One of the individuals of the appointment is this practitioner"
)
assert inst.rest[0].resource[2].searchParam[1].name == "practitioner"
assert inst.rest[0].resource[2].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/appointment-location"
)
assert (
inst.rest[0].resource[2].searchParam[2].documentation
== "This location is listed in the participants of the appointment"
)
assert inst.rest[0].resource[2].searchParam[2].name == "location"
assert inst.rest[0].resource[2].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/appointment-status"
)
assert (
inst.rest[0].resource[2].searchParam[3].documentation
== "The overall status of the appointment"
)
assert inst.rest[0].resource[2].searchParam[3].name == "status"
assert inst.rest[0].resource[2].searchParam[3].type == "token"
assert (
inst.rest[0].resource[2].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/appointment-part-status"
)
assert (
inst.rest[0].resource[2].searchParam[4].documentation
== "The Participation status of the subject, or other participant on the appointment. Can be used to locate participants that have not responded to meeting requests."
)
assert inst.rest[0].resource[2].searchParam[4].name == "part-status"
assert inst.rest[0].resource[2].searchParam[4].type == "token"
assert (
inst.rest[0].resource[2].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/appointment-actor"
)
assert (
inst.rest[0].resource[2].searchParam[5].documentation
== "Any one of the individuals participating in the appointment"
)
assert inst.rest[0].resource[2].searchParam[5].name == "actor"
assert inst.rest[0].resource[2].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/appointment-date"
)
assert (
inst.rest[0].resource[2].searchParam[6].documentation
== "Appointment date/time."
)
assert inst.rest[0].resource[2].searchParam[6].name == "date"
assert inst.rest[0].resource[2].searchParam[6].type == "date"
assert (
inst.rest[0].resource[2].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/appointment-identifier"
)
assert (
inst.rest[0].resource[2].searchParam[7].documentation
== "An Identifier of the Appointment"
)
assert inst.rest[0].resource[2].searchParam[7].name == "identifier"
assert inst.rest[0].resource[2].searchParam[7].type == "token"
assert (
inst.rest[0].resource[2].searchRevInclude[0]
== "AppointmentResponse.appointment"
)
assert inst.rest[0].resource[2].searchRevInclude[1] == "CarePlan.activityreference"
assert inst.rest[0].resource[2].searchRevInclude[2] == "ClinicalImpression.plan"
assert inst.rest[0].resource[2].searchRevInclude[3] == "ClinicalImpression.action"
assert inst.rest[0].resource[2].searchRevInclude[4] == "Encounter.appointment"
assert inst.rest[0].resource[2].type == "Appointment"
assert inst.rest[0].resource[3].conditionalCreate == True
assert inst.rest[0].resource[3].conditionalDelete == "multiple"
assert inst.rest[0].resource[3].conditionalUpdate == True
assert inst.rest[0].resource[3].interaction[0].code == "read"
assert (
inst.rest[0].resource[3].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[1].code == "vread"
assert (
inst.rest[0].resource[3].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[2].code == "update"
assert (
inst.rest[0].resource[3].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[3].code == "delete"
assert (
inst.rest[0].resource[3].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[3].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[5].code == "validate"
assert (
inst.rest[0].resource[3].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[3].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[7].code == "create"
assert (
inst.rest[0].resource[3].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[3].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[3].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[3].profile.reference
== "http://hl7.org/fhir/StructureDefinition/AppointmentResponse"
)
assert inst.rest[0].resource[3].searchInclude[0] == "AppointmentResponse.patient"
assert (
inst.rest[0].resource[3].searchInclude[1] == "AppointmentResponse.practitioner"
)
assert inst.rest[0].resource[3].searchInclude[2] == "AppointmentResponse.location"
assert inst.rest[0].resource[3].searchInclude[3] == "AppointmentResponse.actor"
assert (
inst.rest[0].resource[3].searchInclude[4] == "AppointmentResponse.appointment"
)
assert (
inst.rest[0].resource[3].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-patient"
)
assert (
inst.rest[0].resource[3].searchParam[0].documentation
== "This Response is for this Patient"
)
assert inst.rest[0].resource[3].searchParam[0].name == "patient"
assert inst.rest[0].resource[3].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-practitioner"
)
assert (
inst.rest[0].resource[3].searchParam[1].documentation
== "This Response is for this Practitioner"
)
assert inst.rest[0].resource[3].searchParam[1].name == "practitioner"
assert inst.rest[0].resource[3].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-location"
)
assert (
inst.rest[0].resource[3].searchParam[2].documentation
== "This Response is for this Location"
)
assert inst.rest[0].resource[3].searchParam[2].name == "location"
assert inst.rest[0].resource[3].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-part-status"
)
assert (
inst.rest[0].resource[3].searchParam[3].documentation
== "The participants acceptance status for this appointment"
)
assert inst.rest[0].resource[3].searchParam[3].name == "part-status"
assert inst.rest[0].resource[3].searchParam[3].type == "token"
assert (
inst.rest[0].resource[3].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-actor"
)
assert (
inst.rest[0].resource[3].searchParam[4].documentation
== "The Person, Location/HealthcareService or Device that this appointment response replies for"
)
assert inst.rest[0].resource[3].searchParam[4].name == "actor"
assert inst.rest[0].resource[3].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-identifier"
)
assert (
inst.rest[0].resource[3].searchParam[5].documentation
== "An Identifier in this appointment response"
)
assert inst.rest[0].resource[3].searchParam[5].name == "identifier"
assert inst.rest[0].resource[3].searchParam[5].type == "token"
assert (
inst.rest[0].resource[3].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/appointmentresponse-appointment"
)
assert (
inst.rest[0].resource[3].searchParam[6].documentation
== "The appointment that the response is attached to"
)
assert inst.rest[0].resource[3].searchParam[6].name == "appointment"
assert inst.rest[0].resource[3].searchParam[6].type == "reference"
assert inst.rest[0].resource[3].type == "AppointmentResponse"
assert inst.rest[0].resource[4].conditionalCreate == True
assert inst.rest[0].resource[4].conditionalDelete == "multiple"
assert inst.rest[0].resource[4].conditionalUpdate == True
assert inst.rest[0].resource[4].interaction[0].code == "read"
assert (
inst.rest[0].resource[4].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[1].code == "vread"
assert (
inst.rest[0].resource[4].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[2].code == "update"
assert (
inst.rest[0].resource[4].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[3].code == "delete"
assert (
inst.rest[0].resource[4].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[4].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[5].code == "validate"
assert (
inst.rest[0].resource[4].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[4].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[7].code == "create"
assert (
inst.rest[0].resource[4].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[4].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[4].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[4].profile.reference
== "http://hl7.org/fhir/StructureDefinition/AuditEvent"
)
assert inst.rest[0].resource[4].searchInclude[0] == "AuditEvent.reference"
assert inst.rest[0].resource[4].searchInclude[1] == "AuditEvent.patient"
assert inst.rest[0].resource[4].searchInclude[2] == "AuditEvent.participant"
assert (
inst.rest[0].resource[4].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-site"
)
assert (
inst.rest[0].resource[4].searchParam[0].documentation
== "Logical source location within the enterprise"
)
assert inst.rest[0].resource[4].searchParam[0].name == "site"
assert inst.rest[0].resource[4].searchParam[0].type == "token"
assert (
inst.rest[0].resource[4].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-desc"
)
assert (
inst.rest[0].resource[4].searchParam[1].documentation
== "Instance-specific descriptor for Object"
)
assert inst.rest[0].resource[4].searchParam[1].name == "desc"
assert inst.rest[0].resource[4].searchParam[1].type == "string"
assert (
inst.rest[0].resource[4].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-type"
)
assert (
inst.rest[0].resource[4].searchParam[2].documentation
== "Type/identifier of event"
)
assert inst.rest[0].resource[4].searchParam[2].name == "type"
assert inst.rest[0].resource[4].searchParam[2].type == "token"
assert (
inst.rest[0].resource[4].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-date"
)
assert (
inst.rest[0].resource[4].searchParam[3].documentation
== "Time when the event occurred on source"
)
assert inst.rest[0].resource[4].searchParam[3].name == "date"
assert inst.rest[0].resource[4].searchParam[3].type == "date"
assert (
inst.rest[0].resource[4].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-reference"
)
assert (
inst.rest[0].resource[4].searchParam[4].documentation
== "Specific instance of resource (e.g. versioned)"
)
assert inst.rest[0].resource[4].searchParam[4].name == "reference"
assert inst.rest[0].resource[4].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[4].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-identity"
)
assert (
inst.rest[0].resource[4].searchParam[5].documentation
== "Specific instance of object (e.g. versioned)"
)
assert inst.rest[0].resource[4].searchParam[5].name == "identity"
assert inst.rest[0].resource[4].searchParam[5].type == "token"
assert (
inst.rest[0].resource[4].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-patient"
)
assert (
inst.rest[0].resource[4].searchParam[6].documentation
== "Direct reference to resource"
)
assert inst.rest[0].resource[4].searchParam[6].name == "patient"
assert inst.rest[0].resource[4].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[4].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-altid"
)
assert (
inst.rest[0].resource[4].searchParam[7].documentation
== "Alternative User id e.g. authentication"
)
assert inst.rest[0].resource[4].searchParam[7].name == "altid"
assert inst.rest[0].resource[4].searchParam[7].type == "token"
assert (
inst.rest[0].resource[4].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-source"
)
assert (
inst.rest[0].resource[4].searchParam[8].documentation
== "The identity of source detecting the event"
)
assert inst.rest[0].resource[4].searchParam[8].name == "source"
assert inst.rest[0].resource[4].searchParam[8].type == "token"
assert (
inst.rest[0].resource[4].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-address"
)
assert (
inst.rest[0].resource[4].searchParam[9].documentation
== "Identifier for the network access point of the user device"
)
assert inst.rest[0].resource[4].searchParam[9].name == "address"
assert inst.rest[0].resource[4].searchParam[9].type == "token"
assert (
inst.rest[0].resource[4].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-subtype"
)
assert (
inst.rest[0].resource[4].searchParam[10].documentation
== "More specific type/id for the event"
)
assert inst.rest[0].resource[4].searchParam[10].name == "subtype"
assert inst.rest[0].resource[4].searchParam[10].type == "token"
assert (
inst.rest[0].resource[4].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-name"
)
assert (
inst.rest[0].resource[4].searchParam[11].documentation
== "Human-meaningful name for the user"
)
assert inst.rest[0].resource[4].searchParam[11].name == "name"
assert inst.rest[0].resource[4].searchParam[11].type == "string"
assert (
inst.rest[0].resource[4].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-action"
)
assert (
inst.rest[0].resource[4].searchParam[12].documentation
== "Type of action performed during the event"
)
assert inst.rest[0].resource[4].searchParam[12].name == "action"
assert inst.rest[0].resource[4].searchParam[12].type == "token"
assert (
inst.rest[0].resource[4].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-participant"
)
assert (
inst.rest[0].resource[4].searchParam[13].documentation
== "Direct reference to resource"
)
assert inst.rest[0].resource[4].searchParam[13].name == "participant"
assert inst.rest[0].resource[4].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[4].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-policy"
)
assert (
inst.rest[0].resource[4].searchParam[14].documentation
== "Policy that authorized event"
)
assert inst.rest[0].resource[4].searchParam[14].name == "policy"
assert inst.rest[0].resource[4].searchParam[14].type == "uri"
assert (
inst.rest[0].resource[4].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-object-type"
)
assert (
inst.rest[0].resource[4].searchParam[15].documentation
== "Type of object involved"
)
assert inst.rest[0].resource[4].searchParam[15].name == "object-type"
assert inst.rest[0].resource[4].searchParam[15].type == "token"
assert (
inst.rest[0].resource[4].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/auditevent-user"
)
assert (
inst.rest[0].resource[4].searchParam[16].documentation
== "Unique identifier for the user"
)
assert inst.rest[0].resource[4].searchParam[16].name == "user"
assert inst.rest[0].resource[4].searchParam[16].type == "token"
assert inst.rest[0].resource[4].type == "AuditEvent"
assert inst.rest[0].resource[5].conditionalCreate == True
assert inst.rest[0].resource[5].conditionalDelete == "multiple"
assert inst.rest[0].resource[5].conditionalUpdate == True
assert inst.rest[0].resource[5].interaction[0].code == "read"
assert (
inst.rest[0].resource[5].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[1].code == "vread"
assert (
inst.rest[0].resource[5].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[2].code == "update"
assert (
inst.rest[0].resource[5].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[3].code == "delete"
assert (
inst.rest[0].resource[5].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[5].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[5].code == "validate"
assert (
inst.rest[0].resource[5].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[5].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[7].code == "create"
assert (
inst.rest[0].resource[5].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[5].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[5].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[5].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Basic"
)
assert inst.rest[0].resource[5].searchInclude[0] == "Basic.author"
assert inst.rest[0].resource[5].searchInclude[1] == "Basic.patient"
assert inst.rest[0].resource[5].searchInclude[2] == "Basic.subject"
assert (
inst.rest[0].resource[5].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/basic-author"
)
assert inst.rest[0].resource[5].searchParam[0].documentation == "Who created"
assert inst.rest[0].resource[5].searchParam[0].name == "author"
assert inst.rest[0].resource[5].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[5].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/basic-patient"
)
assert (
inst.rest[0].resource[5].searchParam[1].documentation
== "Identifies the focus of this resource"
)
assert inst.rest[0].resource[5].searchParam[1].name == "patient"
assert inst.rest[0].resource[5].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[5].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/basic-created"
)
assert inst.rest[0].resource[5].searchParam[2].documentation == "When created"
assert inst.rest[0].resource[5].searchParam[2].name == "created"
assert inst.rest[0].resource[5].searchParam[2].type == "date"
assert (
inst.rest[0].resource[5].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/basic-subject"
)
assert (
inst.rest[0].resource[5].searchParam[3].documentation
== "Identifies the focus of this resource"
)
assert inst.rest[0].resource[5].searchParam[3].name == "subject"
assert inst.rest[0].resource[5].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[5].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/basic-code"
)
assert inst.rest[0].resource[5].searchParam[4].documentation == "Kind of Resource"
assert inst.rest[0].resource[5].searchParam[4].name == "code"
assert inst.rest[0].resource[5].searchParam[4].type == "token"
assert (
inst.rest[0].resource[5].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/basic-identifier"
)
assert (
inst.rest[0].resource[5].searchParam[5].documentation == "Business identifier"
)
assert inst.rest[0].resource[5].searchParam[5].name == "identifier"
assert inst.rest[0].resource[5].searchParam[5].type == "token"
assert inst.rest[0].resource[5].type == "Basic"
assert inst.rest[0].resource[6].conditionalCreate == True
assert inst.rest[0].resource[6].conditionalDelete == "multiple"
assert inst.rest[0].resource[6].conditionalUpdate == True
assert inst.rest[0].resource[6].interaction[0].code == "read"
assert (
inst.rest[0].resource[6].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[1].code == "vread"
assert (
inst.rest[0].resource[6].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[2].code == "update"
assert (
inst.rest[0].resource[6].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[3].code == "delete"
assert (
inst.rest[0].resource[6].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[6].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[5].code == "validate"
assert (
inst.rest[0].resource[6].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[6].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[7].code == "create"
assert (
inst.rest[0].resource[6].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[6].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[6].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[6].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Binary"
)
assert (
inst.rest[0].resource[6].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/binary-contenttype"
)
assert (
inst.rest[0].resource[6].searchParam[0].documentation
== "MimeType of the binary content"
)
assert inst.rest[0].resource[6].searchParam[0].name == "contenttype"
assert inst.rest[0].resource[6].searchParam[0].type == "token"
assert inst.rest[0].resource[6].type == "Binary"
assert inst.rest[0].resource[7].conditionalCreate == True
assert inst.rest[0].resource[7].conditionalDelete == "multiple"
assert inst.rest[0].resource[7].conditionalUpdate == True
assert inst.rest[0].resource[7].interaction[0].code == "read"
assert (
inst.rest[0].resource[7].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[1].code == "vread"
assert (
inst.rest[0].resource[7].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[2].code == "update"
assert (
inst.rest[0].resource[7].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[3].code == "delete"
assert (
inst.rest[0].resource[7].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[7].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[5].code == "validate"
assert (
inst.rest[0].resource[7].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[7].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[7].code == "create"
assert (
inst.rest[0].resource[7].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[7].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[7].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[7].profile.reference
== "http://hl7.org/fhir/StructureDefinition/BodySite"
)
assert inst.rest[0].resource[7].searchInclude[0] == "BodySite.patient"
assert (
inst.rest[0].resource[7].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/bodysite-patient"
)
assert (
inst.rest[0].resource[7].searchParam[0].documentation
== "Patient to whom bodysite belongs"
)
assert inst.rest[0].resource[7].searchParam[0].name == "patient"
assert inst.rest[0].resource[7].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[7].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/bodysite-code"
)
assert (
inst.rest[0].resource[7].searchParam[1].documentation
== "Named anatomical location"
)
assert inst.rest[0].resource[7].searchParam[1].name == "code"
assert inst.rest[0].resource[7].searchParam[1].type == "token"
assert (
inst.rest[0].resource[7].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/bodysite-identifier"
)
assert (
inst.rest[0].resource[7].searchParam[2].documentation
== "Identifier for this instance of the anatomical location"
)
assert inst.rest[0].resource[7].searchParam[2].name == "identifier"
assert inst.rest[0].resource[7].searchParam[2].type == "token"
assert inst.rest[0].resource[7].type == "BodySite"
assert inst.rest[0].resource[8].conditionalCreate == True
assert inst.rest[0].resource[8].conditionalDelete == "multiple"
assert inst.rest[0].resource[8].conditionalUpdate == True
assert inst.rest[0].resource[8].interaction[0].code == "read"
assert (
inst.rest[0].resource[8].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[1].code == "vread"
assert (
inst.rest[0].resource[8].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[2].code == "update"
assert (
inst.rest[0].resource[8].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[3].code == "delete"
assert (
inst.rest[0].resource[8].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[8].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[5].code == "validate"
assert (
inst.rest[0].resource[8].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[8].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[7].code == "create"
assert (
inst.rest[0].resource[8].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[8].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[8].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[8].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Bundle"
)
assert inst.rest[0].resource[8].searchInclude[0] == "Bundle.message"
assert inst.rest[0].resource[8].searchInclude[1] == "Bundle.composition"
assert (
inst.rest[0].resource[8].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/bundle-message"
)
assert (
inst.rest[0].resource[8].searchParam[0].documentation
== 'The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents'
)
assert inst.rest[0].resource[8].searchParam[0].name == "message"
assert inst.rest[0].resource[8].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[8].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/bundle-composition"
)
assert (
inst.rest[0].resource[8].searchParam[1].documentation
== 'The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to searches its contents'
)
assert inst.rest[0].resource[8].searchParam[1].name == "composition"
assert inst.rest[0].resource[8].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[8].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/bundle-type"
)
assert (
inst.rest[0].resource[8].searchParam[2].documentation
== "document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection"
)
assert inst.rest[0].resource[8].searchParam[2].name == "type"
assert inst.rest[0].resource[8].searchParam[2].type == "token"
assert inst.rest[0].resource[8].type == "Bundle"
assert inst.rest[0].resource[9].conditionalCreate == True
assert inst.rest[0].resource[9].conditionalDelete == "multiple"
assert inst.rest[0].resource[9].conditionalUpdate == True
assert inst.rest[0].resource[9].interaction[0].code == "read"
assert (
inst.rest[0].resource[9].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[1].code == "vread"
assert (
inst.rest[0].resource[9].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[2].code == "update"
assert (
inst.rest[0].resource[9].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[3].code == "delete"
assert (
inst.rest[0].resource[9].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[9].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[5].code == "validate"
assert (
inst.rest[0].resource[9].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[9].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[7].code == "create"
assert (
inst.rest[0].resource[9].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[9].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[9].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[9].profile.reference
== "http://hl7.org/fhir/StructureDefinition/CarePlan"
)
assert inst.rest[0].resource[9].searchInclude[0] == "CarePlan.condition"
assert inst.rest[0].resource[9].searchInclude[1] == "CarePlan.subject"
assert inst.rest[0].resource[9].searchInclude[2] == "CarePlan.goal"
assert inst.rest[0].resource[9].searchInclude[3] == "CarePlan.patient"
assert inst.rest[0].resource[9].searchInclude[4] == "CarePlan.participant"
assert inst.rest[0].resource[9].searchInclude[5] == "CarePlan.performer"
assert inst.rest[0].resource[9].searchInclude[6] == "CarePlan.activityreference"
assert inst.rest[0].resource[9].searchInclude[7] == "CarePlan.relatedplan"
assert (
inst.rest[0].resource[9].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/careplan-activitycode"
)
assert (
inst.rest[0].resource[9].searchParam[0].documentation
== "Detail type of activity"
)
assert inst.rest[0].resource[9].searchParam[0].name == "activitycode"
assert inst.rest[0].resource[9].searchParam[0].type == "token"
assert (
inst.rest[0].resource[9].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/careplan-condition"
)
assert (
inst.rest[0].resource[9].searchParam[1].documentation
== "Health issues this plan addresses"
)
assert inst.rest[0].resource[9].searchParam[1].name == "condition"
assert inst.rest[0].resource[9].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/careplan-subject"
)
assert (
inst.rest[0].resource[9].searchParam[2].documentation == "Who care plan is for"
)
assert inst.rest[0].resource[9].searchParam[2].name == "subject"
assert inst.rest[0].resource[9].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/careplan-activitydate"
)
assert (
inst.rest[0].resource[9].searchParam[3].documentation
== "Specified date occurs within period specified by CarePlan.activity.timingSchedule"
)
assert inst.rest[0].resource[9].searchParam[3].name == "activitydate"
assert inst.rest[0].resource[9].searchParam[3].type == "date"
assert (
inst.rest[0].resource[9].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/careplan-date"
)
assert (
inst.rest[0].resource[9].searchParam[4].documentation
== "Time period plan covers"
)
assert inst.rest[0].resource[9].searchParam[4].name == "date"
assert inst.rest[0].resource[9].searchParam[4].type == "date"
assert (
inst.rest[0].resource[9].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/careplan-goal"
)
assert (
inst.rest[0].resource[9].searchParam[5].documentation
== "Desired outcome of plan"
)
assert inst.rest[0].resource[9].searchParam[5].name == "goal"
assert inst.rest[0].resource[9].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/careplan-related"
)
assert (
inst.rest[0].resource[9].searchParam[6].documentation
== "A combination of the type of relationship and the related plan"
)
assert inst.rest[0].resource[9].searchParam[6].name == "related"
assert inst.rest[0].resource[9].searchParam[6].type == "composite"
assert (
inst.rest[0].resource[9].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/careplan-relatedcode"
)
assert (
inst.rest[0].resource[9].searchParam[7].documentation
== "includes | replaces | fulfills"
)
assert inst.rest[0].resource[9].searchParam[7].name == "relatedcode"
assert inst.rest[0].resource[9].searchParam[7].type == "token"
assert (
inst.rest[0].resource[9].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/careplan-patient"
)
assert (
inst.rest[0].resource[9].searchParam[8].documentation == "Who care plan is for"
)
assert inst.rest[0].resource[9].searchParam[8].name == "patient"
assert inst.rest[0].resource[9].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/careplan-participant"
)
assert inst.rest[0].resource[9].searchParam[9].documentation == "Who is involved"
assert inst.rest[0].resource[9].searchParam[9].name == "participant"
assert inst.rest[0].resource[9].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/careplan-performer"
)
assert (
inst.rest[0].resource[9].searchParam[10].documentation
== 'Matches if the practitioner is listed as a performer in any of the "simple" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)'
)
assert inst.rest[0].resource[9].searchParam[10].name == "performer"
assert inst.rest[0].resource[9].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/careplan-activityreference"
)
assert (
inst.rest[0].resource[9].searchParam[11].documentation
== "Activity details defined in specific resource"
)
assert inst.rest[0].resource[9].searchParam[11].name == "activityreference"
assert inst.rest[0].resource[9].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/careplan-relatedplan"
)
assert (
inst.rest[0].resource[9].searchParam[12].documentation
== "Plan relationship exists with"
)
assert inst.rest[0].resource[9].searchParam[12].name == "relatedplan"
assert inst.rest[0].resource[9].searchParam[12].type == "reference"
assert inst.rest[0].resource[9].searchRevInclude[0] == "CarePlan.relatedplan"
assert inst.rest[0].resource[9].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[9].type == "CarePlan"
assert inst.rest[0].resource[10].conditionalCreate == True
assert inst.rest[0].resource[10].conditionalDelete == "multiple"
assert inst.rest[0].resource[10].conditionalUpdate == True
assert inst.rest[0].resource[10].interaction[0].code == "read"
assert (
inst.rest[0].resource[10].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[1].code == "vread"
assert (
inst.rest[0].resource[10].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[2].code == "update"
assert (
inst.rest[0].resource[10].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[3].code == "delete"
assert (
inst.rest[0].resource[10].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[10].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[5].code == "validate"
assert (
inst.rest[0].resource[10].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[10].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[7].code == "create"
assert (
inst.rest[0].resource[10].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[10].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[10].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[10].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Claim"
)
assert inst.rest[0].resource[10].searchInclude[0] == "Claim.patient"
assert inst.rest[0].resource[10].searchInclude[1] == "Claim.provider"
assert (
inst.rest[0].resource[10].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/claim-patient"
)
assert inst.rest[0].resource[10].searchParam[0].documentation == "Patient"
assert inst.rest[0].resource[10].searchParam[0].name == "patient"
assert inst.rest[0].resource[10].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/claim-priority"
)
assert (
inst.rest[0].resource[10].searchParam[1].documentation
== "Processing priority requested"
)
assert inst.rest[0].resource[10].searchParam[1].name == "priority"
assert inst.rest[0].resource[10].searchParam[1].type == "token"
assert (
inst.rest[0].resource[10].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/claim-use"
)
assert (
inst.rest[0].resource[10].searchParam[2].documentation
== "The kind of financial resource"
)
assert inst.rest[0].resource[10].searchParam[2].name == "use"
assert inst.rest[0].resource[10].searchParam[2].type == "token"
assert (
inst.rest[0].resource[10].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/claim-provider"
)
assert (
inst.rest[0].resource[10].searchParam[3].documentation
== "Provider responsible for the claim"
)
assert inst.rest[0].resource[10].searchParam[3].name == "provider"
assert inst.rest[0].resource[10].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/claim-identifier"
)
assert (
inst.rest[0].resource[10].searchParam[4].documentation
== "The primary identifier of the financial resource"
)
assert inst.rest[0].resource[10].searchParam[4].name == "identifier"
assert inst.rest[0].resource[10].searchParam[4].type == "token"
assert inst.rest[0].resource[10].type == "Claim"
assert inst.rest[0].resource[11].conditionalCreate == True
assert inst.rest[0].resource[11].conditionalDelete == "multiple"
assert inst.rest[0].resource[11].conditionalUpdate == True
assert inst.rest[0].resource[11].interaction[0].code == "read"
assert (
inst.rest[0].resource[11].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[1].code == "vread"
assert (
inst.rest[0].resource[11].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[2].code == "update"
assert (
inst.rest[0].resource[11].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[3].code == "delete"
assert (
inst.rest[0].resource[11].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[11].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[5].code == "validate"
assert (
inst.rest[0].resource[11].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[11].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[7].code == "create"
assert (
inst.rest[0].resource[11].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[11].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[11].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[11].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ClaimResponse"
)
assert (
inst.rest[0].resource[11].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/claimresponse-identifier"
)
assert (
inst.rest[0].resource[11].searchParam[0].documentation
== "The identity of the insurer"
)
assert inst.rest[0].resource[11].searchParam[0].name == "identifier"
assert inst.rest[0].resource[11].searchParam[0].type == "token"
assert inst.rest[0].resource[11].type == "ClaimResponse"
assert inst.rest[0].resource[12].conditionalCreate == True
assert inst.rest[0].resource[12].conditionalDelete == "multiple"
assert inst.rest[0].resource[12].conditionalUpdate == True
assert inst.rest[0].resource[12].interaction[0].code == "read"
assert (
inst.rest[0].resource[12].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[1].code == "vread"
assert (
inst.rest[0].resource[12].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[2].code == "update"
assert (
inst.rest[0].resource[12].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[3].code == "delete"
assert (
inst.rest[0].resource[12].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[12].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[5].code == "validate"
assert (
inst.rest[0].resource[12].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[12].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[7].code == "create"
assert (
inst.rest[0].resource[12].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[12].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[12].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[12].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ClinicalImpression"
)
assert inst.rest[0].resource[12].searchInclude[0] == "ClinicalImpression.assessor"
assert inst.rest[0].resource[12].searchInclude[1] == "ClinicalImpression.trigger"
assert inst.rest[0].resource[12].searchInclude[2] == "ClinicalImpression.patient"
assert inst.rest[0].resource[12].searchInclude[3] == "ClinicalImpression.plan"
assert inst.rest[0].resource[12].searchInclude[4] == "ClinicalImpression.previous"
assert inst.rest[0].resource[12].searchInclude[5] == "ClinicalImpression.action"
assert (
inst.rest[0].resource[12].searchInclude[6] == "ClinicalImpression.investigation"
)
assert inst.rest[0].resource[12].searchInclude[7] == "ClinicalImpression.problem"
assert (
inst.rest[0].resource[12].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-assessor"
)
assert (
inst.rest[0].resource[12].searchParam[0].documentation
== "The clinician performing the assessment"
)
assert inst.rest[0].resource[12].searchParam[0].name == "assessor"
assert inst.rest[0].resource[12].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-trigger"
)
assert (
inst.rest[0].resource[12].searchParam[1].documentation
== "Request or event that necessitated this assessment"
)
assert inst.rest[0].resource[12].searchParam[1].name == "trigger"
assert inst.rest[0].resource[12].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-patient"
)
assert (
inst.rest[0].resource[12].searchParam[2].documentation
== "The patient being assessed"
)
assert inst.rest[0].resource[12].searchParam[2].name == "patient"
assert inst.rest[0].resource[12].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-plan"
)
assert (
inst.rest[0].resource[12].searchParam[3].documentation
== "Plan of action after assessment"
)
assert inst.rest[0].resource[12].searchParam[3].name == "plan"
assert inst.rest[0].resource[12].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-resolved"
)
assert (
inst.rest[0].resource[12].searchParam[4].documentation
== "Diagnoses/conditions resolved since previous assessment"
)
assert inst.rest[0].resource[12].searchParam[4].name == "resolved"
assert inst.rest[0].resource[12].searchParam[4].type == "token"
assert (
inst.rest[0].resource[12].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-trigger-code"
)
assert (
inst.rest[0].resource[12].searchParam[5].documentation
== "Request or event that necessitated this assessment"
)
assert inst.rest[0].resource[12].searchParam[5].name == "trigger-code"
assert inst.rest[0].resource[12].searchParam[5].type == "token"
assert (
inst.rest[0].resource[12].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-previous"
)
assert (
inst.rest[0].resource[12].searchParam[6].documentation
== "Reference to last assessment"
)
assert inst.rest[0].resource[12].searchParam[6].name == "previous"
assert inst.rest[0].resource[12].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-status"
)
assert (
inst.rest[0].resource[12].searchParam[7].documentation
== "in-progress | completed | entered-in-error"
)
assert inst.rest[0].resource[12].searchParam[7].name == "status"
assert inst.rest[0].resource[12].searchParam[7].type == "token"
assert (
inst.rest[0].resource[12].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-action"
)
assert (
inst.rest[0].resource[12].searchParam[8].documentation
== "Actions taken during assessment"
)
assert inst.rest[0].resource[12].searchParam[8].name == "action"
assert inst.rest[0].resource[12].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-finding"
)
assert (
inst.rest[0].resource[12].searchParam[9].documentation
== "Specific text or code for finding"
)
assert inst.rest[0].resource[12].searchParam[9].name == "finding"
assert inst.rest[0].resource[12].searchParam[9].type == "token"
assert (
inst.rest[0].resource[12].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-investigation"
)
assert (
inst.rest[0].resource[12].searchParam[10].documentation
== "Record of a specific investigation"
)
assert inst.rest[0].resource[12].searchParam[10].name == "investigation"
assert inst.rest[0].resource[12].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-problem"
)
assert (
inst.rest[0].resource[12].searchParam[11].documentation
== "General assessment of patient state"
)
assert inst.rest[0].resource[12].searchParam[11].name == "problem"
assert inst.rest[0].resource[12].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-date"
)
assert (
inst.rest[0].resource[12].searchParam[12].documentation
== "When the assessment occurred"
)
assert inst.rest[0].resource[12].searchParam[12].name == "date"
assert inst.rest[0].resource[12].searchParam[12].type == "date"
assert (
inst.rest[0].resource[12].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/clinicalimpression-ruledout"
)
assert (
inst.rest[0].resource[12].searchParam[13].documentation
== "Specific text of code for diagnosis"
)
assert inst.rest[0].resource[12].searchParam[13].name == "ruledout"
assert inst.rest[0].resource[12].searchParam[13].type == "token"
assert (
inst.rest[0].resource[12].searchRevInclude[0] == "ClinicalImpression.previous"
)
assert inst.rest[0].resource[12].type == "ClinicalImpression"
assert inst.rest[0].resource[13].conditionalCreate == True
assert inst.rest[0].resource[13].conditionalDelete == "multiple"
assert inst.rest[0].resource[13].conditionalUpdate == True
assert inst.rest[0].resource[13].interaction[0].code == "read"
assert (
inst.rest[0].resource[13].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[1].code == "vread"
assert (
inst.rest[0].resource[13].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[2].code == "update"
assert (
inst.rest[0].resource[13].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[3].code == "delete"
assert (
inst.rest[0].resource[13].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[13].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[5].code == "validate"
assert (
inst.rest[0].resource[13].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[13].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[7].code == "create"
assert (
inst.rest[0].resource[13].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[13].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[13].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[13].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Communication"
)
assert inst.rest[0].resource[13].searchInclude[0] == "Communication.sender"
assert inst.rest[0].resource[13].searchInclude[1] == "Communication.patient"
assert inst.rest[0].resource[13].searchInclude[2] == "Communication.subject"
assert inst.rest[0].resource[13].searchInclude[3] == "Communication.request"
assert inst.rest[0].resource[13].searchInclude[4] == "Communication.encounter"
assert inst.rest[0].resource[13].searchInclude[5] == "Communication.recipient"
assert (
inst.rest[0].resource[13].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/communication-sender"
)
assert inst.rest[0].resource[13].searchParam[0].documentation == "Message sender"
assert inst.rest[0].resource[13].searchParam[0].name == "sender"
assert inst.rest[0].resource[13].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/communication-sent"
)
assert inst.rest[0].resource[13].searchParam[1].documentation == "When sent"
assert inst.rest[0].resource[13].searchParam[1].name == "sent"
assert inst.rest[0].resource[13].searchParam[1].type == "date"
assert (
inst.rest[0].resource[13].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/communication-category"
)
assert inst.rest[0].resource[13].searchParam[2].documentation == "Message category"
assert inst.rest[0].resource[13].searchParam[2].name == "category"
assert inst.rest[0].resource[13].searchParam[2].type == "token"
assert (
inst.rest[0].resource[13].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/communication-patient"
)
assert inst.rest[0].resource[13].searchParam[3].documentation == "Focus of message"
assert inst.rest[0].resource[13].searchParam[3].name == "patient"
assert inst.rest[0].resource[13].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/communication-status"
)
assert (
inst.rest[0].resource[13].searchParam[4].documentation
== "in-progress | completed | suspended | rejected | failed"
)
assert inst.rest[0].resource[13].searchParam[4].name == "status"
assert inst.rest[0].resource[13].searchParam[4].type == "token"
assert (
inst.rest[0].resource[13].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/communication-subject"
)
assert inst.rest[0].resource[13].searchParam[5].documentation == "Focus of message"
assert inst.rest[0].resource[13].searchParam[5].name == "subject"
assert inst.rest[0].resource[13].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/communication-request"
)
assert (
inst.rest[0].resource[13].searchParam[6].documentation
== "CommunicationRequest producing this message"
)
assert inst.rest[0].resource[13].searchParam[6].name == "request"
assert inst.rest[0].resource[13].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/communication-received"
)
assert inst.rest[0].resource[13].searchParam[7].documentation == "When received"
assert inst.rest[0].resource[13].searchParam[7].name == "received"
assert inst.rest[0].resource[13].searchParam[7].type == "date"
assert (
inst.rest[0].resource[13].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/communication-encounter"
)
assert (
inst.rest[0].resource[13].searchParam[8].documentation
== "Encounter leading to message"
)
assert inst.rest[0].resource[13].searchParam[8].name == "encounter"
assert inst.rest[0].resource[13].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/communication-identifier"
)
assert inst.rest[0].resource[13].searchParam[9].documentation == "Unique identifier"
assert inst.rest[0].resource[13].searchParam[9].name == "identifier"
assert inst.rest[0].resource[13].searchParam[9].type == "token"
assert (
inst.rest[0].resource[13].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/communication-medium"
)
assert (
inst.rest[0].resource[13].searchParam[10].documentation
== "A channel of communication"
)
assert inst.rest[0].resource[13].searchParam[10].name == "medium"
assert inst.rest[0].resource[13].searchParam[10].type == "token"
assert (
inst.rest[0].resource[13].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/communication-recipient"
)
assert (
inst.rest[0].resource[13].searchParam[11].documentation == "Message recipient"
)
assert inst.rest[0].resource[13].searchParam[11].name == "recipient"
assert inst.rest[0].resource[13].searchParam[11].type == "reference"
assert inst.rest[0].resource[13].type == "Communication"
assert inst.rest[0].resource[14].conditionalCreate == True
assert inst.rest[0].resource[14].conditionalDelete == "multiple"
assert inst.rest[0].resource[14].conditionalUpdate == True
assert inst.rest[0].resource[14].interaction[0].code == "read"
assert (
inst.rest[0].resource[14].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[1].code == "vread"
assert (
inst.rest[0].resource[14].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[2].code == "update"
assert (
inst.rest[0].resource[14].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[3].code == "delete"
assert (
inst.rest[0].resource[14].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[14].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[5].code == "validate"
assert (
inst.rest[0].resource[14].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[14].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[7].code == "create"
assert (
inst.rest[0].resource[14].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[14].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[14].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[14].profile.reference
== "http://hl7.org/fhir/StructureDefinition/CommunicationRequest"
)
assert inst.rest[0].resource[14].searchInclude[0] == "CommunicationRequest.sender"
assert (
inst.rest[0].resource[14].searchInclude[1] == "CommunicationRequest.requester"
)
assert inst.rest[0].resource[14].searchInclude[2] == "CommunicationRequest.patient"
assert inst.rest[0].resource[14].searchInclude[3] == "CommunicationRequest.subject"
assert (
inst.rest[0].resource[14].searchInclude[4] == "CommunicationRequest.encounter"
)
assert (
inst.rest[0].resource[14].searchInclude[5] == "CommunicationRequest.recipient"
)
assert (
inst.rest[0].resource[14].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-sender"
)
assert inst.rest[0].resource[14].searchParam[0].documentation == "Message sender"
assert inst.rest[0].resource[14].searchParam[0].name == "sender"
assert inst.rest[0].resource[14].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[14].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-requested"
)
assert (
inst.rest[0].resource[14].searchParam[1].documentation
== "When ordered or proposed"
)
assert inst.rest[0].resource[14].searchParam[1].name == "requested"
assert inst.rest[0].resource[14].searchParam[1].type == "date"
assert (
inst.rest[0].resource[14].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-time"
)
assert inst.rest[0].resource[14].searchParam[2].documentation == "When scheduled"
assert inst.rest[0].resource[14].searchParam[2].name == "time"
assert inst.rest[0].resource[14].searchParam[2].type == "date"
assert (
inst.rest[0].resource[14].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-requester"
)
assert (
inst.rest[0].resource[14].searchParam[3].documentation
== "An individual who requested a communication"
)
assert inst.rest[0].resource[14].searchParam[3].name == "requester"
assert inst.rest[0].resource[14].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[14].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-category"
)
assert inst.rest[0].resource[14].searchParam[4].documentation == "Message category"
assert inst.rest[0].resource[14].searchParam[4].name == "category"
assert inst.rest[0].resource[14].searchParam[4].type == "token"
assert (
inst.rest[0].resource[14].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-patient"
)
assert inst.rest[0].resource[14].searchParam[5].documentation == "Focus of message"
assert inst.rest[0].resource[14].searchParam[5].name == "patient"
assert inst.rest[0].resource[14].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[14].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-status"
)
assert (
inst.rest[0].resource[14].searchParam[6].documentation
== "proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed"
)
assert inst.rest[0].resource[14].searchParam[6].name == "status"
assert inst.rest[0].resource[14].searchParam[6].type == "token"
assert (
inst.rest[0].resource[14].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-priority"
)
assert inst.rest[0].resource[14].searchParam[7].documentation == "Message urgency"
assert inst.rest[0].resource[14].searchParam[7].name == "priority"
assert inst.rest[0].resource[14].searchParam[7].type == "token"
assert (
inst.rest[0].resource[14].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-subject"
)
assert inst.rest[0].resource[14].searchParam[8].documentation == "Focus of message"
assert inst.rest[0].resource[14].searchParam[8].name == "subject"
assert inst.rest[0].resource[14].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[14].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-encounter"
)
assert (
inst.rest[0].resource[14].searchParam[9].documentation
== "Encounter leading to message"
)
assert inst.rest[0].resource[14].searchParam[9].name == "encounter"
assert inst.rest[0].resource[14].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[14].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-identifier"
)
assert (
inst.rest[0].resource[14].searchParam[10].documentation == "Unique identifier"
)
assert inst.rest[0].resource[14].searchParam[10].name == "identifier"
assert inst.rest[0].resource[14].searchParam[10].type == "token"
assert (
inst.rest[0].resource[14].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-medium"
)
assert (
inst.rest[0].resource[14].searchParam[11].documentation
== "A channel of communication"
)
assert inst.rest[0].resource[14].searchParam[11].name == "medium"
assert inst.rest[0].resource[14].searchParam[11].type == "token"
assert (
inst.rest[0].resource[14].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/communicationrequest-recipient"
)
assert (
inst.rest[0].resource[14].searchParam[12].documentation == "Message recipient"
)
assert inst.rest[0].resource[14].searchParam[12].name == "recipient"
assert inst.rest[0].resource[14].searchParam[12].type == "reference"
assert inst.rest[0].resource[14].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[14].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[14].searchRevInclude[2] == "Communication.request"
assert inst.rest[0].resource[14].type == "CommunicationRequest"
assert inst.rest[0].resource[15].conditionalCreate == True
assert inst.rest[0].resource[15].conditionalDelete == "multiple"
assert inst.rest[0].resource[15].conditionalUpdate == True
assert inst.rest[0].resource[15].interaction[0].code == "read"
assert (
inst.rest[0].resource[15].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[1].code == "vread"
assert (
inst.rest[0].resource[15].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[2].code == "update"
assert (
inst.rest[0].resource[15].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[3].code == "delete"
assert (
inst.rest[0].resource[15].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[15].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[5].code == "validate"
assert (
inst.rest[0].resource[15].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[15].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[7].code == "create"
assert (
inst.rest[0].resource[15].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[15].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[15].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[15].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Composition"
)
assert inst.rest[0].resource[15].searchInclude[0] == "Composition.subject"
assert inst.rest[0].resource[15].searchInclude[1] == "Composition.encounter"
assert inst.rest[0].resource[15].searchInclude[2] == "Composition.author"
assert inst.rest[0].resource[15].searchInclude[3] == "Composition.patient"
assert inst.rest[0].resource[15].searchInclude[4] == "Composition.attester"
assert inst.rest[0].resource[15].searchInclude[5] == "Composition.entry"
assert (
inst.rest[0].resource[15].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/composition-status"
)
assert (
inst.rest[0].resource[15].searchParam[0].documentation
== "preliminary | final | amended | entered-in-error"
)
assert inst.rest[0].resource[15].searchParam[0].name == "status"
assert inst.rest[0].resource[15].searchParam[0].type == "token"
assert (
inst.rest[0].resource[15].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/composition-subject"
)
assert (
inst.rest[0].resource[15].searchParam[1].documentation
== "Who and/or what the composition is about"
)
assert inst.rest[0].resource[15].searchParam[1].name == "subject"
assert inst.rest[0].resource[15].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/composition-class"
)
assert (
inst.rest[0].resource[15].searchParam[2].documentation
== "Categorization of Composition"
)
assert inst.rest[0].resource[15].searchParam[2].name == "class"
assert inst.rest[0].resource[15].searchParam[2].type == "token"
assert (
inst.rest[0].resource[15].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/composition-encounter"
)
assert (
inst.rest[0].resource[15].searchParam[3].documentation
== "Context of the Composition"
)
assert inst.rest[0].resource[15].searchParam[3].name == "encounter"
assert inst.rest[0].resource[15].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/composition-period"
)
assert (
inst.rest[0].resource[15].searchParam[4].documentation
== "The period covered by the documentation"
)
assert inst.rest[0].resource[15].searchParam[4].name == "period"
assert inst.rest[0].resource[15].searchParam[4].type == "date"
assert (
inst.rest[0].resource[15].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/composition-type"
)
assert (
inst.rest[0].resource[15].searchParam[5].documentation
== "Kind of composition (LOINC if possible)"
)
assert inst.rest[0].resource[15].searchParam[5].name == "type"
assert inst.rest[0].resource[15].searchParam[5].type == "token"
assert (
inst.rest[0].resource[15].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/composition-date"
)
assert (
inst.rest[0].resource[15].searchParam[6].documentation
== "Composition editing time"
)
assert inst.rest[0].resource[15].searchParam[6].name == "date"
assert inst.rest[0].resource[15].searchParam[6].type == "date"
assert (
inst.rest[0].resource[15].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/composition-section"
)
assert (
inst.rest[0].resource[15].searchParam[7].documentation
== "Classification of section (recommended)"
)
assert inst.rest[0].resource[15].searchParam[7].name == "section"
assert inst.rest[0].resource[15].searchParam[7].type == "token"
assert (
inst.rest[0].resource[15].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/composition-author"
)
assert (
inst.rest[0].resource[15].searchParam[8].documentation
== "Who and/or what authored the composition"
)
assert inst.rest[0].resource[15].searchParam[8].name == "author"
assert inst.rest[0].resource[15].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/composition-title"
)
assert (
inst.rest[0].resource[15].searchParam[9].documentation
== "Human Readable name/title"
)
assert inst.rest[0].resource[15].searchParam[9].name == "title"
assert inst.rest[0].resource[15].searchParam[9].type == "string"
assert (
inst.rest[0].resource[15].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/composition-patient"
)
assert (
inst.rest[0].resource[15].searchParam[10].documentation
== "Who and/or what the composition is about"
)
assert inst.rest[0].resource[15].searchParam[10].name == "patient"
assert inst.rest[0].resource[15].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/composition-confidentiality"
)
assert (
inst.rest[0].resource[15].searchParam[11].documentation
== "As defined by affinity domain"
)
assert inst.rest[0].resource[15].searchParam[11].name == "confidentiality"
assert inst.rest[0].resource[15].searchParam[11].type == "token"
assert (
inst.rest[0].resource[15].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/composition-attester"
)
assert (
inst.rest[0].resource[15].searchParam[12].documentation
== "Who attested the composition"
)
assert inst.rest[0].resource[15].searchParam[12].name == "attester"
assert inst.rest[0].resource[15].searchParam[12].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/composition-entry"
)
assert (
inst.rest[0].resource[15].searchParam[13].documentation
== "A reference to data that supports this section"
)
assert inst.rest[0].resource[15].searchParam[13].name == "entry"
assert inst.rest[0].resource[15].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/composition-context"
)
assert (
inst.rest[0].resource[15].searchParam[14].documentation
== "Code(s) that apply to the event being documented"
)
assert inst.rest[0].resource[15].searchParam[14].name == "context"
assert inst.rest[0].resource[15].searchParam[14].type == "token"
assert (
inst.rest[0].resource[15].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/composition-identifier"
)
assert (
inst.rest[0].resource[15].searchParam[15].documentation
== "Logical identifier of composition (version-independent)"
)
assert inst.rest[0].resource[15].searchParam[15].name == "identifier"
assert inst.rest[0].resource[15].searchParam[15].type == "token"
assert inst.rest[0].resource[15].type == "Composition"
assert inst.rest[0].resource[16].conditionalCreate == True
assert inst.rest[0].resource[16].conditionalDelete == "multiple"
assert inst.rest[0].resource[16].conditionalUpdate == True
assert inst.rest[0].resource[16].interaction[0].code == "read"
assert (
inst.rest[0].resource[16].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[1].code == "vread"
assert (
inst.rest[0].resource[16].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[2].code == "update"
assert (
inst.rest[0].resource[16].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[3].code == "delete"
assert (
inst.rest[0].resource[16].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[16].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[5].code == "validate"
assert (
inst.rest[0].resource[16].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[16].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[7].code == "create"
assert (
inst.rest[0].resource[16].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[16].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[16].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[16].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ConceptMap"
)
assert inst.rest[0].resource[16].searchInclude[0] == "ConceptMap.sourceuri"
assert inst.rest[0].resource[16].searchInclude[1] == "ConceptMap.source"
assert inst.rest[0].resource[16].searchInclude[2] == "ConceptMap.target"
assert (
inst.rest[0].resource[16].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-dependson"
)
assert (
inst.rest[0].resource[16].searchParam[0].documentation
== "Reference to element/field/ValueSet mapping depends on"
)
assert inst.rest[0].resource[16].searchParam[0].name == "dependson"
assert inst.rest[0].resource[16].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[16].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-status"
)
assert (
inst.rest[0].resource[16].searchParam[1].documentation
== "Status of the concept map"
)
assert inst.rest[0].resource[16].searchParam[1].name == "status"
assert inst.rest[0].resource[16].searchParam[1].type == "token"
assert (
inst.rest[0].resource[16].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-date"
)
assert (
inst.rest[0].resource[16].searchParam[2].documentation
== "The concept map publication date"
)
assert inst.rest[0].resource[16].searchParam[2].name == "date"
assert inst.rest[0].resource[16].searchParam[2].type == "date"
assert (
inst.rest[0].resource[16].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-url"
)
assert (
inst.rest[0].resource[16].searchParam[3].documentation
== "The URL of the concept map"
)
assert inst.rest[0].resource[16].searchParam[3].name == "url"
assert inst.rest[0].resource[16].searchParam[3].type == "uri"
assert (
inst.rest[0].resource[16].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-targetsystem"
)
assert (
inst.rest[0].resource[16].searchParam[4].documentation
== "System of the target (if necessary)"
)
assert inst.rest[0].resource[16].searchParam[4].name == "targetsystem"
assert inst.rest[0].resource[16].searchParam[4].type == "uri"
assert (
inst.rest[0].resource[16].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-version"
)
assert (
inst.rest[0].resource[16].searchParam[5].documentation
== "The version identifier of the concept map"
)
assert inst.rest[0].resource[16].searchParam[5].name == "version"
assert inst.rest[0].resource[16].searchParam[5].type == "token"
assert (
inst.rest[0].resource[16].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-publisher"
)
assert (
inst.rest[0].resource[16].searchParam[6].documentation
== "Name of the publisher of the concept map"
)
assert inst.rest[0].resource[16].searchParam[6].name == "publisher"
assert inst.rest[0].resource[16].searchParam[6].type == "string"
assert (
inst.rest[0].resource[16].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-product"
)
assert (
inst.rest[0].resource[16].searchParam[7].documentation
== "Reference to element/field/ValueSet mapping depends on"
)
assert inst.rest[0].resource[16].searchParam[7].name == "product"
assert inst.rest[0].resource[16].searchParam[7].type == "uri"
assert (
inst.rest[0].resource[16].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-sourcecode"
)
assert (
inst.rest[0].resource[16].searchParam[8].documentation
== "Identifies element being mapped"
)
assert inst.rest[0].resource[16].searchParam[8].name == "sourcecode"
assert inst.rest[0].resource[16].searchParam[8].type == "token"
assert (
inst.rest[0].resource[16].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-sourceuri"
)
assert (
inst.rest[0].resource[16].searchParam[9].documentation
== "Identifies the source of the concepts which are being mapped"
)
assert inst.rest[0].resource[16].searchParam[9].name == "sourceuri"
assert inst.rest[0].resource[16].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[16].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-source"
)
assert (
inst.rest[0].resource[16].searchParam[10].documentation
== "Identifies the source of the concepts which are being mapped"
)
assert inst.rest[0].resource[16].searchParam[10].name == "source"
assert inst.rest[0].resource[16].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[16].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-description"
)
assert (
inst.rest[0].resource[16].searchParam[11].documentation
== "Text search in the description of the concept map"
)
assert inst.rest[0].resource[16].searchParam[11].name == "description"
assert inst.rest[0].resource[16].searchParam[11].type == "string"
assert (
inst.rest[0].resource[16].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-name"
)
assert (
inst.rest[0].resource[16].searchParam[12].documentation
== "Name of the concept map"
)
assert inst.rest[0].resource[16].searchParam[12].name == "name"
assert inst.rest[0].resource[16].searchParam[12].type == "string"
assert (
inst.rest[0].resource[16].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-context"
)
assert (
inst.rest[0].resource[16].searchParam[13].documentation
== "A use context assigned to the concept map"
)
assert inst.rest[0].resource[16].searchParam[13].name == "context"
assert inst.rest[0].resource[16].searchParam[13].type == "token"
assert (
inst.rest[0].resource[16].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-target"
)
assert (
inst.rest[0].resource[16].searchParam[14].documentation
== "Provides context to the mappings"
)
assert inst.rest[0].resource[16].searchParam[14].name == "target"
assert inst.rest[0].resource[16].searchParam[14].type == "reference"
assert (
inst.rest[0].resource[16].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-targetcode"
)
assert (
inst.rest[0].resource[16].searchParam[15].documentation
== "Code that identifies the target element"
)
assert inst.rest[0].resource[16].searchParam[15].name == "targetcode"
assert inst.rest[0].resource[16].searchParam[15].type == "token"
assert (
inst.rest[0].resource[16].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-identifier"
)
assert (
inst.rest[0].resource[16].searchParam[16].documentation
== "Additional identifier for the concept map"
)
assert inst.rest[0].resource[16].searchParam[16].name == "identifier"
assert inst.rest[0].resource[16].searchParam[16].type == "token"
assert (
inst.rest[0].resource[16].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/conceptmap-sourcesystem"
)
assert (
inst.rest[0].resource[16].searchParam[17].documentation
== "Code System (if value set crosses code systems)"
)
assert inst.rest[0].resource[16].searchParam[17].name == "sourcesystem"
assert inst.rest[0].resource[16].searchParam[17].type == "uri"
assert inst.rest[0].resource[16].type == "ConceptMap"
assert inst.rest[0].resource[17].conditionalCreate == True
assert inst.rest[0].resource[17].conditionalDelete == "multiple"
assert inst.rest[0].resource[17].conditionalUpdate == True
assert inst.rest[0].resource[17].interaction[0].code == "read"
assert (
inst.rest[0].resource[17].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[1].code == "vread"
assert (
inst.rest[0].resource[17].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[2].code == "update"
assert (
inst.rest[0].resource[17].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[3].code == "delete"
assert (
inst.rest[0].resource[17].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[17].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[5].code == "validate"
assert (
inst.rest[0].resource[17].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[17].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[7].code == "create"
assert (
inst.rest[0].resource[17].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[17].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[17].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[17].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Condition"
)
assert inst.rest[0].resource[17].searchInclude[0] == "Condition.asserter"
assert inst.rest[0].resource[17].searchInclude[1] == "Condition.encounter"
assert inst.rest[0].resource[17].searchInclude[2] == "Condition.patient"
assert (
inst.rest[0].resource[17].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/condition-date-recorded"
)
assert (
inst.rest[0].resource[17].searchParam[0].documentation
== "A date, when the Condition statement was documented"
)
assert inst.rest[0].resource[17].searchParam[0].name == "date-recorded"
assert inst.rest[0].resource[17].searchParam[0].type == "date"
assert (
inst.rest[0].resource[17].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/condition-asserter"
)
assert (
inst.rest[0].resource[17].searchParam[1].documentation
== "Person who asserts this condition"
)
assert inst.rest[0].resource[17].searchParam[1].name == "asserter"
assert inst.rest[0].resource[17].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[17].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/condition-onset"
)
assert (
inst.rest[0].resource[17].searchParam[2].documentation
== "Date related onsets (dateTime and Period)"
)
assert inst.rest[0].resource[17].searchParam[2].name == "onset"
assert inst.rest[0].resource[17].searchParam[2].type == "date"
assert (
inst.rest[0].resource[17].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/condition-evidence"
)
assert (
inst.rest[0].resource[17].searchParam[3].documentation
== "Manifestation/symptom"
)
assert inst.rest[0].resource[17].searchParam[3].name == "evidence"
assert inst.rest[0].resource[17].searchParam[3].type == "token"
assert (
inst.rest[0].resource[17].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/condition-body-site"
)
assert (
inst.rest[0].resource[17].searchParam[4].documentation
== "Anatomical location, if relevant"
)
assert inst.rest[0].resource[17].searchParam[4].name == "body-site"
assert inst.rest[0].resource[17].searchParam[4].type == "token"
assert (
inst.rest[0].resource[17].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/condition-onset-info"
)
assert (
inst.rest[0].resource[17].searchParam[5].documentation
== "Other onsets (boolean, age, range, string)"
)
assert inst.rest[0].resource[17].searchParam[5].name == "onset-info"
assert inst.rest[0].resource[17].searchParam[5].type == "string"
assert (
inst.rest[0].resource[17].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/condition-severity"
)
assert (
inst.rest[0].resource[17].searchParam[6].documentation
== "The severity of the condition"
)
assert inst.rest[0].resource[17].searchParam[6].name == "severity"
assert inst.rest[0].resource[17].searchParam[6].type == "token"
assert (
inst.rest[0].resource[17].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/condition-code"
)
assert (
inst.rest[0].resource[17].searchParam[7].documentation
== "Code for the condition"
)
assert inst.rest[0].resource[17].searchParam[7].name == "code"
assert inst.rest[0].resource[17].searchParam[7].type == "token"
assert (
inst.rest[0].resource[17].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/condition-encounter"
)
assert (
inst.rest[0].resource[17].searchParam[8].documentation
== "Encounter when condition first asserted"
)
assert inst.rest[0].resource[17].searchParam[8].name == "encounter"
assert inst.rest[0].resource[17].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[17].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/condition-stage"
)
assert (
inst.rest[0].resource[17].searchParam[9].documentation
== "Simple summary (disease specific)"
)
assert inst.rest[0].resource[17].searchParam[9].name == "stage"
assert inst.rest[0].resource[17].searchParam[9].type == "token"
assert (
inst.rest[0].resource[17].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/condition-category"
)
assert (
inst.rest[0].resource[17].searchParam[10].documentation
== "The category of the condition"
)
assert inst.rest[0].resource[17].searchParam[10].name == "category"
assert inst.rest[0].resource[17].searchParam[10].type == "token"
assert (
inst.rest[0].resource[17].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/condition-patient"
)
assert (
inst.rest[0].resource[17].searchParam[11].documentation
== "Who has the condition?"
)
assert inst.rest[0].resource[17].searchParam[11].name == "patient"
assert inst.rest[0].resource[17].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[17].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/condition-clinicalstatus"
)
assert (
inst.rest[0].resource[17].searchParam[12].documentation
== "The clinical status of the condition"
)
assert inst.rest[0].resource[17].searchParam[12].name == "clinicalstatus"
assert inst.rest[0].resource[17].searchParam[12].type == "token"
assert (
inst.rest[0].resource[17].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/condition-identifier"
)
assert (
inst.rest[0].resource[17].searchParam[13].documentation
== "A unique identifier of the condition record"
)
assert inst.rest[0].resource[17].searchParam[13].name == "identifier"
assert inst.rest[0].resource[17].searchParam[13].type == "token"
assert inst.rest[0].resource[17].searchRevInclude[0] == "CarePlan.condition"
assert inst.rest[0].resource[17].searchRevInclude[1] == "ClinicalImpression.problem"
assert inst.rest[0].resource[17].searchRevInclude[2] == "Encounter.condition"
assert inst.rest[0].resource[17].searchRevInclude[3] == "Encounter.indication"
assert inst.rest[0].resource[17].searchRevInclude[4] == "Encounter.procedure"
assert inst.rest[0].resource[17].searchRevInclude[5] == "EpisodeOfCare.condition"
assert inst.rest[0].resource[17].searchRevInclude[6] == "RiskAssessment.condition"
assert inst.rest[0].resource[17].type == "Condition"
assert inst.rest[0].resource[18].conditionalCreate == True
assert inst.rest[0].resource[18].conditionalDelete == "multiple"
assert inst.rest[0].resource[18].conditionalUpdate == True
assert inst.rest[0].resource[18].interaction[0].code == "read"
assert (
inst.rest[0].resource[18].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[1].code == "vread"
assert (
inst.rest[0].resource[18].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[2].code == "update"
assert (
inst.rest[0].resource[18].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[3].code == "delete"
assert (
inst.rest[0].resource[18].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[18].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[5].code == "validate"
assert (
inst.rest[0].resource[18].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[18].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[7].code == "create"
assert (
inst.rest[0].resource[18].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[18].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[18].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[18].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Conformance"
)
assert inst.rest[0].resource[18].searchInclude[0] == "Conformance.supported-profile"
assert inst.rest[0].resource[18].searchInclude[1] == "Conformance.profile"
assert (
inst.rest[0].resource[18].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/conformance-status"
)
assert (
inst.rest[0].resource[18].searchParam[0].documentation
== "The current status of the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[0].name == "status"
assert inst.rest[0].resource[18].searchParam[0].type == "token"
assert (
inst.rest[0].resource[18].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/conformance-resource"
)
assert (
inst.rest[0].resource[18].searchParam[1].documentation
== "Name of a resource mentioned in a conformance statement"
)
assert inst.rest[0].resource[18].searchParam[1].name == "resource"
assert inst.rest[0].resource[18].searchParam[1].type == "token"
assert (
inst.rest[0].resource[18].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/conformance-security"
)
assert (
inst.rest[0].resource[18].searchParam[2].documentation
== "OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates"
)
assert inst.rest[0].resource[18].searchParam[2].name == "security"
assert inst.rest[0].resource[18].searchParam[2].type == "token"
assert (
inst.rest[0].resource[18].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/conformance-format"
)
assert (
inst.rest[0].resource[18].searchParam[3].documentation
== "formats supported (xml | json | mime type)"
)
assert inst.rest[0].resource[18].searchParam[3].name == "format"
assert inst.rest[0].resource[18].searchParam[3].type == "token"
assert (
inst.rest[0].resource[18].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/conformance-date"
)
assert (
inst.rest[0].resource[18].searchParam[4].documentation
== "The conformance statement publication date"
)
assert inst.rest[0].resource[18].searchParam[4].name == "date"
assert inst.rest[0].resource[18].searchParam[4].type == "date"
assert (
inst.rest[0].resource[18].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/conformance-url"
)
assert (
inst.rest[0].resource[18].searchParam[5].documentation
== "The uri that identifies the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[5].name == "url"
assert inst.rest[0].resource[18].searchParam[5].type == "uri"
assert (
inst.rest[0].resource[18].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/conformance-version"
)
assert (
inst.rest[0].resource[18].searchParam[6].documentation
== "The version identifier of the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[6].name == "version"
assert inst.rest[0].resource[18].searchParam[6].type == "token"
assert (
inst.rest[0].resource[18].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/conformance-publisher"
)
assert (
inst.rest[0].resource[18].searchParam[7].documentation
== "Name of the publisher of the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[7].name == "publisher"
assert inst.rest[0].resource[18].searchParam[7].type == "string"
assert (
inst.rest[0].resource[18].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/conformance-mode"
)
assert (
inst.rest[0].resource[18].searchParam[8].documentation
== "Mode - restful (server/client) or messaging (sender/receiver)"
)
assert inst.rest[0].resource[18].searchParam[8].name == "mode"
assert inst.rest[0].resource[18].searchParam[8].type == "token"
assert (
inst.rest[0].resource[18].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/conformance-software"
)
assert (
inst.rest[0].resource[18].searchParam[9].documentation
== "Part of a the name of a software application"
)
assert inst.rest[0].resource[18].searchParam[9].name == "software"
assert inst.rest[0].resource[18].searchParam[9].type == "string"
assert (
inst.rest[0].resource[18].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/conformance-description"
)
assert (
inst.rest[0].resource[18].searchParam[10].documentation
== "Text search in the description of the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[10].name == "description"
assert inst.rest[0].resource[18].searchParam[10].type == "string"
assert (
inst.rest[0].resource[18].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/conformance-event"
)
assert (
inst.rest[0].resource[18].searchParam[11].documentation
== "Event code in a conformance statement"
)
assert inst.rest[0].resource[18].searchParam[11].name == "event"
assert inst.rest[0].resource[18].searchParam[11].type == "token"
assert (
inst.rest[0].resource[18].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/conformance-name"
)
assert (
inst.rest[0].resource[18].searchParam[12].documentation
== "Name of the conformance statement"
)
assert inst.rest[0].resource[18].searchParam[12].name == "name"
assert inst.rest[0].resource[18].searchParam[12].type == "string"
assert (
inst.rest[0].resource[18].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/conformance-supported-profile"
)
assert (
inst.rest[0].resource[18].searchParam[13].documentation
== "Profiles for use cases supported"
)
assert inst.rest[0].resource[18].searchParam[13].name == "supported-profile"
assert inst.rest[0].resource[18].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[18].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/conformance-fhirversion"
)
assert (
inst.rest[0].resource[18].searchParam[14].documentation == "The version of FHIR"
)
assert inst.rest[0].resource[18].searchParam[14].name == "fhirversion"
assert inst.rest[0].resource[18].searchParam[14].type == "token"
assert (
inst.rest[0].resource[18].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/conformance-profile"
)
assert (
inst.rest[0].resource[18].searchParam[15].documentation
== "A profile id invoked in a conformance statement"
)
assert inst.rest[0].resource[18].searchParam[15].name == "profile"
assert inst.rest[0].resource[18].searchParam[15].type == "reference"
assert inst.rest[0].resource[18].type == "Conformance"
assert inst.rest[0].resource[19].conditionalCreate == True
assert inst.rest[0].resource[19].conditionalDelete == "multiple"
assert inst.rest[0].resource[19].conditionalUpdate == True
assert inst.rest[0].resource[19].interaction[0].code == "read"
assert (
inst.rest[0].resource[19].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[1].code == "vread"
assert (
inst.rest[0].resource[19].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[2].code == "update"
assert (
inst.rest[0].resource[19].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[3].code == "delete"
assert (
inst.rest[0].resource[19].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[19].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[5].code == "validate"
assert (
inst.rest[0].resource[19].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[19].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[7].code == "create"
assert (
inst.rest[0].resource[19].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[19].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[19].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[19].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Contract"
)
assert inst.rest[0].resource[19].searchInclude[0] == "Contract.signer"
assert inst.rest[0].resource[19].searchInclude[1] == "Contract.patient"
assert inst.rest[0].resource[19].searchInclude[2] == "Contract.subject"
assert inst.rest[0].resource[19].searchInclude[3] == "Contract.actor"
assert (
inst.rest[0].resource[19].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/contract-signer"
)
assert (
inst.rest[0].resource[19].searchParam[0].documentation
== "Contract Signatory Party"
)
assert inst.rest[0].resource[19].searchParam[0].name == "signer"
assert inst.rest[0].resource[19].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[19].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/contract-patient"
)
assert (
inst.rest[0].resource[19].searchParam[1].documentation
== "The identity of the target of the contract (if a patient)"
)
assert inst.rest[0].resource[19].searchParam[1].name == "patient"
assert inst.rest[0].resource[19].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[19].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/contract-subject"
)
assert (
inst.rest[0].resource[19].searchParam[2].documentation
== "The identity of the target of the contract"
)
assert inst.rest[0].resource[19].searchParam[2].name == "subject"
assert inst.rest[0].resource[19].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[19].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/contract-actor"
)
assert (
inst.rest[0].resource[19].searchParam[3].documentation == "Contract Actor Type"
)
assert inst.rest[0].resource[19].searchParam[3].name == "actor"
assert inst.rest[0].resource[19].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[19].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/contract-identifier"
)
assert (
inst.rest[0].resource[19].searchParam[4].documentation
== "The identity of the contract"
)
assert inst.rest[0].resource[19].searchParam[4].name == "identifier"
assert inst.rest[0].resource[19].searchParam[4].type == "token"
assert inst.rest[0].resource[19].searchRevInclude[0] == "Contract.actor"
assert inst.rest[0].resource[19].type == "Contract"
assert inst.rest[0].resource[20].conditionalCreate == True
assert inst.rest[0].resource[20].conditionalDelete == "multiple"
assert inst.rest[0].resource[20].conditionalUpdate == True
assert inst.rest[0].resource[20].interaction[0].code == "read"
assert (
inst.rest[0].resource[20].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[1].code == "vread"
assert (
inst.rest[0].resource[20].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[2].code == "update"
assert (
inst.rest[0].resource[20].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[3].code == "delete"
assert (
inst.rest[0].resource[20].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[20].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[5].code == "validate"
assert (
inst.rest[0].resource[20].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[20].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[7].code == "create"
assert (
inst.rest[0].resource[20].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[20].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[20].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[20].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Coverage"
)
assert inst.rest[0].resource[20].searchInclude[0] == "Coverage.issuer"
assert (
inst.rest[0].resource[20].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/coverage-plan"
)
assert (
inst.rest[0].resource[20].searchParam[0].documentation
== "A plan or policy identifier"
)
assert inst.rest[0].resource[20].searchParam[0].name == "plan"
assert inst.rest[0].resource[20].searchParam[0].type == "token"
assert (
inst.rest[0].resource[20].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/coverage-issuer"
)
assert (
inst.rest[0].resource[20].searchParam[1].documentation
== "The identity of the insurer"
)
assert inst.rest[0].resource[20].searchParam[1].name == "issuer"
assert inst.rest[0].resource[20].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[20].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/coverage-sequence"
)
assert inst.rest[0].resource[20].searchParam[2].documentation == "Sequence number"
assert inst.rest[0].resource[20].searchParam[2].name == "sequence"
assert inst.rest[0].resource[20].searchParam[2].type == "token"
assert (
inst.rest[0].resource[20].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/coverage-dependent"
)
assert inst.rest[0].resource[20].searchParam[3].documentation == "Dependent number"
assert inst.rest[0].resource[20].searchParam[3].name == "dependent"
assert inst.rest[0].resource[20].searchParam[3].type == "token"
assert (
inst.rest[0].resource[20].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/coverage-group"
)
assert inst.rest[0].resource[20].searchParam[4].documentation == "Group identifier"
assert inst.rest[0].resource[20].searchParam[4].name == "group"
assert inst.rest[0].resource[20].searchParam[4].type == "token"
assert (
inst.rest[0].resource[20].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/coverage-type"
)
assert (
inst.rest[0].resource[20].searchParam[5].documentation == "The kind of coverage"
)
assert inst.rest[0].resource[20].searchParam[5].name == "type"
assert inst.rest[0].resource[20].searchParam[5].type == "token"
assert (
inst.rest[0].resource[20].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/coverage-identifier"
)
assert (
inst.rest[0].resource[20].searchParam[6].documentation
== "The primary identifier of the insured"
)
assert inst.rest[0].resource[20].searchParam[6].name == "identifier"
assert inst.rest[0].resource[20].searchParam[6].type == "token"
assert (
inst.rest[0].resource[20].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/coverage-subplan"
)
assert (
inst.rest[0].resource[20].searchParam[7].documentation == "Sub-plan identifier"
)
assert inst.rest[0].resource[20].searchParam[7].name == "subplan"
assert inst.rest[0].resource[20].searchParam[7].type == "token"
assert inst.rest[0].resource[20].type == "Coverage"
assert inst.rest[0].resource[21].conditionalCreate == True
assert inst.rest[0].resource[21].conditionalDelete == "multiple"
assert inst.rest[0].resource[21].conditionalUpdate == True
assert inst.rest[0].resource[21].interaction[0].code == "read"
assert (
inst.rest[0].resource[21].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[1].code == "vread"
assert (
inst.rest[0].resource[21].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[2].code == "update"
assert (
inst.rest[0].resource[21].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[3].code == "delete"
assert (
inst.rest[0].resource[21].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[21].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[5].code == "validate"
assert (
inst.rest[0].resource[21].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[21].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[7].code == "create"
assert (
inst.rest[0].resource[21].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[21].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[21].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[21].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DataElement"
)
assert (
inst.rest[0].resource[21].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-stringency"
)
assert (
inst.rest[0].resource[21].searchParam[0].documentation
== "The stringency of the data element definition"
)
assert inst.rest[0].resource[21].searchParam[0].name == "stringency"
assert inst.rest[0].resource[21].searchParam[0].type == "token"
assert (
inst.rest[0].resource[21].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-status"
)
assert (
inst.rest[0].resource[21].searchParam[1].documentation
== "The current status of the data element"
)
assert inst.rest[0].resource[21].searchParam[1].name == "status"
assert inst.rest[0].resource[21].searchParam[1].type == "token"
assert (
inst.rest[0].resource[21].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-description"
)
assert (
inst.rest[0].resource[21].searchParam[2].documentation
== "Text search in the description of the data element. This corresponds to the definition of the first DataElement.element."
)
assert inst.rest[0].resource[21].searchParam[2].name == "description"
assert inst.rest[0].resource[21].searchParam[2].type == "string"
assert (
inst.rest[0].resource[21].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-name"
)
assert (
inst.rest[0].resource[21].searchParam[3].documentation
== "Name of the data element"
)
assert inst.rest[0].resource[21].searchParam[3].name == "name"
assert inst.rest[0].resource[21].searchParam[3].type == "string"
assert (
inst.rest[0].resource[21].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-context"
)
assert (
inst.rest[0].resource[21].searchParam[4].documentation
== "A use context assigned to the data element"
)
assert inst.rest[0].resource[21].searchParam[4].name == "context"
assert inst.rest[0].resource[21].searchParam[4].type == "token"
assert (
inst.rest[0].resource[21].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-code"
)
assert (
inst.rest[0].resource[21].searchParam[5].documentation
== "A code for the data element (server may choose to do subsumption)"
)
assert inst.rest[0].resource[21].searchParam[5].name == "code"
assert inst.rest[0].resource[21].searchParam[5].type == "token"
assert (
inst.rest[0].resource[21].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-date"
)
assert (
inst.rest[0].resource[21].searchParam[6].documentation
== "The data element publication date"
)
assert inst.rest[0].resource[21].searchParam[6].name == "date"
assert inst.rest[0].resource[21].searchParam[6].type == "date"
assert (
inst.rest[0].resource[21].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-identifier"
)
assert (
inst.rest[0].resource[21].searchParam[7].documentation
== "The identifier of the data element"
)
assert inst.rest[0].resource[21].searchParam[7].name == "identifier"
assert inst.rest[0].resource[21].searchParam[7].type == "token"
assert (
inst.rest[0].resource[21].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-url"
)
assert (
inst.rest[0].resource[21].searchParam[8].documentation
== "The official URL for the data element"
)
assert inst.rest[0].resource[21].searchParam[8].name == "url"
assert inst.rest[0].resource[21].searchParam[8].type == "uri"
assert (
inst.rest[0].resource[21].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-publisher"
)
assert (
inst.rest[0].resource[21].searchParam[9].documentation
== "Name of the publisher of the data element"
)
assert inst.rest[0].resource[21].searchParam[9].name == "publisher"
assert inst.rest[0].resource[21].searchParam[9].type == "string"
assert (
inst.rest[0].resource[21].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/dataelement-version"
)
assert (
inst.rest[0].resource[21].searchParam[10].documentation
== "The version identifier of the data element"
)
assert inst.rest[0].resource[21].searchParam[10].name == "version"
assert inst.rest[0].resource[21].searchParam[10].type == "string"
assert inst.rest[0].resource[21].type == "DataElement"
assert inst.rest[0].resource[22].conditionalCreate == True
assert inst.rest[0].resource[22].conditionalDelete == "multiple"
assert inst.rest[0].resource[22].conditionalUpdate == True
assert inst.rest[0].resource[22].interaction[0].code == "read"
assert (
inst.rest[0].resource[22].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[1].code == "vread"
assert (
inst.rest[0].resource[22].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[2].code == "update"
assert (
inst.rest[0].resource[22].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[3].code == "delete"
assert (
inst.rest[0].resource[22].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[22].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[5].code == "validate"
assert (
inst.rest[0].resource[22].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[22].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[7].code == "create"
assert (
inst.rest[0].resource[22].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[22].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[22].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[22].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DetectedIssue"
)
assert inst.rest[0].resource[22].searchInclude[0] == "DetectedIssue.author"
assert inst.rest[0].resource[22].searchInclude[1] == "DetectedIssue.implicated"
assert inst.rest[0].resource[22].searchInclude[2] == "DetectedIssue.patient"
assert (
inst.rest[0].resource[22].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-author"
)
assert (
inst.rest[0].resource[22].searchParam[0].documentation
== "The provider or device that identified the issue"
)
assert inst.rest[0].resource[22].searchParam[0].name == "author"
assert inst.rest[0].resource[22].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[22].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-category"
)
assert (
inst.rest[0].resource[22].searchParam[1].documentation
== "Issue Category, e.g. drug-drug, duplicate therapy, etc."
)
assert inst.rest[0].resource[22].searchParam[1].name == "category"
assert inst.rest[0].resource[22].searchParam[1].type == "token"
assert (
inst.rest[0].resource[22].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-implicated"
)
assert inst.rest[0].resource[22].searchParam[2].documentation == "Problem resource"
assert inst.rest[0].resource[22].searchParam[2].name == "implicated"
assert inst.rest[0].resource[22].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[22].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-patient"
)
assert (
inst.rest[0].resource[22].searchParam[3].documentation == "Associated patient"
)
assert inst.rest[0].resource[22].searchParam[3].name == "patient"
assert inst.rest[0].resource[22].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[22].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-date"
)
assert inst.rest[0].resource[22].searchParam[4].documentation == "When identified"
assert inst.rest[0].resource[22].searchParam[4].name == "date"
assert inst.rest[0].resource[22].searchParam[4].type == "date"
assert (
inst.rest[0].resource[22].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/detectedissue-identifier"
)
assert (
inst.rest[0].resource[22].searchParam[5].documentation
== "Unique id for the detected issue"
)
assert inst.rest[0].resource[22].searchParam[5].name == "identifier"
assert inst.rest[0].resource[22].searchParam[5].type == "token"
assert inst.rest[0].resource[22].type == "DetectedIssue"
assert inst.rest[0].resource[23].conditionalCreate == True
assert inst.rest[0].resource[23].conditionalDelete == "multiple"
assert inst.rest[0].resource[23].conditionalUpdate == True
assert inst.rest[0].resource[23].interaction[0].code == "read"
assert (
inst.rest[0].resource[23].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[1].code == "vread"
assert (
inst.rest[0].resource[23].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[2].code == "update"
assert (
inst.rest[0].resource[23].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[3].code == "delete"
assert (
inst.rest[0].resource[23].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[23].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[5].code == "validate"
assert (
inst.rest[0].resource[23].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[23].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[7].code == "create"
assert (
inst.rest[0].resource[23].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[23].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[23].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[23].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Device"
)
assert inst.rest[0].resource[23].searchInclude[0] == "Device.organization"
assert inst.rest[0].resource[23].searchInclude[1] == "Device.patient"
assert inst.rest[0].resource[23].searchInclude[2] == "Device.location"
assert (
inst.rest[0].resource[23].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/device-organization"
)
assert (
inst.rest[0].resource[23].searchParam[0].documentation
== "The organization responsible for the device"
)
assert inst.rest[0].resource[23].searchParam[0].name == "organization"
assert inst.rest[0].resource[23].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[23].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/device-model"
)
assert (
inst.rest[0].resource[23].searchParam[1].documentation
== "The model of the device"
)
assert inst.rest[0].resource[23].searchParam[1].name == "model"
assert inst.rest[0].resource[23].searchParam[1].type == "string"
assert (
inst.rest[0].resource[23].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/device-patient"
)
assert (
inst.rest[0].resource[23].searchParam[2].documentation
== "Patient information, if the resource is affixed to a person"
)
assert inst.rest[0].resource[23].searchParam[2].name == "patient"
assert inst.rest[0].resource[23].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[23].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/device-location"
)
assert (
inst.rest[0].resource[23].searchParam[3].documentation
== "A location, where the resource is found"
)
assert inst.rest[0].resource[23].searchParam[3].name == "location"
assert inst.rest[0].resource[23].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[23].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/device-manufacturer"
)
assert (
inst.rest[0].resource[23].searchParam[4].documentation
== "The manufacturer of the device"
)
assert inst.rest[0].resource[23].searchParam[4].name == "manufacturer"
assert inst.rest[0].resource[23].searchParam[4].type == "string"
assert (
inst.rest[0].resource[23].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/device-udi"
)
assert (
inst.rest[0].resource[23].searchParam[5].documentation
== "FDA mandated Unique Device Identifier"
)
assert inst.rest[0].resource[23].searchParam[5].name == "udi"
assert inst.rest[0].resource[23].searchParam[5].type == "string"
assert (
inst.rest[0].resource[23].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/device-type"
)
assert (
inst.rest[0].resource[23].searchParam[6].documentation
== "The type of the device"
)
assert inst.rest[0].resource[23].searchParam[6].name == "type"
assert inst.rest[0].resource[23].searchParam[6].type == "token"
assert (
inst.rest[0].resource[23].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/device-identifier"
)
assert (
inst.rest[0].resource[23].searchParam[7].documentation
== "Instance id from manufacturer, owner, and others"
)
assert inst.rest[0].resource[23].searchParam[7].name == "identifier"
assert inst.rest[0].resource[23].searchParam[7].type == "token"
assert (
inst.rest[0].resource[23].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/device-url"
)
assert (
inst.rest[0].resource[23].searchParam[8].documentation
== "Network address to contact device"
)
assert inst.rest[0].resource[23].searchParam[8].name == "url"
assert inst.rest[0].resource[23].searchParam[8].type == "uri"
assert inst.rest[0].resource[23].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[23].searchRevInclude[1] == "Account.subject"
assert inst.rest[0].resource[23].searchRevInclude[2] == "Appointment.patient"
assert inst.rest[0].resource[23].searchRevInclude[3] == "Appointment.practitioner"
assert inst.rest[0].resource[23].searchRevInclude[4] == "Appointment.location"
assert inst.rest[0].resource[23].searchRevInclude[5] == "Appointment.actor"
assert (
inst.rest[0].resource[23].searchRevInclude[6] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[23].searchRevInclude[7]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[23].searchRevInclude[8] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[23].searchRevInclude[9] == "AppointmentResponse.actor"
assert inst.rest[0].resource[23].searchRevInclude[10] == "AuditEvent.patient"
assert inst.rest[0].resource[23].searchRevInclude[11] == "AuditEvent.participant"
assert inst.rest[0].resource[23].searchRevInclude[12] == "Communication.sender"
assert inst.rest[0].resource[23].searchRevInclude[13] == "Communication.recipient"
assert (
inst.rest[0].resource[23].searchRevInclude[14] == "CommunicationRequest.sender"
)
assert (
inst.rest[0].resource[23].searchRevInclude[15]
== "CommunicationRequest.recipient"
)
assert inst.rest[0].resource[23].searchRevInclude[16] == "Composition.author"
assert inst.rest[0].resource[23].searchRevInclude[17] == "Contract.actor"
assert inst.rest[0].resource[23].searchRevInclude[18] == "DetectedIssue.author"
assert inst.rest[0].resource[23].searchRevInclude[19] == "DeviceComponent.source"
assert inst.rest[0].resource[23].searchRevInclude[20] == "DeviceMetric.source"
assert inst.rest[0].resource[23].searchRevInclude[21] == "DeviceUseRequest.device"
assert inst.rest[0].resource[23].searchRevInclude[22] == "DeviceUseStatement.device"
assert inst.rest[0].resource[23].searchRevInclude[23] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[23].searchRevInclude[24] == "DiagnosticOrder.actor"
assert inst.rest[0].resource[23].searchRevInclude[25] == "DiagnosticOrder.patient"
assert inst.rest[0].resource[23].searchRevInclude[26] == "DiagnosticReport.subject"
assert inst.rest[0].resource[23].searchRevInclude[27] == "DiagnosticReport.patient"
assert inst.rest[0].resource[23].searchRevInclude[28] == "DocumentManifest.subject"
assert inst.rest[0].resource[23].searchRevInclude[29] == "DocumentManifest.author"
assert inst.rest[0].resource[23].searchRevInclude[30] == "DocumentManifest.patient"
assert inst.rest[0].resource[23].searchRevInclude[31] == "DocumentReference.subject"
assert inst.rest[0].resource[23].searchRevInclude[32] == "DocumentReference.author"
assert inst.rest[0].resource[23].searchRevInclude[33] == "DocumentReference.patient"
assert inst.rest[0].resource[23].searchRevInclude[34] == "Flag.author"
assert inst.rest[0].resource[23].searchRevInclude[35] == "Group.member"
assert (
inst.rest[0].resource[23].searchRevInclude[36]
== "ImagingObjectSelection.author"
)
assert inst.rest[0].resource[23].searchRevInclude[37] == "List.patient"
assert inst.rest[0].resource[23].searchRevInclude[38] == "List.source"
assert inst.rest[0].resource[23].searchRevInclude[39] == "List.subject"
assert inst.rest[0].resource[23].searchRevInclude[40] == "Media.patient"
assert inst.rest[0].resource[23].searchRevInclude[41] == "Media.subject"
assert (
inst.rest[0].resource[23].searchRevInclude[42]
== "MedicationAdministration.device"
)
assert inst.rest[0].resource[23].searchRevInclude[43] == "MessageHeader.target"
assert inst.rest[0].resource[23].searchRevInclude[44] == "Observation.subject"
assert inst.rest[0].resource[23].searchRevInclude[45] == "Observation.patient"
assert inst.rest[0].resource[23].searchRevInclude[46] == "Observation.device"
assert inst.rest[0].resource[23].searchRevInclude[47] == "Order.patient"
assert inst.rest[0].resource[23].searchRevInclude[48] == "Order.subject"
assert inst.rest[0].resource[23].searchRevInclude[49] == "Order.target"
assert inst.rest[0].resource[23].searchRevInclude[50] == "OrderResponse.who"
assert inst.rest[0].resource[23].searchRevInclude[51] == "ProcedureRequest.orderer"
assert inst.rest[0].resource[23].searchRevInclude[52] == "Provenance.agent"
assert (
inst.rest[0].resource[23].searchRevInclude[53] == "QuestionnaireResponse.author"
)
assert inst.rest[0].resource[23].searchRevInclude[54] == "RiskAssessment.performer"
assert inst.rest[0].resource[23].searchRevInclude[55] == "Schedule.actor"
assert inst.rest[0].resource[23].searchRevInclude[56] == "Specimen.patient"
assert inst.rest[0].resource[23].searchRevInclude[57] == "Specimen.subject"
assert inst.rest[0].resource[23].type == "Device"
assert inst.rest[0].resource[24].conditionalCreate == True
assert inst.rest[0].resource[24].conditionalDelete == "multiple"
assert inst.rest[0].resource[24].conditionalUpdate == True
assert inst.rest[0].resource[24].interaction[0].code == "read"
assert (
inst.rest[0].resource[24].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[1].code == "vread"
assert (
inst.rest[0].resource[24].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[2].code == "update"
assert (
inst.rest[0].resource[24].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[3].code == "delete"
assert (
inst.rest[0].resource[24].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[24].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[5].code == "validate"
assert (
inst.rest[0].resource[24].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[24].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[7].code == "create"
assert (
inst.rest[0].resource[24].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[24].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[24].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[24].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DeviceComponent"
)
assert inst.rest[0].resource[24].searchInclude[0] == "DeviceComponent.source"
assert inst.rest[0].resource[24].searchInclude[1] == "DeviceComponent.parent"
assert (
inst.rest[0].resource[24].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/devicecomponent-source"
)
assert inst.rest[0].resource[24].searchParam[0].documentation == "The device source"
assert inst.rest[0].resource[24].searchParam[0].name == "source"
assert inst.rest[0].resource[24].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[24].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/devicecomponent-parent"
)
assert (
inst.rest[0].resource[24].searchParam[1].documentation
== "The parent DeviceComponent resource"
)
assert inst.rest[0].resource[24].searchParam[1].name == "parent"
assert inst.rest[0].resource[24].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[24].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/devicecomponent-type"
)
assert (
inst.rest[0].resource[24].searchParam[2].documentation
== "The device component type"
)
assert inst.rest[0].resource[24].searchParam[2].name == "type"
assert inst.rest[0].resource[24].searchParam[2].type == "token"
assert inst.rest[0].resource[24].searchRevInclude[0] == "DeviceComponent.parent"
assert inst.rest[0].resource[24].searchRevInclude[1] == "DeviceMetric.parent"
assert inst.rest[0].resource[24].type == "DeviceComponent"
assert inst.rest[0].resource[25].conditionalCreate == True
assert inst.rest[0].resource[25].conditionalDelete == "multiple"
assert inst.rest[0].resource[25].conditionalUpdate == True
assert inst.rest[0].resource[25].interaction[0].code == "read"
assert (
inst.rest[0].resource[25].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[1].code == "vread"
assert (
inst.rest[0].resource[25].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[2].code == "update"
assert (
inst.rest[0].resource[25].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[3].code == "delete"
assert (
inst.rest[0].resource[25].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[25].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[5].code == "validate"
assert (
inst.rest[0].resource[25].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[25].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[7].code == "create"
assert (
inst.rest[0].resource[25].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[25].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[25].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[25].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
)
assert inst.rest[0].resource[25].searchInclude[0] == "DeviceMetric.source"
assert inst.rest[0].resource[25].searchInclude[1] == "DeviceMetric.parent"
assert (
inst.rest[0].resource[25].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/devicemetric-category"
)
assert (
inst.rest[0].resource[25].searchParam[0].documentation
== "The category of the metric"
)
assert inst.rest[0].resource[25].searchParam[0].name == "category"
assert inst.rest[0].resource[25].searchParam[0].type == "token"
assert (
inst.rest[0].resource[25].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/devicemetric-source"
)
assert (
inst.rest[0].resource[25].searchParam[1].documentation == "The device resource"
)
assert inst.rest[0].resource[25].searchParam[1].name == "source"
assert inst.rest[0].resource[25].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[25].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/devicemetric-parent"
)
assert (
inst.rest[0].resource[25].searchParam[2].documentation
== "The parent DeviceMetric resource"
)
assert inst.rest[0].resource[25].searchParam[2].name == "parent"
assert inst.rest[0].resource[25].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[25].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/devicemetric-type"
)
assert (
inst.rest[0].resource[25].searchParam[3].documentation == "The component type"
)
assert inst.rest[0].resource[25].searchParam[3].name == "type"
assert inst.rest[0].resource[25].searchParam[3].type == "token"
assert (
inst.rest[0].resource[25].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/devicemetric-identifier"
)
assert (
inst.rest[0].resource[25].searchParam[4].documentation
== "The identifier of the metric"
)
assert inst.rest[0].resource[25].searchParam[4].name == "identifier"
assert inst.rest[0].resource[25].searchParam[4].type == "token"
assert inst.rest[0].resource[25].searchRevInclude[0] == "Observation.device"
assert inst.rest[0].resource[25].type == "DeviceMetric"
assert inst.rest[0].resource[26].conditionalCreate == True
assert inst.rest[0].resource[26].conditionalDelete == "multiple"
assert inst.rest[0].resource[26].conditionalUpdate == True
assert inst.rest[0].resource[26].interaction[0].code == "read"
assert (
inst.rest[0].resource[26].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[1].code == "vread"
assert (
inst.rest[0].resource[26].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[2].code == "update"
assert (
inst.rest[0].resource[26].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[3].code == "delete"
assert (
inst.rest[0].resource[26].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[26].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[5].code == "validate"
assert (
inst.rest[0].resource[26].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[26].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[7].code == "create"
assert (
inst.rest[0].resource[26].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[26].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[26].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[26].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DeviceUseRequest"
)
assert inst.rest[0].resource[26].searchInclude[0] == "DeviceUseRequest.patient"
assert inst.rest[0].resource[26].searchInclude[1] == "DeviceUseRequest.subject"
assert inst.rest[0].resource[26].searchInclude[2] == "DeviceUseRequest.device"
assert (
inst.rest[0].resource[26].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/deviceuserequest-patient"
)
assert (
inst.rest[0].resource[26].searchParam[0].documentation
== "Search by subject - a patient"
)
assert inst.rest[0].resource[26].searchParam[0].name == "patient"
assert inst.rest[0].resource[26].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[26].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/deviceuserequest-subject"
)
assert inst.rest[0].resource[26].searchParam[1].documentation == "Search by subject"
assert inst.rest[0].resource[26].searchParam[1].name == "subject"
assert inst.rest[0].resource[26].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[26].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/deviceuserequest-device"
)
assert inst.rest[0].resource[26].searchParam[2].documentation == "Device requested"
assert inst.rest[0].resource[26].searchParam[2].name == "device"
assert inst.rest[0].resource[26].searchParam[2].type == "reference"
assert inst.rest[0].resource[26].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[26].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[26].type == "DeviceUseRequest"
assert inst.rest[0].resource[27].conditionalCreate == True
assert inst.rest[0].resource[27].conditionalDelete == "multiple"
assert inst.rest[0].resource[27].conditionalUpdate == True
assert inst.rest[0].resource[27].interaction[0].code == "read"
assert (
inst.rest[0].resource[27].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[1].code == "vread"
assert (
inst.rest[0].resource[27].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[2].code == "update"
assert (
inst.rest[0].resource[27].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[3].code == "delete"
assert (
inst.rest[0].resource[27].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[27].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[5].code == "validate"
assert (
inst.rest[0].resource[27].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[27].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[7].code == "create"
assert (
inst.rest[0].resource[27].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[27].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[27].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[27].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DeviceUseStatement"
)
assert inst.rest[0].resource[27].searchInclude[0] == "DeviceUseStatement.patient"
assert inst.rest[0].resource[27].searchInclude[1] == "DeviceUseStatement.subject"
assert inst.rest[0].resource[27].searchInclude[2] == "DeviceUseStatement.device"
assert (
inst.rest[0].resource[27].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/deviceusestatement-patient"
)
assert (
inst.rest[0].resource[27].searchParam[0].documentation
== "Search by subject - a patient"
)
assert inst.rest[0].resource[27].searchParam[0].name == "patient"
assert inst.rest[0].resource[27].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[27].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/deviceusestatement-subject"
)
assert inst.rest[0].resource[27].searchParam[1].documentation == "Search by subject"
assert inst.rest[0].resource[27].searchParam[1].name == "subject"
assert inst.rest[0].resource[27].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[27].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/deviceusestatement-device"
)
assert inst.rest[0].resource[27].searchParam[2].documentation == "Search by device"
assert inst.rest[0].resource[27].searchParam[2].name == "device"
assert inst.rest[0].resource[27].searchParam[2].type == "reference"
assert inst.rest[0].resource[27].type == "DeviceUseStatement"
assert inst.rest[0].resource[28].conditionalCreate == True
assert inst.rest[0].resource[28].conditionalDelete == "multiple"
assert inst.rest[0].resource[28].conditionalUpdate == True
assert inst.rest[0].resource[28].interaction[0].code == "read"
assert (
inst.rest[0].resource[28].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[1].code == "vread"
assert (
inst.rest[0].resource[28].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[2].code == "update"
assert (
inst.rest[0].resource[28].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[3].code == "delete"
assert (
inst.rest[0].resource[28].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[28].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[5].code == "validate"
assert (
inst.rest[0].resource[28].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[28].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[7].code == "create"
assert (
inst.rest[0].resource[28].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[28].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[28].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[28].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DiagnosticOrder"
)
assert inst.rest[0].resource[28].searchInclude[0] == "DiagnosticOrder.orderer"
assert inst.rest[0].resource[28].searchInclude[1] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[28].searchInclude[2] == "DiagnosticOrder.actor"
assert inst.rest[0].resource[28].searchInclude[3] == "DiagnosticOrder.encounter"
assert inst.rest[0].resource[28].searchInclude[4] == "DiagnosticOrder.patient"
assert inst.rest[0].resource[28].searchInclude[5] == "DiagnosticOrder.specimen"
assert (
inst.rest[0].resource[28].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-orderer"
)
assert (
inst.rest[0].resource[28].searchParam[0].documentation == "Who ordered the test"
)
assert inst.rest[0].resource[28].searchParam[0].name == "orderer"
assert inst.rest[0].resource[28].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-status"
)
assert (
inst.rest[0].resource[28].searchParam[1].documentation
== "proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"
)
assert inst.rest[0].resource[28].searchParam[1].name == "status"
assert inst.rest[0].resource[28].searchParam[1].type == "token"
assert (
inst.rest[0].resource[28].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-subject"
)
assert (
inst.rest[0].resource[28].searchParam[2].documentation
== "Who and/or what test is about"
)
assert inst.rest[0].resource[28].searchParam[2].name == "subject"
assert inst.rest[0].resource[28].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-item-status"
)
assert (
inst.rest[0].resource[28].searchParam[3].documentation
== "proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"
)
assert inst.rest[0].resource[28].searchParam[3].name == "item-status"
assert inst.rest[0].resource[28].searchParam[3].type == "token"
assert (
inst.rest[0].resource[28].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-event-status"
)
assert (
inst.rest[0].resource[28].searchParam[4].documentation
== "proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"
)
assert inst.rest[0].resource[28].searchParam[4].name == "event-status"
assert inst.rest[0].resource[28].searchParam[4].type == "token"
assert (
inst.rest[0].resource[28].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-actor"
)
assert (
inst.rest[0].resource[28].searchParam[5].documentation
== "Who recorded or did this"
)
assert inst.rest[0].resource[28].searchParam[5].name == "actor"
assert inst.rest[0].resource[28].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-code"
)
assert (
inst.rest[0].resource[28].searchParam[6].documentation
== "Code to indicate the item (test or panel) being ordered"
)
assert inst.rest[0].resource[28].searchParam[6].name == "code"
assert inst.rest[0].resource[28].searchParam[6].type == "token"
assert (
inst.rest[0].resource[28].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-encounter"
)
assert (
inst.rest[0].resource[28].searchParam[7].documentation
== "The encounter that this diagnostic order is associated with"
)
assert inst.rest[0].resource[28].searchParam[7].name == "encounter"
assert inst.rest[0].resource[28].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-item-past-status"
)
assert (
inst.rest[0].resource[28].searchParam[8].documentation
== "proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed"
)
assert inst.rest[0].resource[28].searchParam[8].name == "item-past-status"
assert inst.rest[0].resource[28].searchParam[8].type == "token"
assert (
inst.rest[0].resource[28].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-patient"
)
assert (
inst.rest[0].resource[28].searchParam[9].documentation
== "Who and/or what test is about"
)
assert inst.rest[0].resource[28].searchParam[9].name == "patient"
assert inst.rest[0].resource[28].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-bodysite"
)
assert (
inst.rest[0].resource[28].searchParam[10].documentation
== "Location of requested test (if applicable)"
)
assert inst.rest[0].resource[28].searchParam[10].name == "bodysite"
assert inst.rest[0].resource[28].searchParam[10].type == "token"
assert (
inst.rest[0].resource[28].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-item-date"
)
assert (
inst.rest[0].resource[28].searchParam[11].documentation
== "The date at which the event happened"
)
assert inst.rest[0].resource[28].searchParam[11].name == "item-date"
assert inst.rest[0].resource[28].searchParam[11].type == "date"
assert (
inst.rest[0].resource[28].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-specimen"
)
assert (
inst.rest[0].resource[28].searchParam[12].documentation
== "If the whole order relates to specific specimens"
)
assert inst.rest[0].resource[28].searchParam[12].name == "specimen"
assert inst.rest[0].resource[28].searchParam[12].type == "reference"
assert (
inst.rest[0].resource[28].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-event-status-date"
)
assert (
inst.rest[0].resource[28].searchParam[13].documentation
== "A combination of past-status and date"
)
assert inst.rest[0].resource[28].searchParam[13].name == "event-status-date"
assert inst.rest[0].resource[28].searchParam[13].type == "composite"
assert (
inst.rest[0].resource[28].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-event-date"
)
assert (
inst.rest[0].resource[28].searchParam[14].documentation
== "The date at which the event happened"
)
assert inst.rest[0].resource[28].searchParam[14].name == "event-date"
assert inst.rest[0].resource[28].searchParam[14].type == "date"
assert (
inst.rest[0].resource[28].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-identifier"
)
assert (
inst.rest[0].resource[28].searchParam[15].documentation
== "Identifiers assigned to this order"
)
assert inst.rest[0].resource[28].searchParam[15].name == "identifier"
assert inst.rest[0].resource[28].searchParam[15].type == "token"
assert (
inst.rest[0].resource[28].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticorder-item-status-date"
)
assert (
inst.rest[0].resource[28].searchParam[16].documentation
== "A combination of item-past-status and item-date"
)
assert inst.rest[0].resource[28].searchParam[16].name == "item-status-date"
assert inst.rest[0].resource[28].searchParam[16].type == "composite"
assert inst.rest[0].resource[28].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[28].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[28].searchRevInclude[2] == "ClinicalImpression.action"
assert inst.rest[0].resource[28].searchRevInclude[3] == "DiagnosticReport.request"
assert inst.rest[0].resource[28].searchRevInclude[4] == "ImagingStudy.order"
assert inst.rest[0].resource[28].type == "DiagnosticOrder"
assert inst.rest[0].resource[29].conditionalCreate == True
assert inst.rest[0].resource[29].conditionalDelete == "multiple"
assert inst.rest[0].resource[29].conditionalUpdate == True
assert inst.rest[0].resource[29].interaction[0].code == "read"
assert (
inst.rest[0].resource[29].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[1].code == "vread"
assert (
inst.rest[0].resource[29].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[2].code == "update"
assert (
inst.rest[0].resource[29].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[3].code == "delete"
assert (
inst.rest[0].resource[29].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[29].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[5].code == "validate"
assert (
inst.rest[0].resource[29].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[29].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[7].code == "create"
assert (
inst.rest[0].resource[29].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[29].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[29].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[29].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"
)
assert inst.rest[0].resource[29].searchInclude[0] == "DiagnosticReport.result"
assert inst.rest[0].resource[29].searchInclude[1] == "DiagnosticReport.subject"
assert inst.rest[0].resource[29].searchInclude[2] == "DiagnosticReport.image"
assert inst.rest[0].resource[29].searchInclude[3] == "DiagnosticReport.encounter"
assert inst.rest[0].resource[29].searchInclude[4] == "DiagnosticReport.patient"
assert inst.rest[0].resource[29].searchInclude[5] == "DiagnosticReport.request"
assert inst.rest[0].resource[29].searchInclude[6] == "DiagnosticReport.specimen"
assert inst.rest[0].resource[29].searchInclude[7] == "DiagnosticReport.performer"
assert (
inst.rest[0].resource[29].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-result"
)
assert (
inst.rest[0].resource[29].searchParam[0].documentation
== "Link to an atomic result (observation resource)"
)
assert inst.rest[0].resource[29].searchParam[0].name == "result"
assert inst.rest[0].resource[29].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-status"
)
assert (
inst.rest[0].resource[29].searchParam[1].documentation
== "The status of the report"
)
assert inst.rest[0].resource[29].searchParam[1].name == "status"
assert inst.rest[0].resource[29].searchParam[1].type == "token"
assert (
inst.rest[0].resource[29].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-subject"
)
assert (
inst.rest[0].resource[29].searchParam[2].documentation
== "The subject of the report"
)
assert inst.rest[0].resource[29].searchParam[2].name == "subject"
assert inst.rest[0].resource[29].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-issued"
)
assert (
inst.rest[0].resource[29].searchParam[3].documentation
== "When the report was issued"
)
assert inst.rest[0].resource[29].searchParam[3].name == "issued"
assert inst.rest[0].resource[29].searchParam[3].type == "date"
assert (
inst.rest[0].resource[29].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-diagnosis"
)
assert (
inst.rest[0].resource[29].searchParam[4].documentation
== "A coded diagnosis on the report"
)
assert inst.rest[0].resource[29].searchParam[4].name == "diagnosis"
assert inst.rest[0].resource[29].searchParam[4].type == "token"
assert (
inst.rest[0].resource[29].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-image"
)
assert (
inst.rest[0].resource[29].searchParam[5].documentation
== "A reference to the image source."
)
assert inst.rest[0].resource[29].searchParam[5].name == "image"
assert inst.rest[0].resource[29].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-encounter"
)
assert (
inst.rest[0].resource[29].searchParam[6].documentation
== "The Encounter when the order was made"
)
assert inst.rest[0].resource[29].searchParam[6].name == "encounter"
assert inst.rest[0].resource[29].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-code"
)
assert (
inst.rest[0].resource[29].searchParam[7].documentation
== "The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result"
)
assert inst.rest[0].resource[29].searchParam[7].name == "code"
assert inst.rest[0].resource[29].searchParam[7].type == "token"
assert (
inst.rest[0].resource[29].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-date"
)
assert (
inst.rest[0].resource[29].searchParam[8].documentation
== "The clinically relevant time of the report"
)
assert inst.rest[0].resource[29].searchParam[8].name == "date"
assert inst.rest[0].resource[29].searchParam[8].type == "date"
assert (
inst.rest[0].resource[29].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-category"
)
assert (
inst.rest[0].resource[29].searchParam[9].documentation
== "Which diagnostic discipline/department created the report"
)
assert inst.rest[0].resource[29].searchParam[9].name == "category"
assert inst.rest[0].resource[29].searchParam[9].type == "token"
assert (
inst.rest[0].resource[29].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-patient"
)
assert (
inst.rest[0].resource[29].searchParam[10].documentation
== "The subject of the report if a patient"
)
assert inst.rest[0].resource[29].searchParam[10].name == "patient"
assert inst.rest[0].resource[29].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-request"
)
assert (
inst.rest[0].resource[29].searchParam[11].documentation
== "Reference to the test or procedure request."
)
assert inst.rest[0].resource[29].searchParam[11].name == "request"
assert inst.rest[0].resource[29].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-specimen"
)
assert (
inst.rest[0].resource[29].searchParam[12].documentation
== "The specimen details"
)
assert inst.rest[0].resource[29].searchParam[12].name == "specimen"
assert inst.rest[0].resource[29].searchParam[12].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-performer"
)
assert (
inst.rest[0].resource[29].searchParam[13].documentation
== "Who was the source of the report (organization)"
)
assert inst.rest[0].resource[29].searchParam[13].name == "performer"
assert inst.rest[0].resource[29].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[29].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/diagnosticreport-identifier"
)
assert (
inst.rest[0].resource[29].searchParam[14].documentation
== "An identifier for the report"
)
assert inst.rest[0].resource[29].searchParam[14].name == "identifier"
assert inst.rest[0].resource[29].searchParam[14].type == "token"
assert (
inst.rest[0].resource[29].searchRevInclude[0]
== "ClinicalImpression.investigation"
)
assert inst.rest[0].resource[29].type == "DiagnosticReport"
assert inst.rest[0].resource[30].conditionalCreate == True
assert inst.rest[0].resource[30].conditionalDelete == "multiple"
assert inst.rest[0].resource[30].conditionalUpdate == True
assert inst.rest[0].resource[30].interaction[0].code == "read"
assert (
inst.rest[0].resource[30].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[1].code == "vread"
assert (
inst.rest[0].resource[30].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[2].code == "update"
assert (
inst.rest[0].resource[30].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[3].code == "delete"
assert (
inst.rest[0].resource[30].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[30].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[5].code == "validate"
assert (
inst.rest[0].resource[30].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[30].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[7].code == "create"
assert (
inst.rest[0].resource[30].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[30].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[30].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[30].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DocumentManifest"
)
assert inst.rest[0].resource[30].searchInclude[0] == "DocumentManifest.related-ref"
assert inst.rest[0].resource[30].searchInclude[1] == "DocumentManifest.content-ref"
assert inst.rest[0].resource[30].searchInclude[2] == "DocumentManifest.subject"
assert inst.rest[0].resource[30].searchInclude[3] == "DocumentManifest.recipient"
assert inst.rest[0].resource[30].searchInclude[4] == "DocumentManifest.author"
assert inst.rest[0].resource[30].searchInclude[5] == "DocumentManifest.patient"
assert (
inst.rest[0].resource[30].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-related-ref"
)
assert inst.rest[0].resource[30].searchParam[0].documentation == "Related Resource"
assert inst.rest[0].resource[30].searchParam[0].name == "related-ref"
assert inst.rest[0].resource[30].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-related-id"
)
assert (
inst.rest[0].resource[30].searchParam[1].documentation
== "Identifiers of things that are related"
)
assert inst.rest[0].resource[30].searchParam[1].name == "related-id"
assert inst.rest[0].resource[30].searchParam[1].type == "token"
assert (
inst.rest[0].resource[30].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-content-ref"
)
assert (
inst.rest[0].resource[30].searchParam[2].documentation
== "Contents of this set of documents"
)
assert inst.rest[0].resource[30].searchParam[2].name == "content-ref"
assert inst.rest[0].resource[30].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-status"
)
assert (
inst.rest[0].resource[30].searchParam[3].documentation
== "current | superseded | entered-in-error"
)
assert inst.rest[0].resource[30].searchParam[3].name == "status"
assert inst.rest[0].resource[30].searchParam[3].type == "token"
assert (
inst.rest[0].resource[30].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-subject"
)
assert (
inst.rest[0].resource[30].searchParam[4].documentation
== "The subject of the set of documents"
)
assert inst.rest[0].resource[30].searchParam[4].name == "subject"
assert inst.rest[0].resource[30].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-type"
)
assert (
inst.rest[0].resource[30].searchParam[5].documentation == "Kind of document set"
)
assert inst.rest[0].resource[30].searchParam[5].name == "type"
assert inst.rest[0].resource[30].searchParam[5].type == "token"
assert (
inst.rest[0].resource[30].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-recipient"
)
assert (
inst.rest[0].resource[30].searchParam[6].documentation
== "Intended to get notified about this set of documents"
)
assert inst.rest[0].resource[30].searchParam[6].name == "recipient"
assert inst.rest[0].resource[30].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-author"
)
assert (
inst.rest[0].resource[30].searchParam[7].documentation
== "Who and/or what authored the manifest"
)
assert inst.rest[0].resource[30].searchParam[7].name == "author"
assert inst.rest[0].resource[30].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-patient"
)
assert (
inst.rest[0].resource[30].searchParam[8].documentation
== "The subject of the set of documents"
)
assert inst.rest[0].resource[30].searchParam[8].name == "patient"
assert inst.rest[0].resource[30].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[30].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-source"
)
assert (
inst.rest[0].resource[30].searchParam[9].documentation
== "The source system/application/software"
)
assert inst.rest[0].resource[30].searchParam[9].name == "source"
assert inst.rest[0].resource[30].searchParam[9].type == "uri"
assert (
inst.rest[0].resource[30].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-created"
)
assert (
inst.rest[0].resource[30].searchParam[10].documentation
== "When this document manifest created"
)
assert inst.rest[0].resource[30].searchParam[10].name == "created"
assert inst.rest[0].resource[30].searchParam[10].type == "date"
assert (
inst.rest[0].resource[30].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-description"
)
assert (
inst.rest[0].resource[30].searchParam[11].documentation
== "Human-readable description (title)"
)
assert inst.rest[0].resource[30].searchParam[11].name == "description"
assert inst.rest[0].resource[30].searchParam[11].type == "string"
assert (
inst.rest[0].resource[30].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/documentmanifest-identifier"
)
assert (
inst.rest[0].resource[30].searchParam[12].documentation
== "Unique Identifier for the set of documents"
)
assert inst.rest[0].resource[30].searchParam[12].name == "identifier"
assert inst.rest[0].resource[30].searchParam[12].type == "token"
assert inst.rest[0].resource[30].type == "DocumentManifest"
assert inst.rest[0].resource[31].conditionalCreate == True
assert inst.rest[0].resource[31].conditionalDelete == "multiple"
assert inst.rest[0].resource[31].conditionalUpdate == True
assert inst.rest[0].resource[31].interaction[0].code == "read"
assert (
inst.rest[0].resource[31].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[1].code == "vread"
assert (
inst.rest[0].resource[31].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[2].code == "update"
assert (
inst.rest[0].resource[31].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[3].code == "delete"
assert (
inst.rest[0].resource[31].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[31].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[5].code == "validate"
assert (
inst.rest[0].resource[31].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[31].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[7].code == "create"
assert (
inst.rest[0].resource[31].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[31].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[31].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[31].profile.reference
== "http://hl7.org/fhir/StructureDefinition/DocumentReference"
)
assert inst.rest[0].resource[31].searchInclude[0] == "DocumentReference.related-ref"
assert inst.rest[0].resource[31].searchInclude[1] == "DocumentReference.relatesto"
assert inst.rest[0].resource[31].searchInclude[2] == "DocumentReference.subject"
assert inst.rest[0].resource[31].searchInclude[3] == "DocumentReference.encounter"
assert inst.rest[0].resource[31].searchInclude[4] == "DocumentReference.author"
assert inst.rest[0].resource[31].searchInclude[5] == "DocumentReference.custodian"
assert inst.rest[0].resource[31].searchInclude[6] == "DocumentReference.patient"
assert (
inst.rest[0].resource[31].searchInclude[7] == "DocumentReference.authenticator"
)
assert (
inst.rest[0].resource[31].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-related-ref"
)
assert inst.rest[0].resource[31].searchParam[0].documentation == "Related Resource"
assert inst.rest[0].resource[31].searchParam[0].name == "related-ref"
assert inst.rest[0].resource[31].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-related-id"
)
assert (
inst.rest[0].resource[31].searchParam[1].documentation
== "Identifier of related objects or events"
)
assert inst.rest[0].resource[31].searchParam[1].name == "related-id"
assert inst.rest[0].resource[31].searchParam[1].type == "token"
assert (
inst.rest[0].resource[31].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-indexed"
)
assert (
inst.rest[0].resource[31].searchParam[2].documentation
== "When this document reference created"
)
assert inst.rest[0].resource[31].searchParam[2].name == "indexed"
assert inst.rest[0].resource[31].searchParam[2].type == "date"
assert (
inst.rest[0].resource[31].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-location"
)
assert (
inst.rest[0].resource[31].searchParam[3].documentation
== "Uri where the data can be found"
)
assert inst.rest[0].resource[31].searchParam[3].name == "location"
assert inst.rest[0].resource[31].searchParam[3].type == "uri"
assert (
inst.rest[0].resource[31].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-relatesto"
)
assert (
inst.rest[0].resource[31].searchParam[4].documentation
== "Target of the relationship"
)
assert inst.rest[0].resource[31].searchParam[4].name == "relatesto"
assert inst.rest[0].resource[31].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-subject"
)
assert (
inst.rest[0].resource[31].searchParam[5].documentation
== "Who/what is the subject of the document"
)
assert inst.rest[0].resource[31].searchParam[5].name == "subject"
assert inst.rest[0].resource[31].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-encounter"
)
assert (
inst.rest[0].resource[31].searchParam[6].documentation
== "Context of the document content"
)
assert inst.rest[0].resource[31].searchParam[6].name == "encounter"
assert inst.rest[0].resource[31].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-type"
)
assert (
inst.rest[0].resource[31].searchParam[7].documentation
== "Kind of document (LOINC if possible)"
)
assert inst.rest[0].resource[31].searchParam[7].name == "type"
assert inst.rest[0].resource[31].searchParam[7].type == "token"
assert (
inst.rest[0].resource[31].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-securitylabel"
)
assert (
inst.rest[0].resource[31].searchParam[8].documentation
== "Document security-tags"
)
assert inst.rest[0].resource[31].searchParam[8].name == "securitylabel"
assert inst.rest[0].resource[31].searchParam[8].type == "token"
assert (
inst.rest[0].resource[31].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-setting"
)
assert (
inst.rest[0].resource[31].searchParam[9].documentation
== "Additional details about where the content was created (e.g. clinical specialty)"
)
assert inst.rest[0].resource[31].searchParam[9].name == "setting"
assert inst.rest[0].resource[31].searchParam[9].type == "token"
assert (
inst.rest[0].resource[31].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-author"
)
assert (
inst.rest[0].resource[31].searchParam[10].documentation
== "Who and/or what authored the document"
)
assert inst.rest[0].resource[31].searchParam[10].name == "author"
assert inst.rest[0].resource[31].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-custodian"
)
assert (
inst.rest[0].resource[31].searchParam[11].documentation
== "Organization which maintains the document"
)
assert inst.rest[0].resource[31].searchParam[11].name == "custodian"
assert inst.rest[0].resource[31].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-patient"
)
assert (
inst.rest[0].resource[31].searchParam[12].documentation
== "Who/what is the subject of the document"
)
assert inst.rest[0].resource[31].searchParam[12].name == "patient"
assert inst.rest[0].resource[31].searchParam[12].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-facility"
)
assert (
inst.rest[0].resource[31].searchParam[13].documentation
== "Kind of facility where patient was seen"
)
assert inst.rest[0].resource[31].searchParam[13].name == "facility"
assert inst.rest[0].resource[31].searchParam[13].type == "token"
assert (
inst.rest[0].resource[31].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-created"
)
assert (
inst.rest[0].resource[31].searchParam[14].documentation
== "Document creation time"
)
assert inst.rest[0].resource[31].searchParam[14].name == "created"
assert inst.rest[0].resource[31].searchParam[14].type == "date"
assert (
inst.rest[0].resource[31].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-description"
)
assert (
inst.rest[0].resource[31].searchParam[15].documentation
== "Human-readable description (title)"
)
assert inst.rest[0].resource[31].searchParam[15].name == "description"
assert inst.rest[0].resource[31].searchParam[15].type == "string"
assert (
inst.rest[0].resource[31].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-event"
)
assert (
inst.rest[0].resource[31].searchParam[16].documentation
== "Main Clinical Acts Documented"
)
assert inst.rest[0].resource[31].searchParam[16].name == "event"
assert inst.rest[0].resource[31].searchParam[16].type == "token"
assert (
inst.rest[0].resource[31].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-status"
)
assert (
inst.rest[0].resource[31].searchParam[17].documentation
== "current | superseded | entered-in-error"
)
assert inst.rest[0].resource[31].searchParam[17].name == "status"
assert inst.rest[0].resource[31].searchParam[17].type == "token"
assert (
inst.rest[0].resource[31].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-relation"
)
assert (
inst.rest[0].resource[31].searchParam[18].documentation
== "replaces | transforms | signs | appends"
)
assert inst.rest[0].resource[31].searchParam[18].name == "relation"
assert inst.rest[0].resource[31].searchParam[18].type == "token"
assert (
inst.rest[0].resource[31].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-class"
)
assert (
inst.rest[0].resource[31].searchParam[19].documentation
== "Categorization of document"
)
assert inst.rest[0].resource[31].searchParam[19].name == "class"
assert inst.rest[0].resource[31].searchParam[19].type == "token"
assert (
inst.rest[0].resource[31].searchParam[20].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-format"
)
assert (
inst.rest[0].resource[31].searchParam[20].documentation
== "Format/content rules for the document"
)
assert inst.rest[0].resource[31].searchParam[20].name == "format"
assert inst.rest[0].resource[31].searchParam[20].type == "token"
assert (
inst.rest[0].resource[31].searchParam[21].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-period"
)
assert (
inst.rest[0].resource[31].searchParam[21].documentation
== "Time of service that is being documented"
)
assert inst.rest[0].resource[31].searchParam[21].name == "period"
assert inst.rest[0].resource[31].searchParam[21].type == "date"
assert (
inst.rest[0].resource[31].searchParam[22].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-authenticator"
)
assert (
inst.rest[0].resource[31].searchParam[22].documentation
== "Who/what authenticated the document"
)
assert inst.rest[0].resource[31].searchParam[22].name == "authenticator"
assert inst.rest[0].resource[31].searchParam[22].type == "reference"
assert (
inst.rest[0].resource[31].searchParam[23].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-relationship"
)
assert (
inst.rest[0].resource[31].searchParam[23].documentation
== "Combination of relation and relatesTo"
)
assert inst.rest[0].resource[31].searchParam[23].name == "relationship"
assert inst.rest[0].resource[31].searchParam[23].type == "composite"
assert (
inst.rest[0].resource[31].searchParam[24].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-language"
)
assert (
inst.rest[0].resource[31].searchParam[24].documentation
== "Human language of the content (BCP-47)"
)
assert inst.rest[0].resource[31].searchParam[24].name == "language"
assert inst.rest[0].resource[31].searchParam[24].type == "token"
assert (
inst.rest[0].resource[31].searchParam[25].definition
== "http://hl7.org/fhir/SearchParameter/documentreference-identifier"
)
assert (
inst.rest[0].resource[31].searchParam[25].documentation
== "Master Version Specific Identifier"
)
assert inst.rest[0].resource[31].searchParam[25].name == "identifier"
assert inst.rest[0].resource[31].searchParam[25].type == "token"
assert (
inst.rest[0].resource[31].searchRevInclude[0] == "DocumentReference.relatesto"
)
assert inst.rest[0].resource[31].type == "DocumentReference"
assert inst.rest[0].resource[32].conditionalCreate == True
assert inst.rest[0].resource[32].conditionalDelete == "multiple"
assert inst.rest[0].resource[32].conditionalUpdate == True
assert inst.rest[0].resource[32].interaction[0].code == "read"
assert (
inst.rest[0].resource[32].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[1].code == "vread"
assert (
inst.rest[0].resource[32].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[2].code == "update"
assert (
inst.rest[0].resource[32].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[3].code == "delete"
assert (
inst.rest[0].resource[32].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[32].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[5].code == "validate"
assert (
inst.rest[0].resource[32].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[32].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[7].code == "create"
assert (
inst.rest[0].resource[32].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[32].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[32].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[32].profile.reference
== "http://hl7.org/fhir/StructureDefinition/EligibilityRequest"
)
assert (
inst.rest[0].resource[32].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/eligibilityrequest-identifier"
)
assert (
inst.rest[0].resource[32].searchParam[0].documentation
== "The business identifier of the Eligibility"
)
assert inst.rest[0].resource[32].searchParam[0].name == "identifier"
assert inst.rest[0].resource[32].searchParam[0].type == "token"
assert inst.rest[0].resource[32].type == "EligibilityRequest"
assert inst.rest[0].resource[33].conditionalCreate == True
assert inst.rest[0].resource[33].conditionalDelete == "multiple"
assert inst.rest[0].resource[33].conditionalUpdate == True
assert inst.rest[0].resource[33].interaction[0].code == "read"
assert (
inst.rest[0].resource[33].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[1].code == "vread"
assert (
inst.rest[0].resource[33].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[2].code == "update"
assert (
inst.rest[0].resource[33].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[3].code == "delete"
assert (
inst.rest[0].resource[33].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[33].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[5].code == "validate"
assert (
inst.rest[0].resource[33].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[33].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[7].code == "create"
assert (
inst.rest[0].resource[33].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[33].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[33].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[33].profile.reference
== "http://hl7.org/fhir/StructureDefinition/EligibilityResponse"
)
assert (
inst.rest[0].resource[33].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/eligibilityresponse-identifier"
)
assert (
inst.rest[0].resource[33].searchParam[0].documentation
== "The business identifier of the Explanation of Benefit"
)
assert inst.rest[0].resource[33].searchParam[0].name == "identifier"
assert inst.rest[0].resource[33].searchParam[0].type == "token"
assert inst.rest[0].resource[33].type == "EligibilityResponse"
assert inst.rest[0].resource[34].conditionalCreate == True
assert inst.rest[0].resource[34].conditionalDelete == "multiple"
assert inst.rest[0].resource[34].conditionalUpdate == True
assert inst.rest[0].resource[34].interaction[0].code == "read"
assert (
inst.rest[0].resource[34].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[1].code == "vread"
assert (
inst.rest[0].resource[34].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[2].code == "update"
assert (
inst.rest[0].resource[34].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[3].code == "delete"
assert (
inst.rest[0].resource[34].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[34].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[5].code == "validate"
assert (
inst.rest[0].resource[34].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[34].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[7].code == "create"
assert (
inst.rest[0].resource[34].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[34].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[34].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[34].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Encounter"
)
assert inst.rest[0].resource[34].searchInclude[0] == "Encounter.episodeofcare"
assert inst.rest[0].resource[34].searchInclude[1] == "Encounter.condition"
assert inst.rest[0].resource[34].searchInclude[2] == "Encounter.location"
assert inst.rest[0].resource[34].searchInclude[3] == "Encounter.indication"
assert inst.rest[0].resource[34].searchInclude[4] == "Encounter.part-of"
assert inst.rest[0].resource[34].searchInclude[5] == "Encounter.appointment"
assert inst.rest[0].resource[34].searchInclude[6] == "Encounter.patient"
assert inst.rest[0].resource[34].searchInclude[7] == "Encounter.practitioner"
assert inst.rest[0].resource[34].searchInclude[8] == "Encounter.participant"
assert inst.rest[0].resource[34].searchInclude[9] == "Encounter.incomingreferral"
assert inst.rest[0].resource[34].searchInclude[10] == "Encounter.procedure"
assert (
inst.rest[0].resource[34].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/encounter-participant-type"
)
assert (
inst.rest[0].resource[34].searchParam[0].documentation
== "Role of participant in encounter"
)
assert inst.rest[0].resource[34].searchParam[0].name == "participant-type"
assert inst.rest[0].resource[34].searchParam[0].type == "token"
assert (
inst.rest[0].resource[34].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/encounter-episodeofcare"
)
assert (
inst.rest[0].resource[34].searchParam[1].documentation
== "Episode(s) of care that this encounter should be recorded against"
)
assert inst.rest[0].resource[34].searchParam[1].name == "episodeofcare"
assert inst.rest[0].resource[34].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/encounter-status"
)
assert (
inst.rest[0].resource[34].searchParam[2].documentation
== "planned | arrived | in-progress | onleave | finished | cancelled"
)
assert inst.rest[0].resource[34].searchParam[2].name == "status"
assert inst.rest[0].resource[34].searchParam[2].type == "token"
assert (
inst.rest[0].resource[34].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/encounter-reason"
)
assert (
inst.rest[0].resource[34].searchParam[3].documentation
== "Reason the encounter takes place (code)"
)
assert inst.rest[0].resource[34].searchParam[3].name == "reason"
assert inst.rest[0].resource[34].searchParam[3].type == "token"
assert (
inst.rest[0].resource[34].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/encounter-condition"
)
assert (
inst.rest[0].resource[34].searchParam[4].documentation
== "Reason the encounter takes place (resource)"
)
assert inst.rest[0].resource[34].searchParam[4].name == "condition"
assert inst.rest[0].resource[34].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/encounter-location"
)
assert (
inst.rest[0].resource[34].searchParam[5].documentation
== "Location the encounter takes place"
)
assert inst.rest[0].resource[34].searchParam[5].name == "location"
assert inst.rest[0].resource[34].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/encounter-indication"
)
assert (
inst.rest[0].resource[34].searchParam[6].documentation
== "Reason the encounter takes place (resource)"
)
assert inst.rest[0].resource[34].searchParam[6].name == "indication"
assert inst.rest[0].resource[34].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/encounter-type"
)
assert (
inst.rest[0].resource[34].searchParam[7].documentation
== "Specific type of encounter"
)
assert inst.rest[0].resource[34].searchParam[7].name == "type"
assert inst.rest[0].resource[34].searchParam[7].type == "token"
assert (
inst.rest[0].resource[34].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/encounter-date"
)
assert (
inst.rest[0].resource[34].searchParam[8].documentation
== "A date within the period the Encounter lasted"
)
assert inst.rest[0].resource[34].searchParam[8].name == "date"
assert inst.rest[0].resource[34].searchParam[8].type == "date"
assert (
inst.rest[0].resource[34].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/encounter-special-arrangement"
)
assert (
inst.rest[0].resource[34].searchParam[9].documentation
== "Wheelchair, translator, stretcher, etc."
)
assert inst.rest[0].resource[34].searchParam[9].name == "special-arrangement"
assert inst.rest[0].resource[34].searchParam[9].type == "token"
assert (
inst.rest[0].resource[34].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/encounter-part-of"
)
assert (
inst.rest[0].resource[34].searchParam[10].documentation
== "Another Encounter this encounter is part of"
)
assert inst.rest[0].resource[34].searchParam[10].name == "part-of"
assert inst.rest[0].resource[34].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/encounter-appointment"
)
assert (
inst.rest[0].resource[34].searchParam[11].documentation
== "The appointment that scheduled this encounter"
)
assert inst.rest[0].resource[34].searchParam[11].name == "appointment"
assert inst.rest[0].resource[34].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/encounter-patient"
)
assert (
inst.rest[0].resource[34].searchParam[12].documentation
== "The patient present at the encounter"
)
assert inst.rest[0].resource[34].searchParam[12].name == "patient"
assert inst.rest[0].resource[34].searchParam[12].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/encounter-practitioner"
)
assert (
inst.rest[0].resource[34].searchParam[13].documentation
== "Persons involved in the encounter other than the patient"
)
assert inst.rest[0].resource[34].searchParam[13].name == "practitioner"
assert inst.rest[0].resource[34].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/encounter-length"
)
assert (
inst.rest[0].resource[34].searchParam[14].documentation
== "Length of encounter in days"
)
assert inst.rest[0].resource[34].searchParam[14].name == "length"
assert inst.rest[0].resource[34].searchParam[14].type == "number"
assert (
inst.rest[0].resource[34].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/encounter-participant"
)
assert (
inst.rest[0].resource[34].searchParam[15].documentation
== "Persons involved in the encounter other than the patient"
)
assert inst.rest[0].resource[34].searchParam[15].name == "participant"
assert inst.rest[0].resource[34].searchParam[15].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/encounter-incomingreferral"
)
assert (
inst.rest[0].resource[34].searchParam[16].documentation
== "The ReferralRequest that initiated this encounter"
)
assert inst.rest[0].resource[34].searchParam[16].name == "incomingreferral"
assert inst.rest[0].resource[34].searchParam[16].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/encounter-identifier"
)
assert (
inst.rest[0].resource[34].searchParam[17].documentation
== "Identifier(s) by which this encounter is known"
)
assert inst.rest[0].resource[34].searchParam[17].name == "identifier"
assert inst.rest[0].resource[34].searchParam[17].type == "token"
assert (
inst.rest[0].resource[34].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/encounter-procedure"
)
assert (
inst.rest[0].resource[34].searchParam[18].documentation
== "Reason the encounter takes place (resource)"
)
assert inst.rest[0].resource[34].searchParam[18].name == "procedure"
assert inst.rest[0].resource[34].searchParam[18].type == "reference"
assert (
inst.rest[0].resource[34].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/encounter-location-period"
)
assert (
inst.rest[0].resource[34].searchParam[19].documentation
== "Time period during which the patient was present at the location"
)
assert inst.rest[0].resource[34].searchParam[19].name == "location-period"
assert inst.rest[0].resource[34].searchParam[19].type == "date"
assert inst.rest[0].resource[34].searchRevInclude[0] == "Communication.encounter"
assert (
inst.rest[0].resource[34].searchRevInclude[1]
== "CommunicationRequest.encounter"
)
assert inst.rest[0].resource[34].searchRevInclude[2] == "Composition.encounter"
assert inst.rest[0].resource[34].searchRevInclude[3] == "Condition.encounter"
assert inst.rest[0].resource[34].searchRevInclude[4] == "DiagnosticOrder.encounter"
assert inst.rest[0].resource[34].searchRevInclude[5] == "DiagnosticReport.encounter"
assert (
inst.rest[0].resource[34].searchRevInclude[6] == "DocumentReference.encounter"
)
assert inst.rest[0].resource[34].searchRevInclude[7] == "Encounter.part-of"
assert inst.rest[0].resource[34].searchRevInclude[8] == "Flag.encounter"
assert inst.rest[0].resource[34].searchRevInclude[9] == "List.encounter"
assert (
inst.rest[0].resource[34].searchRevInclude[10]
== "MedicationAdministration.encounter"
)
assert inst.rest[0].resource[34].searchRevInclude[11] == "MedicationOrder.encounter"
assert inst.rest[0].resource[34].searchRevInclude[12] == "NutritionOrder.encounter"
assert inst.rest[0].resource[34].searchRevInclude[13] == "Observation.encounter"
assert inst.rest[0].resource[34].searchRevInclude[14] == "Procedure.encounter"
assert (
inst.rest[0].resource[34].searchRevInclude[15] == "ProcedureRequest.encounter"
)
assert (
inst.rest[0].resource[34].searchRevInclude[16]
== "QuestionnaireResponse.encounter"
)
assert inst.rest[0].resource[34].searchRevInclude[17] == "RiskAssessment.encounter"
assert (
inst.rest[0].resource[34].searchRevInclude[18] == "VisionPrescription.encounter"
)
assert inst.rest[0].resource[34].type == "Encounter"
assert inst.rest[0].resource[35].conditionalCreate == True
assert inst.rest[0].resource[35].conditionalDelete == "multiple"
assert inst.rest[0].resource[35].conditionalUpdate == True
assert inst.rest[0].resource[35].interaction[0].code == "read"
assert (
inst.rest[0].resource[35].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[1].code == "vread"
assert (
inst.rest[0].resource[35].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[2].code == "update"
assert (
inst.rest[0].resource[35].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[3].code == "delete"
assert (
inst.rest[0].resource[35].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[35].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[5].code == "validate"
assert (
inst.rest[0].resource[35].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[35].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[7].code == "create"
assert (
inst.rest[0].resource[35].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[35].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[35].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[35].profile.reference
== "http://hl7.org/fhir/StructureDefinition/EnrollmentRequest"
)
assert inst.rest[0].resource[35].searchInclude[0] == "EnrollmentRequest.patient"
assert inst.rest[0].resource[35].searchInclude[1] == "EnrollmentRequest.subject"
assert (
inst.rest[0].resource[35].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/enrollmentrequest-patient"
)
assert (
inst.rest[0].resource[35].searchParam[0].documentation
== "The party to be enrolled"
)
assert inst.rest[0].resource[35].searchParam[0].name == "patient"
assert inst.rest[0].resource[35].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[35].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/enrollmentrequest-subject"
)
assert (
inst.rest[0].resource[35].searchParam[1].documentation
== "The party to be enrolled"
)
assert inst.rest[0].resource[35].searchParam[1].name == "subject"
assert inst.rest[0].resource[35].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[35].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/enrollmentrequest-identifier"
)
assert (
inst.rest[0].resource[35].searchParam[2].documentation
== "The business identifier of the Enrollment"
)
assert inst.rest[0].resource[35].searchParam[2].name == "identifier"
assert inst.rest[0].resource[35].searchParam[2].type == "token"
assert inst.rest[0].resource[35].type == "EnrollmentRequest"
assert inst.rest[0].resource[36].conditionalCreate == True
assert inst.rest[0].resource[36].conditionalDelete == "multiple"
assert inst.rest[0].resource[36].conditionalUpdate == True
assert inst.rest[0].resource[36].interaction[0].code == "read"
assert (
inst.rest[0].resource[36].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[1].code == "vread"
assert (
inst.rest[0].resource[36].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[2].code == "update"
assert (
inst.rest[0].resource[36].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[3].code == "delete"
assert (
inst.rest[0].resource[36].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[36].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[5].code == "validate"
assert (
inst.rest[0].resource[36].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[36].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[7].code == "create"
assert (
inst.rest[0].resource[36].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[36].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[36].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[36].profile.reference
== "http://hl7.org/fhir/StructureDefinition/EnrollmentResponse"
)
assert (
inst.rest[0].resource[36].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/enrollmentresponse-identifier"
)
assert (
inst.rest[0].resource[36].searchParam[0].documentation
== "The business identifier of the Explanation of Benefit"
)
assert inst.rest[0].resource[36].searchParam[0].name == "identifier"
assert inst.rest[0].resource[36].searchParam[0].type == "token"
assert inst.rest[0].resource[36].type == "EnrollmentResponse"
assert inst.rest[0].resource[37].conditionalCreate == True
assert inst.rest[0].resource[37].conditionalDelete == "multiple"
assert inst.rest[0].resource[37].conditionalUpdate == True
assert inst.rest[0].resource[37].interaction[0].code == "read"
assert (
inst.rest[0].resource[37].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[1].code == "vread"
assert (
inst.rest[0].resource[37].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[2].code == "update"
assert (
inst.rest[0].resource[37].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[3].code == "delete"
assert (
inst.rest[0].resource[37].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[37].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[5].code == "validate"
assert (
inst.rest[0].resource[37].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[37].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[7].code == "create"
assert (
inst.rest[0].resource[37].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[37].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[37].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[37].profile.reference
== "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
)
assert inst.rest[0].resource[37].searchInclude[0] == "EpisodeOfCare.organization"
assert inst.rest[0].resource[37].searchInclude[1] == "EpisodeOfCare.patient"
assert inst.rest[0].resource[37].searchInclude[2] == "EpisodeOfCare.condition"
assert inst.rest[0].resource[37].searchInclude[3] == "EpisodeOfCare.care-manager"
assert (
inst.rest[0].resource[37].searchInclude[4] == "EpisodeOfCare.incomingreferral"
)
assert inst.rest[0].resource[37].searchInclude[5] == "EpisodeOfCare.team-member"
assert (
inst.rest[0].resource[37].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-organization"
)
assert (
inst.rest[0].resource[37].searchParam[0].documentation
== "The organization that has assumed the specific responsibilities of this EpisodeOfCare"
)
assert inst.rest[0].resource[37].searchParam[0].name == "organization"
assert inst.rest[0].resource[37].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[37].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-patient"
)
assert (
inst.rest[0].resource[37].searchParam[1].documentation
== "Patient for this episode of care"
)
assert inst.rest[0].resource[37].searchParam[1].name == "patient"
assert inst.rest[0].resource[37].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[37].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-condition"
)
assert (
inst.rest[0].resource[37].searchParam[2].documentation
== "Conditions/problems/diagnoses this episode of care is for"
)
assert inst.rest[0].resource[37].searchParam[2].name == "condition"
assert inst.rest[0].resource[37].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[37].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-status"
)
assert (
inst.rest[0].resource[37].searchParam[3].documentation
== "The current status of the Episode of Care as provided (does not check the status history collection)"
)
assert inst.rest[0].resource[37].searchParam[3].name == "status"
assert inst.rest[0].resource[37].searchParam[3].type == "token"
assert (
inst.rest[0].resource[37].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-care-manager"
)
assert (
inst.rest[0].resource[37].searchParam[4].documentation
== "Care manager/care co-ordinator for the patient"
)
assert inst.rest[0].resource[37].searchParam[4].name == "care-manager"
assert inst.rest[0].resource[37].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[37].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-type"
)
assert (
inst.rest[0].resource[37].searchParam[5].documentation
== "Type/class - e.g. specialist referral, disease management"
)
assert inst.rest[0].resource[37].searchParam[5].name == "type"
assert inst.rest[0].resource[37].searchParam[5].type == "token"
assert (
inst.rest[0].resource[37].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-date"
)
assert (
inst.rest[0].resource[37].searchParam[6].documentation
== "The provided date search value falls within the episode of care's period"
)
assert inst.rest[0].resource[37].searchParam[6].name == "date"
assert inst.rest[0].resource[37].searchParam[6].type == "date"
assert (
inst.rest[0].resource[37].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-incomingreferral"
)
assert (
inst.rest[0].resource[37].searchParam[7].documentation
== "Incoming Referral Request"
)
assert inst.rest[0].resource[37].searchParam[7].name == "incomingreferral"
assert inst.rest[0].resource[37].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[37].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-identifier"
)
assert (
inst.rest[0].resource[37].searchParam[8].documentation
== "Identifier(s) for the EpisodeOfCare"
)
assert inst.rest[0].resource[37].searchParam[8].name == "identifier"
assert inst.rest[0].resource[37].searchParam[8].type == "token"
assert (
inst.rest[0].resource[37].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/episodeofcare-team-member"
)
assert (
inst.rest[0].resource[37].searchParam[9].documentation
== "A Practitioner or Organization allocated to the care team for this EpisodeOfCare"
)
assert inst.rest[0].resource[37].searchParam[9].name == "team-member"
assert inst.rest[0].resource[37].searchParam[9].type == "reference"
assert inst.rest[0].resource[37].searchRevInclude[0] == "Encounter.episodeofcare"
assert inst.rest[0].resource[37].type == "EpisodeOfCare"
assert inst.rest[0].resource[38].conditionalCreate == True
assert inst.rest[0].resource[38].conditionalDelete == "multiple"
assert inst.rest[0].resource[38].conditionalUpdate == True
assert inst.rest[0].resource[38].interaction[0].code == "read"
assert (
inst.rest[0].resource[38].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[1].code == "vread"
assert (
inst.rest[0].resource[38].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[2].code == "update"
assert (
inst.rest[0].resource[38].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[3].code == "delete"
assert (
inst.rest[0].resource[38].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[38].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[5].code == "validate"
assert (
inst.rest[0].resource[38].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[38].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[7].code == "create"
assert (
inst.rest[0].resource[38].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[38].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[38].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[38].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit"
)
assert (
inst.rest[0].resource[38].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/explanationofbenefit-identifier"
)
assert (
inst.rest[0].resource[38].searchParam[0].documentation
== "The business identifier of the Explanation of Benefit"
)
assert inst.rest[0].resource[38].searchParam[0].name == "identifier"
assert inst.rest[0].resource[38].searchParam[0].type == "token"
assert inst.rest[0].resource[38].type == "ExplanationOfBenefit"
assert inst.rest[0].resource[39].conditionalCreate == True
assert inst.rest[0].resource[39].conditionalDelete == "multiple"
assert inst.rest[0].resource[39].conditionalUpdate == True
assert inst.rest[0].resource[39].interaction[0].code == "read"
assert (
inst.rest[0].resource[39].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[1].code == "vread"
assert (
inst.rest[0].resource[39].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[2].code == "update"
assert (
inst.rest[0].resource[39].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[3].code == "delete"
assert (
inst.rest[0].resource[39].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[39].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[5].code == "validate"
assert (
inst.rest[0].resource[39].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[39].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[7].code == "create"
assert (
inst.rest[0].resource[39].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[39].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[39].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[39].profile.reference
== "http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"
)
assert inst.rest[0].resource[39].searchInclude[0] == "FamilyMemberHistory.patient"
assert (
inst.rest[0].resource[39].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-relationship"
)
assert (
inst.rest[0].resource[39].searchParam[0].documentation
== "A search by a relationship type"
)
assert inst.rest[0].resource[39].searchParam[0].name == "relationship"
assert inst.rest[0].resource[39].searchParam[0].type == "token"
assert (
inst.rest[0].resource[39].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-patient"
)
assert (
inst.rest[0].resource[39].searchParam[1].documentation
== "The identity of a subject to list family member history items for"
)
assert inst.rest[0].resource[39].searchParam[1].name == "patient"
assert inst.rest[0].resource[39].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[39].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-gender"
)
assert (
inst.rest[0].resource[39].searchParam[2].documentation
== "A search by a gender code of a family member"
)
assert inst.rest[0].resource[39].searchParam[2].name == "gender"
assert inst.rest[0].resource[39].searchParam[2].type == "token"
assert (
inst.rest[0].resource[39].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-code"
)
assert (
inst.rest[0].resource[39].searchParam[3].documentation
== "A search by a condition code"
)
assert inst.rest[0].resource[39].searchParam[3].name == "code"
assert inst.rest[0].resource[39].searchParam[3].type == "token"
assert (
inst.rest[0].resource[39].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-date"
)
assert (
inst.rest[0].resource[39].searchParam[4].documentation
== "When history was captured/updated"
)
assert inst.rest[0].resource[39].searchParam[4].name == "date"
assert inst.rest[0].resource[39].searchParam[4].type == "date"
assert (
inst.rest[0].resource[39].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/familymemberhistory-identifier"
)
assert (
inst.rest[0].resource[39].searchParam[5].documentation
== "A search by a record identifier"
)
assert inst.rest[0].resource[39].searchParam[5].name == "identifier"
assert inst.rest[0].resource[39].searchParam[5].type == "token"
assert (
inst.rest[0].resource[39].searchRevInclude[0]
== "ClinicalImpression.investigation"
)
assert inst.rest[0].resource[39].type == "FamilyMemberHistory"
assert inst.rest[0].resource[40].conditionalCreate == True
assert inst.rest[0].resource[40].conditionalDelete == "multiple"
assert inst.rest[0].resource[40].conditionalUpdate == True
assert inst.rest[0].resource[40].interaction[0].code == "read"
assert (
inst.rest[0].resource[40].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[1].code == "vread"
assert (
inst.rest[0].resource[40].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[2].code == "update"
assert (
inst.rest[0].resource[40].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[3].code == "delete"
assert (
inst.rest[0].resource[40].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[40].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[5].code == "validate"
assert (
inst.rest[0].resource[40].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[40].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[7].code == "create"
assert (
inst.rest[0].resource[40].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[40].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[40].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[40].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Flag"
)
assert inst.rest[0].resource[40].searchInclude[0] == "Flag.author"
assert inst.rest[0].resource[40].searchInclude[1] == "Flag.patient"
assert inst.rest[0].resource[40].searchInclude[2] == "Flag.subject"
assert inst.rest[0].resource[40].searchInclude[3] == "Flag.encounter"
assert (
inst.rest[0].resource[40].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/flag-author"
)
assert inst.rest[0].resource[40].searchParam[0].documentation == "Flag creator"
assert inst.rest[0].resource[40].searchParam[0].name == "author"
assert inst.rest[0].resource[40].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[40].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/flag-patient"
)
assert (
inst.rest[0].resource[40].searchParam[1].documentation
== "The identity of a subject to list flags for"
)
assert inst.rest[0].resource[40].searchParam[1].name == "patient"
assert inst.rest[0].resource[40].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[40].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/flag-subject"
)
assert (
inst.rest[0].resource[40].searchParam[2].documentation
== "The identity of a subject to list flags for"
)
assert inst.rest[0].resource[40].searchParam[2].name == "subject"
assert inst.rest[0].resource[40].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[40].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/flag-encounter"
)
assert (
inst.rest[0].resource[40].searchParam[3].documentation
== "Alert relevant during encounter"
)
assert inst.rest[0].resource[40].searchParam[3].name == "encounter"
assert inst.rest[0].resource[40].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[40].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/flag-date"
)
assert (
inst.rest[0].resource[40].searchParam[4].documentation
== "Time period when flag is active"
)
assert inst.rest[0].resource[40].searchParam[4].name == "date"
assert inst.rest[0].resource[40].searchParam[4].type == "date"
assert inst.rest[0].resource[40].type == "Flag"
assert inst.rest[0].resource[41].conditionalCreate == True
assert inst.rest[0].resource[41].conditionalDelete == "multiple"
assert inst.rest[0].resource[41].conditionalUpdate == True
assert inst.rest[0].resource[41].interaction[0].code == "read"
assert (
inst.rest[0].resource[41].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[1].code == "vread"
assert (
inst.rest[0].resource[41].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[2].code == "update"
assert (
inst.rest[0].resource[41].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[3].code == "delete"
assert (
inst.rest[0].resource[41].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[41].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[5].code == "validate"
assert (
inst.rest[0].resource[41].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[41].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[7].code == "create"
assert (
inst.rest[0].resource[41].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[41].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[41].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[41].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Goal"
)
assert inst.rest[0].resource[41].searchInclude[0] == "Goal.patient"
assert inst.rest[0].resource[41].searchInclude[1] == "Goal.subject"
assert (
inst.rest[0].resource[41].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/goal-targetdate"
)
assert (
inst.rest[0].resource[41].searchParam[0].documentation
== "Reach goal on or before"
)
assert inst.rest[0].resource[41].searchParam[0].name == "targetdate"
assert inst.rest[0].resource[41].searchParam[0].type == "date"
assert (
inst.rest[0].resource[41].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/goal-category"
)
assert (
inst.rest[0].resource[41].searchParam[1].documentation
== "E.g. Treatment, dietary, behavioral, etc."
)
assert inst.rest[0].resource[41].searchParam[1].name == "category"
assert inst.rest[0].resource[41].searchParam[1].type == "token"
assert (
inst.rest[0].resource[41].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/goal-patient"
)
assert (
inst.rest[0].resource[41].searchParam[2].documentation
== "Who this goal is intended for"
)
assert inst.rest[0].resource[41].searchParam[2].name == "patient"
assert inst.rest[0].resource[41].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[41].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/goal-status"
)
assert (
inst.rest[0].resource[41].searchParam[3].documentation
== "proposed | planned | accepted | rejected | in-progress | achieved | sustaining | on-hold | cancelled"
)
assert inst.rest[0].resource[41].searchParam[3].name == "status"
assert inst.rest[0].resource[41].searchParam[3].type == "token"
assert (
inst.rest[0].resource[41].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/goal-subject"
)
assert (
inst.rest[0].resource[41].searchParam[4].documentation
== "Who this goal is intended for"
)
assert inst.rest[0].resource[41].searchParam[4].name == "subject"
assert inst.rest[0].resource[41].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[41].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/goal-identifier"
)
assert (
inst.rest[0].resource[41].searchParam[5].documentation
== "External Ids for this goal"
)
assert inst.rest[0].resource[41].searchParam[5].name == "identifier"
assert inst.rest[0].resource[41].searchParam[5].type == "token"
assert inst.rest[0].resource[41].searchRevInclude[0] == "CarePlan.goal"
assert inst.rest[0].resource[41].type == "Goal"
assert inst.rest[0].resource[42].conditionalCreate == True
assert inst.rest[0].resource[42].conditionalDelete == "multiple"
assert inst.rest[0].resource[42].conditionalUpdate == True
assert inst.rest[0].resource[42].interaction[0].code == "read"
assert (
inst.rest[0].resource[42].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[1].code == "vread"
assert (
inst.rest[0].resource[42].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[2].code == "update"
assert (
inst.rest[0].resource[42].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[3].code == "delete"
assert (
inst.rest[0].resource[42].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[42].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[5].code == "validate"
assert (
inst.rest[0].resource[42].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[42].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[7].code == "create"
assert (
inst.rest[0].resource[42].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[42].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[42].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[42].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Group"
)
assert inst.rest[0].resource[42].searchInclude[0] == "Group.member"
assert (
inst.rest[0].resource[42].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/group-member"
)
assert (
inst.rest[0].resource[42].searchParam[0].documentation
== "Reference to the group member"
)
assert inst.rest[0].resource[42].searchParam[0].name == "member"
assert inst.rest[0].resource[42].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[42].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/group-characteristic-value"
)
assert (
inst.rest[0].resource[42].searchParam[1].documentation
== "A composite of both characteristic and value"
)
assert inst.rest[0].resource[42].searchParam[1].name == "characteristic-value"
assert inst.rest[0].resource[42].searchParam[1].type == "composite"
assert (
inst.rest[0].resource[42].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/group-value"
)
assert (
inst.rest[0].resource[42].searchParam[2].documentation
== "Value held by characteristic"
)
assert inst.rest[0].resource[42].searchParam[2].name == "value"
assert inst.rest[0].resource[42].searchParam[2].type == "token"
assert (
inst.rest[0].resource[42].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/group-actual"
)
assert (
inst.rest[0].resource[42].searchParam[3].documentation
== "Descriptive or actual"
)
assert inst.rest[0].resource[42].searchParam[3].name == "actual"
assert inst.rest[0].resource[42].searchParam[3].type == "token"
assert (
inst.rest[0].resource[42].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/group-exclude"
)
assert (
inst.rest[0].resource[42].searchParam[4].documentation
== "Group includes or excludes"
)
assert inst.rest[0].resource[42].searchParam[4].name == "exclude"
assert inst.rest[0].resource[42].searchParam[4].type == "token"
assert (
inst.rest[0].resource[42].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/group-code"
)
assert (
inst.rest[0].resource[42].searchParam[5].documentation
== "The kind of resources contained"
)
assert inst.rest[0].resource[42].searchParam[5].name == "code"
assert inst.rest[0].resource[42].searchParam[5].type == "token"
assert (
inst.rest[0].resource[42].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/group-characteristic"
)
assert (
inst.rest[0].resource[42].searchParam[6].documentation
== "Kind of characteristic"
)
assert inst.rest[0].resource[42].searchParam[6].name == "characteristic"
assert inst.rest[0].resource[42].searchParam[6].type == "token"
assert (
inst.rest[0].resource[42].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/group-type"
)
assert (
inst.rest[0].resource[42].searchParam[7].documentation
== "The type of resources the group contains"
)
assert inst.rest[0].resource[42].searchParam[7].name == "type"
assert inst.rest[0].resource[42].searchParam[7].type == "token"
assert (
inst.rest[0].resource[42].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/group-identifier"
)
assert inst.rest[0].resource[42].searchParam[8].documentation == "Unique id"
assert inst.rest[0].resource[42].searchParam[8].name == "identifier"
assert inst.rest[0].resource[42].searchParam[8].type == "token"
assert inst.rest[0].resource[42].searchRevInclude[0] == "CarePlan.subject"
assert inst.rest[0].resource[42].searchRevInclude[1] == "CarePlan.patient"
assert inst.rest[0].resource[42].searchRevInclude[2] == "Communication.recipient"
assert inst.rest[0].resource[42].searchRevInclude[3] == "Contract.actor"
assert inst.rest[0].resource[42].searchRevInclude[4] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[42].searchRevInclude[5] == "DiagnosticOrder.patient"
assert inst.rest[0].resource[42].searchRevInclude[6] == "DiagnosticReport.subject"
assert inst.rest[0].resource[42].searchRevInclude[7] == "DiagnosticReport.patient"
assert inst.rest[0].resource[42].searchRevInclude[8] == "DocumentManifest.subject"
assert inst.rest[0].resource[42].searchRevInclude[9] == "DocumentManifest.patient"
assert inst.rest[0].resource[42].searchRevInclude[10] == "DocumentReference.subject"
assert inst.rest[0].resource[42].searchRevInclude[11] == "DocumentReference.patient"
assert inst.rest[0].resource[42].searchRevInclude[12] == "Flag.patient"
assert inst.rest[0].resource[42].searchRevInclude[13] == "Flag.subject"
assert inst.rest[0].resource[42].searchRevInclude[14] == "Goal.patient"
assert inst.rest[0].resource[42].searchRevInclude[15] == "Goal.subject"
assert inst.rest[0].resource[42].searchRevInclude[16] == "List.patient"
assert inst.rest[0].resource[42].searchRevInclude[17] == "List.subject"
assert inst.rest[0].resource[42].searchRevInclude[18] == "Media.patient"
assert inst.rest[0].resource[42].searchRevInclude[19] == "Media.subject"
assert inst.rest[0].resource[42].searchRevInclude[20] == "Observation.subject"
assert inst.rest[0].resource[42].searchRevInclude[21] == "Observation.patient"
assert inst.rest[0].resource[42].searchRevInclude[22] == "Order.patient"
assert inst.rest[0].resource[42].searchRevInclude[23] == "Order.subject"
assert inst.rest[0].resource[42].searchRevInclude[24] == "Procedure.patient"
assert inst.rest[0].resource[42].searchRevInclude[25] == "Procedure.subject"
assert inst.rest[0].resource[42].searchRevInclude[26] == "ProcedureRequest.patient"
assert inst.rest[0].resource[42].searchRevInclude[27] == "ProcedureRequest.subject"
assert inst.rest[0].resource[42].searchRevInclude[28] == "RiskAssessment.patient"
assert inst.rest[0].resource[42].searchRevInclude[29] == "RiskAssessment.subject"
assert inst.rest[0].resource[42].searchRevInclude[30] == "Specimen.patient"
assert inst.rest[0].resource[42].searchRevInclude[31] == "Specimen.subject"
assert inst.rest[0].resource[42].type == "Group"
assert inst.rest[0].resource[43].conditionalCreate == True
assert inst.rest[0].resource[43].conditionalDelete == "multiple"
assert inst.rest[0].resource[43].conditionalUpdate == True
assert inst.rest[0].resource[43].interaction[0].code == "read"
assert (
inst.rest[0].resource[43].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[1].code == "vread"
assert (
inst.rest[0].resource[43].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[2].code == "update"
assert (
inst.rest[0].resource[43].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[3].code == "delete"
assert (
inst.rest[0].resource[43].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[43].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[5].code == "validate"
assert (
inst.rest[0].resource[43].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[43].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[7].code == "create"
assert (
inst.rest[0].resource[43].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[43].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[43].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[43].profile.reference
== "http://hl7.org/fhir/StructureDefinition/HealthcareService"
)
assert (
inst.rest[0].resource[43].searchInclude[0] == "HealthcareService.organization"
)
assert inst.rest[0].resource[43].searchInclude[1] == "HealthcareService.location"
assert (
inst.rest[0].resource[43].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-servicecategory"
)
assert (
inst.rest[0].resource[43].searchParam[0].documentation
== "Service Category of the Healthcare Service"
)
assert inst.rest[0].resource[43].searchParam[0].name == "servicecategory"
assert inst.rest[0].resource[43].searchParam[0].type == "token"
assert (
inst.rest[0].resource[43].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-organization"
)
assert (
inst.rest[0].resource[43].searchParam[1].documentation
== "The organization that provides this Healthcare Service"
)
assert inst.rest[0].resource[43].searchParam[1].name == "organization"
assert inst.rest[0].resource[43].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[43].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-servicetype"
)
assert (
inst.rest[0].resource[43].searchParam[2].documentation
== "The type of service provided by this healthcare service"
)
assert inst.rest[0].resource[43].searchParam[2].name == "servicetype"
assert inst.rest[0].resource[43].searchParam[2].type == "token"
assert (
inst.rest[0].resource[43].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-location"
)
assert (
inst.rest[0].resource[43].searchParam[3].documentation
== "The location of the Healthcare Service"
)
assert inst.rest[0].resource[43].searchParam[3].name == "location"
assert inst.rest[0].resource[43].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[43].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-name"
)
assert (
inst.rest[0].resource[43].searchParam[4].documentation
== "A portion of the Healthcare service name"
)
assert inst.rest[0].resource[43].searchParam[4].name == "name"
assert inst.rest[0].resource[43].searchParam[4].type == "string"
assert (
inst.rest[0].resource[43].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-programname"
)
assert (
inst.rest[0].resource[43].searchParam[5].documentation
== "One of the Program Names serviced by this HealthcareService"
)
assert inst.rest[0].resource[43].searchParam[5].name == "programname"
assert inst.rest[0].resource[43].searchParam[5].type == "string"
assert (
inst.rest[0].resource[43].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-characteristic"
)
assert (
inst.rest[0].resource[43].searchParam[6].documentation
== "One of the HealthcareService's characteristics"
)
assert inst.rest[0].resource[43].searchParam[6].name == "characteristic"
assert inst.rest[0].resource[43].searchParam[6].type == "token"
assert (
inst.rest[0].resource[43].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/healthcareservice-identifier"
)
assert (
inst.rest[0].resource[43].searchParam[7].documentation
== "External identifiers for this item"
)
assert inst.rest[0].resource[43].searchParam[7].name == "identifier"
assert inst.rest[0].resource[43].searchParam[7].type == "token"
assert inst.rest[0].resource[43].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[43].searchRevInclude[1] == "Account.subject"
assert inst.rest[0].resource[43].searchRevInclude[2] == "Appointment.patient"
assert inst.rest[0].resource[43].searchRevInclude[3] == "Appointment.practitioner"
assert inst.rest[0].resource[43].searchRevInclude[4] == "Appointment.location"
assert inst.rest[0].resource[43].searchRevInclude[5] == "Appointment.actor"
assert (
inst.rest[0].resource[43].searchRevInclude[6] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[43].searchRevInclude[7]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[43].searchRevInclude[8] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[43].searchRevInclude[9] == "AppointmentResponse.actor"
assert inst.rest[0].resource[43].searchRevInclude[10] == "Schedule.actor"
assert inst.rest[0].resource[43].type == "HealthcareService"
assert inst.rest[0].resource[44].conditionalCreate == True
assert inst.rest[0].resource[44].conditionalDelete == "multiple"
assert inst.rest[0].resource[44].conditionalUpdate == True
assert inst.rest[0].resource[44].interaction[0].code == "read"
assert (
inst.rest[0].resource[44].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[1].code == "vread"
assert (
inst.rest[0].resource[44].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[2].code == "update"
assert (
inst.rest[0].resource[44].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[3].code == "delete"
assert (
inst.rest[0].resource[44].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[44].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[5].code == "validate"
assert (
inst.rest[0].resource[44].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[44].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[7].code == "create"
assert (
inst.rest[0].resource[44].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[44].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[44].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[44].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ImagingObjectSelection"
)
assert inst.rest[0].resource[44].searchInclude[0] == "ImagingObjectSelection.author"
assert (
inst.rest[0].resource[44].searchInclude[1] == "ImagingObjectSelection.patient"
)
assert (
inst.rest[0].resource[44].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-selected-study"
)
assert (
inst.rest[0].resource[44].searchParam[0].documentation
== "Study selected in key DICOM object selection"
)
assert inst.rest[0].resource[44].searchParam[0].name == "selected-study"
assert inst.rest[0].resource[44].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[44].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-author"
)
assert (
inst.rest[0].resource[44].searchParam[1].documentation
== "Author of key DICOM object selection"
)
assert inst.rest[0].resource[44].searchParam[1].name == "author"
assert inst.rest[0].resource[44].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[44].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-title"
)
assert (
inst.rest[0].resource[44].searchParam[2].documentation
== "Title of key DICOM object selection"
)
assert inst.rest[0].resource[44].searchParam[2].name == "title"
assert inst.rest[0].resource[44].searchParam[2].type == "token"
assert (
inst.rest[0].resource[44].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-patient"
)
assert (
inst.rest[0].resource[44].searchParam[3].documentation
== "Subject of key DICOM object selection"
)
assert inst.rest[0].resource[44].searchParam[3].name == "patient"
assert inst.rest[0].resource[44].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[44].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-authoring-time"
)
assert (
inst.rest[0].resource[44].searchParam[4].documentation
== "Time of key DICOM object selection authoring"
)
assert inst.rest[0].resource[44].searchParam[4].name == "authoring-time"
assert inst.rest[0].resource[44].searchParam[4].type == "date"
assert (
inst.rest[0].resource[44].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/imagingobjectselection-identifier"
)
assert (
inst.rest[0].resource[44].searchParam[5].documentation
== "UID of key DICOM object selection"
)
assert inst.rest[0].resource[44].searchParam[5].name == "identifier"
assert inst.rest[0].resource[44].searchParam[5].type == "uri"
assert inst.rest[0].resource[44].type == "ImagingObjectSelection"
assert inst.rest[0].resource[45].conditionalCreate == True
assert inst.rest[0].resource[45].conditionalDelete == "multiple"
assert inst.rest[0].resource[45].conditionalUpdate == True
assert inst.rest[0].resource[45].interaction[0].code == "read"
assert (
inst.rest[0].resource[45].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[1].code == "vread"
assert (
inst.rest[0].resource[45].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[2].code == "update"
assert (
inst.rest[0].resource[45].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[3].code == "delete"
assert (
inst.rest[0].resource[45].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[45].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[5].code == "validate"
assert (
inst.rest[0].resource[45].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[45].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[7].code == "create"
assert (
inst.rest[0].resource[45].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[45].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[45].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[45].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ImagingStudy"
)
assert inst.rest[0].resource[45].searchInclude[0] == "ImagingStudy.patient"
assert inst.rest[0].resource[45].searchInclude[1] == "ImagingStudy.order"
assert (
inst.rest[0].resource[45].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-uid"
)
assert (
inst.rest[0].resource[45].searchParam[0].documentation
== "The instance unique identifier"
)
assert inst.rest[0].resource[45].searchParam[0].name == "uid"
assert inst.rest[0].resource[45].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[45].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-series"
)
assert (
inst.rest[0].resource[45].searchParam[1].documentation
== "The identifier of the series of images"
)
assert inst.rest[0].resource[45].searchParam[1].name == "series"
assert inst.rest[0].resource[45].searchParam[1].type == "uri"
assert (
inst.rest[0].resource[45].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-patient"
)
assert (
inst.rest[0].resource[45].searchParam[2].documentation
== "Who the study is about"
)
assert inst.rest[0].resource[45].searchParam[2].name == "patient"
assert inst.rest[0].resource[45].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[45].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-order"
)
assert (
inst.rest[0].resource[45].searchParam[3].documentation
== "The order for the image"
)
assert inst.rest[0].resource[45].searchParam[3].name == "order"
assert inst.rest[0].resource[45].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[45].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-bodysite"
)
assert (
inst.rest[0].resource[45].searchParam[4].documentation
== "The body site studied"
)
assert inst.rest[0].resource[45].searchParam[4].name == "bodysite"
assert inst.rest[0].resource[45].searchParam[4].type == "token"
assert (
inst.rest[0].resource[45].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-accession"
)
assert (
inst.rest[0].resource[45].searchParam[5].documentation
== "The accession identifier for the study"
)
assert inst.rest[0].resource[45].searchParam[5].name == "accession"
assert inst.rest[0].resource[45].searchParam[5].type == "token"
assert (
inst.rest[0].resource[45].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-study"
)
assert (
inst.rest[0].resource[45].searchParam[6].documentation
== "The study identifier for the image"
)
assert inst.rest[0].resource[45].searchParam[6].name == "study"
assert inst.rest[0].resource[45].searchParam[6].type == "uri"
assert (
inst.rest[0].resource[45].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-modality"
)
assert (
inst.rest[0].resource[45].searchParam[7].documentation
== "The modality of the series"
)
assert inst.rest[0].resource[45].searchParam[7].name == "modality"
assert inst.rest[0].resource[45].searchParam[7].type == "token"
assert (
inst.rest[0].resource[45].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-started"
)
assert (
inst.rest[0].resource[45].searchParam[8].documentation
== "When the study was started"
)
assert inst.rest[0].resource[45].searchParam[8].name == "started"
assert inst.rest[0].resource[45].searchParam[8].type == "date"
assert (
inst.rest[0].resource[45].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/imagingstudy-dicom-class"
)
assert (
inst.rest[0].resource[45].searchParam[9].documentation
== "The type of the instance"
)
assert inst.rest[0].resource[45].searchParam[9].name == "dicom-class"
assert inst.rest[0].resource[45].searchParam[9].type == "uri"
assert inst.rest[0].resource[45].type == "ImagingStudy"
assert inst.rest[0].resource[46].conditionalCreate == True
assert inst.rest[0].resource[46].conditionalDelete == "multiple"
assert inst.rest[0].resource[46].conditionalUpdate == True
assert inst.rest[0].resource[46].interaction[0].code == "read"
assert (
inst.rest[0].resource[46].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[1].code == "vread"
assert (
inst.rest[0].resource[46].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[2].code == "update"
assert (
inst.rest[0].resource[46].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[3].code == "delete"
assert (
inst.rest[0].resource[46].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[46].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[5].code == "validate"
assert (
inst.rest[0].resource[46].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[46].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[7].code == "create"
assert (
inst.rest[0].resource[46].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[46].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[46].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[46].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Immunization"
)
assert inst.rest[0].resource[46].searchInclude[0] == "Immunization.reaction"
assert inst.rest[0].resource[46].searchInclude[1] == "Immunization.requester"
assert inst.rest[0].resource[46].searchInclude[2] == "Immunization.location"
assert inst.rest[0].resource[46].searchInclude[3] == "Immunization.patient"
assert inst.rest[0].resource[46].searchInclude[4] == "Immunization.manufacturer"
assert inst.rest[0].resource[46].searchInclude[5] == "Immunization.performer"
assert (
inst.rest[0].resource[46].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/immunization-reaction"
)
assert (
inst.rest[0].resource[46].searchParam[0].documentation
== "Additional information on reaction"
)
assert inst.rest[0].resource[46].searchParam[0].name == "reaction"
assert inst.rest[0].resource[46].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/immunization-requester"
)
assert (
inst.rest[0].resource[46].searchParam[1].documentation
== "The practitioner who ordered the vaccination"
)
assert inst.rest[0].resource[46].searchParam[1].name == "requester"
assert inst.rest[0].resource[46].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/immunization-dose-sequence"
)
assert (
inst.rest[0].resource[46].searchParam[2].documentation
== "Dose number within series"
)
assert inst.rest[0].resource[46].searchParam[2].name == "dose-sequence"
assert inst.rest[0].resource[46].searchParam[2].type == "number"
assert (
inst.rest[0].resource[46].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/immunization-status"
)
assert (
inst.rest[0].resource[46].searchParam[3].documentation
== "Immunization event status"
)
assert inst.rest[0].resource[46].searchParam[3].name == "status"
assert inst.rest[0].resource[46].searchParam[3].type == "token"
assert (
inst.rest[0].resource[46].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/immunization-location"
)
assert (
inst.rest[0].resource[46].searchParam[4].documentation
== "The service delivery location or facility in which the vaccine was / was to be administered"
)
assert inst.rest[0].resource[46].searchParam[4].name == "location"
assert inst.rest[0].resource[46].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/immunization-reason"
)
assert (
inst.rest[0].resource[46].searchParam[5].documentation
== "Why immunization occurred"
)
assert inst.rest[0].resource[46].searchParam[5].name == "reason"
assert inst.rest[0].resource[46].searchParam[5].type == "token"
assert (
inst.rest[0].resource[46].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/immunization-reaction-date"
)
assert (
inst.rest[0].resource[46].searchParam[6].documentation
== "When reaction started"
)
assert inst.rest[0].resource[46].searchParam[6].name == "reaction-date"
assert inst.rest[0].resource[46].searchParam[6].type == "date"
assert (
inst.rest[0].resource[46].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/immunization-notgiven"
)
assert (
inst.rest[0].resource[46].searchParam[7].documentation
== "Administrations which were not given"
)
assert inst.rest[0].resource[46].searchParam[7].name == "notgiven"
assert inst.rest[0].resource[46].searchParam[7].type == "token"
assert (
inst.rest[0].resource[46].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/immunization-date"
)
assert (
inst.rest[0].resource[46].searchParam[8].documentation
== "Vaccination (non)-Administration Date"
)
assert inst.rest[0].resource[46].searchParam[8].name == "date"
assert inst.rest[0].resource[46].searchParam[8].type == "date"
assert (
inst.rest[0].resource[46].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/immunization-reason-not-given"
)
assert (
inst.rest[0].resource[46].searchParam[9].documentation
== "Explanation of reason vaccination was not administered"
)
assert inst.rest[0].resource[46].searchParam[9].name == "reason-not-given"
assert inst.rest[0].resource[46].searchParam[9].type == "token"
assert (
inst.rest[0].resource[46].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/immunization-vaccine-code"
)
assert (
inst.rest[0].resource[46].searchParam[10].documentation
== "Vaccine Product Administered"
)
assert inst.rest[0].resource[46].searchParam[10].name == "vaccine-code"
assert inst.rest[0].resource[46].searchParam[10].type == "token"
assert (
inst.rest[0].resource[46].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/immunization-patient"
)
assert (
inst.rest[0].resource[46].searchParam[11].documentation
== "The patient for the vaccination record"
)
assert inst.rest[0].resource[46].searchParam[11].name == "patient"
assert inst.rest[0].resource[46].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/immunization-lot-number"
)
assert (
inst.rest[0].resource[46].searchParam[12].documentation == "Vaccine Lot Number"
)
assert inst.rest[0].resource[46].searchParam[12].name == "lot-number"
assert inst.rest[0].resource[46].searchParam[12].type == "string"
assert (
inst.rest[0].resource[46].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/immunization-manufacturer"
)
assert (
inst.rest[0].resource[46].searchParam[13].documentation
== "Vaccine Manufacturer"
)
assert inst.rest[0].resource[46].searchParam[13].name == "manufacturer"
assert inst.rest[0].resource[46].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/immunization-performer"
)
assert (
inst.rest[0].resource[46].searchParam[14].documentation
== "The practitioner who administered the vaccination"
)
assert inst.rest[0].resource[46].searchParam[14].name == "performer"
assert inst.rest[0].resource[46].searchParam[14].type == "reference"
assert (
inst.rest[0].resource[46].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/immunization-identifier"
)
assert (
inst.rest[0].resource[46].searchParam[15].documentation == "Business identifier"
)
assert inst.rest[0].resource[46].searchParam[15].name == "identifier"
assert inst.rest[0].resource[46].searchParam[15].type == "token"
assert (
inst.rest[0].resource[46].searchRevInclude[0]
== "ImmunizationRecommendation.support"
)
assert inst.rest[0].resource[46].type == "Immunization"
assert inst.rest[0].resource[47].conditionalCreate == True
assert inst.rest[0].resource[47].conditionalDelete == "multiple"
assert inst.rest[0].resource[47].conditionalUpdate == True
assert inst.rest[0].resource[47].interaction[0].code == "read"
assert (
inst.rest[0].resource[47].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[1].code == "vread"
assert (
inst.rest[0].resource[47].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[2].code == "update"
assert (
inst.rest[0].resource[47].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[3].code == "delete"
assert (
inst.rest[0].resource[47].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[47].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[5].code == "validate"
assert (
inst.rest[0].resource[47].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[47].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[7].code == "create"
assert (
inst.rest[0].resource[47].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[47].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[47].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[47].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
)
assert (
inst.rest[0].resource[47].searchInclude[0]
== "ImmunizationRecommendation.information"
)
assert (
inst.rest[0].resource[47].searchInclude[1]
== "ImmunizationRecommendation.patient"
)
assert (
inst.rest[0].resource[47].searchInclude[2]
== "ImmunizationRecommendation.support"
)
assert (
inst.rest[0].resource[47].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-information"
)
assert (
inst.rest[0].resource[47].searchParam[0].documentation
== "Patient observations supporting recommendation"
)
assert inst.rest[0].resource[47].searchParam[0].name == "information"
assert inst.rest[0].resource[47].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[47].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-dose-sequence"
)
assert (
inst.rest[0].resource[47].searchParam[1].documentation
== "Dose number within sequence"
)
assert inst.rest[0].resource[47].searchParam[1].name == "dose-sequence"
assert inst.rest[0].resource[47].searchParam[1].type == "number"
assert (
inst.rest[0].resource[47].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-patient"
)
assert (
inst.rest[0].resource[47].searchParam[2].documentation
== "Who this profile is for"
)
assert inst.rest[0].resource[47].searchParam[2].name == "patient"
assert inst.rest[0].resource[47].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[47].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-support"
)
assert (
inst.rest[0].resource[47].searchParam[3].documentation
== "Past immunizations supporting recommendation"
)
assert inst.rest[0].resource[47].searchParam[3].name == "support"
assert inst.rest[0].resource[47].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[47].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-vaccine-type"
)
assert (
inst.rest[0].resource[47].searchParam[4].documentation
== "Vaccine recommendation applies to"
)
assert inst.rest[0].resource[47].searchParam[4].name == "vaccine-type"
assert inst.rest[0].resource[47].searchParam[4].type == "token"
assert (
inst.rest[0].resource[47].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-status"
)
assert (
inst.rest[0].resource[47].searchParam[5].documentation
== "Vaccine administration status"
)
assert inst.rest[0].resource[47].searchParam[5].name == "status"
assert inst.rest[0].resource[47].searchParam[5].type == "token"
assert (
inst.rest[0].resource[47].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-dose-number"
)
assert (
inst.rest[0].resource[47].searchParam[6].documentation
== "Recommended dose number"
)
assert inst.rest[0].resource[47].searchParam[6].name == "dose-number"
assert inst.rest[0].resource[47].searchParam[6].type == "number"
assert (
inst.rest[0].resource[47].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-date"
)
assert (
inst.rest[0].resource[47].searchParam[7].documentation
== "Date recommendation created"
)
assert inst.rest[0].resource[47].searchParam[7].name == "date"
assert inst.rest[0].resource[47].searchParam[7].type == "date"
assert (
inst.rest[0].resource[47].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/immunizationrecommendation-identifier"
)
assert (
inst.rest[0].resource[47].searchParam[8].documentation == "Business identifier"
)
assert inst.rest[0].resource[47].searchParam[8].name == "identifier"
assert inst.rest[0].resource[47].searchParam[8].type == "token"
assert inst.rest[0].resource[47].type == "ImmunizationRecommendation"
assert inst.rest[0].resource[48].conditionalCreate == True
assert inst.rest[0].resource[48].conditionalDelete == "multiple"
assert inst.rest[0].resource[48].conditionalUpdate == True
assert inst.rest[0].resource[48].interaction[0].code == "read"
assert (
inst.rest[0].resource[48].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[1].code == "vread"
assert (
inst.rest[0].resource[48].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[2].code == "update"
assert (
inst.rest[0].resource[48].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[3].code == "delete"
assert (
inst.rest[0].resource[48].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[48].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[5].code == "validate"
assert (
inst.rest[0].resource[48].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[48].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[7].code == "create"
assert (
inst.rest[0].resource[48].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[48].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[48].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[48].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"
)
assert (
inst.rest[0].resource[48].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-dependency"
)
assert (
inst.rest[0].resource[48].searchParam[0].documentation
== "Where to find dependency"
)
assert inst.rest[0].resource[48].searchParam[0].name == "dependency"
assert inst.rest[0].resource[48].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[48].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-status"
)
assert (
inst.rest[0].resource[48].searchParam[1].documentation
== "The current status of the implementation guide"
)
assert inst.rest[0].resource[48].searchParam[1].name == "status"
assert inst.rest[0].resource[48].searchParam[1].type == "token"
assert (
inst.rest[0].resource[48].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-description"
)
assert (
inst.rest[0].resource[48].searchParam[2].documentation
== "Text search in the description of the implementation guide"
)
assert inst.rest[0].resource[48].searchParam[2].name == "description"
assert inst.rest[0].resource[48].searchParam[2].type == "string"
assert (
inst.rest[0].resource[48].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-name"
)
assert (
inst.rest[0].resource[48].searchParam[3].documentation
== "Name of the implementation guide"
)
assert inst.rest[0].resource[48].searchParam[3].name == "name"
assert inst.rest[0].resource[48].searchParam[3].type == "string"
assert (
inst.rest[0].resource[48].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-context"
)
assert (
inst.rest[0].resource[48].searchParam[4].documentation
== "A use context assigned to the structure"
)
assert inst.rest[0].resource[48].searchParam[4].name == "context"
assert inst.rest[0].resource[48].searchParam[4].type == "token"
assert (
inst.rest[0].resource[48].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-experimental"
)
assert (
inst.rest[0].resource[48].searchParam[5].documentation
== "If for testing purposes, not real usage"
)
assert inst.rest[0].resource[48].searchParam[5].name == "experimental"
assert inst.rest[0].resource[48].searchParam[5].type == "token"
assert (
inst.rest[0].resource[48].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-date"
)
assert (
inst.rest[0].resource[48].searchParam[6].documentation
== "The implementation guide publication date"
)
assert inst.rest[0].resource[48].searchParam[6].name == "date"
assert inst.rest[0].resource[48].searchParam[6].type == "date"
assert (
inst.rest[0].resource[48].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-url"
)
assert (
inst.rest[0].resource[48].searchParam[7].documentation
== "Absolute URL used to reference this Implementation Guide"
)
assert inst.rest[0].resource[48].searchParam[7].name == "url"
assert inst.rest[0].resource[48].searchParam[7].type == "uri"
assert (
inst.rest[0].resource[48].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-publisher"
)
assert (
inst.rest[0].resource[48].searchParam[8].documentation
== "Name of the publisher of the implementation guide"
)
assert inst.rest[0].resource[48].searchParam[8].name == "publisher"
assert inst.rest[0].resource[48].searchParam[8].type == "string"
assert (
inst.rest[0].resource[48].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/implementationguide-version"
)
assert (
inst.rest[0].resource[48].searchParam[9].documentation
== "The version identifier of the implementation guide"
)
assert inst.rest[0].resource[48].searchParam[9].name == "version"
assert inst.rest[0].resource[48].searchParam[9].type == "token"
assert inst.rest[0].resource[48].type == "ImplementationGuide"
assert inst.rest[0].resource[49].conditionalCreate == True
assert inst.rest[0].resource[49].conditionalDelete == "multiple"
assert inst.rest[0].resource[49].conditionalUpdate == True
assert inst.rest[0].resource[49].interaction[0].code == "read"
assert (
inst.rest[0].resource[49].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[1].code == "vread"
assert (
inst.rest[0].resource[49].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[2].code == "update"
assert (
inst.rest[0].resource[49].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[3].code == "delete"
assert (
inst.rest[0].resource[49].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[49].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[5].code == "validate"
assert (
inst.rest[0].resource[49].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[49].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[7].code == "create"
assert (
inst.rest[0].resource[49].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[49].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[49].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[49].profile.reference
== "http://hl7.org/fhir/StructureDefinition/List"
)
assert inst.rest[0].resource[49].searchInclude[0] == "List.patient"
assert inst.rest[0].resource[49].searchInclude[1] == "List.source"
assert inst.rest[0].resource[49].searchInclude[2] == "List.subject"
assert inst.rest[0].resource[49].searchInclude[3] == "List.item"
assert inst.rest[0].resource[49].searchInclude[4] == "List.encounter"
assert (
inst.rest[0].resource[49].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/list-title"
)
assert (
inst.rest[0].resource[49].searchParam[0].documentation
== "Descriptive name for the list"
)
assert inst.rest[0].resource[49].searchParam[0].name == "title"
assert inst.rest[0].resource[49].searchParam[0].type == "string"
assert (
inst.rest[0].resource[49].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/list-patient"
)
assert (
inst.rest[0].resource[49].searchParam[1].documentation
== "If all resources have the same subject"
)
assert inst.rest[0].resource[49].searchParam[1].name == "patient"
assert inst.rest[0].resource[49].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[49].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/list-source"
)
assert (
inst.rest[0].resource[49].searchParam[2].documentation
== "Who and/or what defined the list contents (aka Author)"
)
assert inst.rest[0].resource[49].searchParam[2].name == "source"
assert inst.rest[0].resource[49].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[49].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/list-status"
)
assert (
inst.rest[0].resource[49].searchParam[3].documentation
== "current | retired | entered-in-error"
)
assert inst.rest[0].resource[49].searchParam[3].name == "status"
assert inst.rest[0].resource[49].searchParam[3].type == "token"
assert (
inst.rest[0].resource[49].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/list-subject"
)
assert (
inst.rest[0].resource[49].searchParam[4].documentation
== "If all resources have the same subject"
)
assert inst.rest[0].resource[49].searchParam[4].name == "subject"
assert inst.rest[0].resource[49].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[49].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/list-item"
)
assert inst.rest[0].resource[49].searchParam[5].documentation == "Actual entry"
assert inst.rest[0].resource[49].searchParam[5].name == "item"
assert inst.rest[0].resource[49].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[49].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/list-encounter"
)
assert (
inst.rest[0].resource[49].searchParam[6].documentation
== "Context in which list created"
)
assert inst.rest[0].resource[49].searchParam[6].name == "encounter"
assert inst.rest[0].resource[49].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[49].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/list-code"
)
assert (
inst.rest[0].resource[49].searchParam[7].documentation
== "What the purpose of this list is"
)
assert inst.rest[0].resource[49].searchParam[7].name == "code"
assert inst.rest[0].resource[49].searchParam[7].type == "token"
assert (
inst.rest[0].resource[49].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/list-notes"
)
assert (
inst.rest[0].resource[49].searchParam[8].documentation
== "Comments about the list"
)
assert inst.rest[0].resource[49].searchParam[8].name == "notes"
assert inst.rest[0].resource[49].searchParam[8].type == "string"
assert (
inst.rest[0].resource[49].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/list-date"
)
assert (
inst.rest[0].resource[49].searchParam[9].documentation
== "When the list was prepared"
)
assert inst.rest[0].resource[49].searchParam[9].name == "date"
assert inst.rest[0].resource[49].searchParam[9].type == "date"
assert (
inst.rest[0].resource[49].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/list-empty-reason"
)
assert (
inst.rest[0].resource[49].searchParam[10].documentation == "Why list is empty"
)
assert inst.rest[0].resource[49].searchParam[10].name == "empty-reason"
assert inst.rest[0].resource[49].searchParam[10].type == "token"
assert inst.rest[0].resource[49].type == "List"
assert inst.rest[0].resource[50].conditionalCreate == True
assert inst.rest[0].resource[50].conditionalDelete == "multiple"
assert inst.rest[0].resource[50].conditionalUpdate == True
assert inst.rest[0].resource[50].interaction[0].code == "read"
assert (
inst.rest[0].resource[50].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[1].code == "vread"
assert (
inst.rest[0].resource[50].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[2].code == "update"
assert (
inst.rest[0].resource[50].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[3].code == "delete"
assert (
inst.rest[0].resource[50].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[50].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[5].code == "validate"
assert (
inst.rest[0].resource[50].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[50].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[7].code == "create"
assert (
inst.rest[0].resource[50].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[50].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[50].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[50].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Location"
)
assert inst.rest[0].resource[50].searchInclude[0] == "Location.organization"
assert inst.rest[0].resource[50].searchInclude[1] == "Location.partof"
assert (
inst.rest[0].resource[50].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/location-organization"
)
assert (
inst.rest[0].resource[50].searchParam[0].documentation
== "Searches for locations that are managed by the provided organization"
)
assert inst.rest[0].resource[50].searchParam[0].name == "organization"
assert inst.rest[0].resource[50].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[50].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/location-address-state"
)
assert (
inst.rest[0].resource[50].searchParam[1].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[50].searchParam[1].name == "address-state"
assert inst.rest[0].resource[50].searchParam[1].type == "string"
assert (
inst.rest[0].resource[50].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/location-address-city"
)
assert (
inst.rest[0].resource[50].searchParam[2].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[50].searchParam[2].name == "address-city"
assert inst.rest[0].resource[50].searchParam[2].type == "string"
assert (
inst.rest[0].resource[50].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/location-near"
)
assert (
inst.rest[0].resource[50].searchParam[3].documentation
== "The coordinates expressed as [lat],[long] (using the WGS84 datum, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)"
)
assert inst.rest[0].resource[50].searchParam[3].name == "near"
assert inst.rest[0].resource[50].searchParam[3].type == "token"
assert (
inst.rest[0].resource[50].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/location-partof"
)
assert (
inst.rest[0].resource[50].searchParam[4].documentation
== "The location of which this location is a part"
)
assert inst.rest[0].resource[50].searchParam[4].name == "partof"
assert inst.rest[0].resource[50].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[50].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/location-status"
)
assert (
inst.rest[0].resource[50].searchParam[5].documentation
== "Searches for locations with a specific kind of status"
)
assert inst.rest[0].resource[50].searchParam[5].name == "status"
assert inst.rest[0].resource[50].searchParam[5].type == "token"
assert (
inst.rest[0].resource[50].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/location-address"
)
assert (
inst.rest[0].resource[50].searchParam[6].documentation
== "A (part of the) address of the location"
)
assert inst.rest[0].resource[50].searchParam[6].name == "address"
assert inst.rest[0].resource[50].searchParam[6].type == "string"
assert (
inst.rest[0].resource[50].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/location-address-use"
)
assert (
inst.rest[0].resource[50].searchParam[7].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[50].searchParam[7].name == "address-use"
assert inst.rest[0].resource[50].searchParam[7].type == "token"
assert (
inst.rest[0].resource[50].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/location-name"
)
assert (
inst.rest[0].resource[50].searchParam[8].documentation
== "A (portion of the) name of the location"
)
assert inst.rest[0].resource[50].searchParam[8].name == "name"
assert inst.rest[0].resource[50].searchParam[8].type == "string"
assert (
inst.rest[0].resource[50].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/location-address-country"
)
assert (
inst.rest[0].resource[50].searchParam[9].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[50].searchParam[9].name == "address-country"
assert inst.rest[0].resource[50].searchParam[9].type == "string"
assert (
inst.rest[0].resource[50].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/location-near-distance"
)
assert (
inst.rest[0].resource[50].searchParam[10].documentation
== "A distance quantity to limit the near search to locations within a specific distance"
)
assert inst.rest[0].resource[50].searchParam[10].name == "near-distance"
assert inst.rest[0].resource[50].searchParam[10].type == "token"
assert (
inst.rest[0].resource[50].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/location-type"
)
assert (
inst.rest[0].resource[50].searchParam[11].documentation
== "A code for the type of location"
)
assert inst.rest[0].resource[50].searchParam[11].name == "type"
assert inst.rest[0].resource[50].searchParam[11].type == "token"
assert (
inst.rest[0].resource[50].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/location-identifier"
)
assert (
inst.rest[0].resource[50].searchParam[12].documentation
== "Unique code or number identifying the location to its users"
)
assert inst.rest[0].resource[50].searchParam[12].name == "identifier"
assert inst.rest[0].resource[50].searchParam[12].type == "token"
assert (
inst.rest[0].resource[50].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/location-address-postalcode"
)
assert (
inst.rest[0].resource[50].searchParam[13].documentation
== "A postal code specified in an address"
)
assert inst.rest[0].resource[50].searchParam[13].name == "address-postalcode"
assert inst.rest[0].resource[50].searchParam[13].type == "string"
assert inst.rest[0].resource[50].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[50].searchRevInclude[1] == "Account.subject"
assert inst.rest[0].resource[50].searchRevInclude[2] == "Appointment.patient"
assert inst.rest[0].resource[50].searchRevInclude[3] == "Appointment.practitioner"
assert inst.rest[0].resource[50].searchRevInclude[4] == "Appointment.location"
assert inst.rest[0].resource[50].searchRevInclude[5] == "Appointment.actor"
assert (
inst.rest[0].resource[50].searchRevInclude[6] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[50].searchRevInclude[7]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[50].searchRevInclude[8] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[50].searchRevInclude[9] == "AppointmentResponse.actor"
assert inst.rest[0].resource[50].searchRevInclude[10] == "Contract.actor"
assert inst.rest[0].resource[50].searchRevInclude[11] == "Device.location"
assert inst.rest[0].resource[50].searchRevInclude[12] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[50].searchRevInclude[13] == "DiagnosticOrder.patient"
assert inst.rest[0].resource[50].searchRevInclude[14] == "DiagnosticReport.subject"
assert inst.rest[0].resource[50].searchRevInclude[15] == "DiagnosticReport.patient"
assert inst.rest[0].resource[50].searchRevInclude[16] == "Encounter.location"
assert inst.rest[0].resource[50].searchRevInclude[17] == "Flag.patient"
assert inst.rest[0].resource[50].searchRevInclude[18] == "Flag.subject"
assert (
inst.rest[0].resource[50].searchRevInclude[19] == "HealthcareService.location"
)
assert inst.rest[0].resource[50].searchRevInclude[20] == "Immunization.location"
assert inst.rest[0].resource[50].searchRevInclude[21] == "List.patient"
assert inst.rest[0].resource[50].searchRevInclude[22] == "List.subject"
assert inst.rest[0].resource[50].searchRevInclude[23] == "Location.partof"
assert (
inst.rest[0].resource[50].searchRevInclude[24]
== "MedicationDispense.destination"
)
assert inst.rest[0].resource[50].searchRevInclude[25] == "Observation.subject"
assert inst.rest[0].resource[50].searchRevInclude[26] == "Observation.patient"
assert inst.rest[0].resource[50].searchRevInclude[27] == "Practitioner.location"
assert inst.rest[0].resource[50].searchRevInclude[28] == "Procedure.location"
assert inst.rest[0].resource[50].searchRevInclude[29] == "Provenance.location"
assert inst.rest[0].resource[50].searchRevInclude[30] == "Schedule.actor"
assert inst.rest[0].resource[50].type == "Location"
assert inst.rest[0].resource[51].conditionalCreate == True
assert inst.rest[0].resource[51].conditionalDelete == "multiple"
assert inst.rest[0].resource[51].conditionalUpdate == True
assert inst.rest[0].resource[51].interaction[0].code == "read"
assert (
inst.rest[0].resource[51].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[1].code == "vread"
assert (
inst.rest[0].resource[51].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[2].code == "update"
assert (
inst.rest[0].resource[51].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[3].code == "delete"
assert (
inst.rest[0].resource[51].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[51].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[5].code == "validate"
assert (
inst.rest[0].resource[51].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[51].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[7].code == "create"
assert (
inst.rest[0].resource[51].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[51].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[51].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[51].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Media"
)
assert inst.rest[0].resource[51].searchInclude[0] == "Media.patient"
assert inst.rest[0].resource[51].searchInclude[1] == "Media.subject"
assert inst.rest[0].resource[51].searchInclude[2] == "Media.operator"
assert (
inst.rest[0].resource[51].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/media-patient"
)
assert (
inst.rest[0].resource[51].searchParam[0].documentation
== "Who/What this Media is a record of"
)
assert inst.rest[0].resource[51].searchParam[0].name == "patient"
assert inst.rest[0].resource[51].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[51].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/media-created"
)
assert (
inst.rest[0].resource[51].searchParam[1].documentation
== "Date attachment was first created"
)
assert inst.rest[0].resource[51].searchParam[1].name == "created"
assert inst.rest[0].resource[51].searchParam[1].type == "date"
assert (
inst.rest[0].resource[51].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/media-subject"
)
assert (
inst.rest[0].resource[51].searchParam[2].documentation
== "Who/What this Media is a record of"
)
assert inst.rest[0].resource[51].searchParam[2].name == "subject"
assert inst.rest[0].resource[51].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[51].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/media-subtype"
)
assert (
inst.rest[0].resource[51].searchParam[3].documentation
== "The type of acquisition equipment/process"
)
assert inst.rest[0].resource[51].searchParam[3].name == "subtype"
assert inst.rest[0].resource[51].searchParam[3].type == "token"
assert (
inst.rest[0].resource[51].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/media-view"
)
assert (
inst.rest[0].resource[51].searchParam[4].documentation
== "Imaging view, e.g. Lateral or Antero-posterior"
)
assert inst.rest[0].resource[51].searchParam[4].name == "view"
assert inst.rest[0].resource[51].searchParam[4].type == "token"
assert (
inst.rest[0].resource[51].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/media-type"
)
assert (
inst.rest[0].resource[51].searchParam[5].documentation
== "photo | video | audio"
)
assert inst.rest[0].resource[51].searchParam[5].name == "type"
assert inst.rest[0].resource[51].searchParam[5].type == "token"
assert (
inst.rest[0].resource[51].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/media-identifier"
)
assert (
inst.rest[0].resource[51].searchParam[6].documentation
== "Identifier(s) for the image"
)
assert inst.rest[0].resource[51].searchParam[6].name == "identifier"
assert inst.rest[0].resource[51].searchParam[6].type == "token"
assert (
inst.rest[0].resource[51].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/media-operator"
)
assert (
inst.rest[0].resource[51].searchParam[7].documentation
== "The person who generated the image"
)
assert inst.rest[0].resource[51].searchParam[7].name == "operator"
assert inst.rest[0].resource[51].searchParam[7].type == "reference"
assert inst.rest[0].resource[51].searchRevInclude[0] == "DiagnosticReport.image"
assert inst.rest[0].resource[51].type == "Media"
assert inst.rest[0].resource[52].conditionalCreate == True
assert inst.rest[0].resource[52].conditionalDelete == "multiple"
assert inst.rest[0].resource[52].conditionalUpdate == True
assert inst.rest[0].resource[52].interaction[0].code == "read"
assert (
inst.rest[0].resource[52].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[1].code == "vread"
assert (
inst.rest[0].resource[52].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[2].code == "update"
assert (
inst.rest[0].resource[52].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[3].code == "delete"
assert (
inst.rest[0].resource[52].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[52].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[5].code == "validate"
assert (
inst.rest[0].resource[52].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[52].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[7].code == "create"
assert (
inst.rest[0].resource[52].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[52].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[52].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[52].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Medication"
)
assert inst.rest[0].resource[52].searchInclude[0] == "Medication.content"
assert inst.rest[0].resource[52].searchInclude[1] == "Medication.manufacturer"
assert inst.rest[0].resource[52].searchInclude[2] == "Medication.ingredient"
assert (
inst.rest[0].resource[52].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/medication-content"
)
assert (
inst.rest[0].resource[52].searchParam[0].documentation
== "A product in the package"
)
assert inst.rest[0].resource[52].searchParam[0].name == "content"
assert inst.rest[0].resource[52].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[52].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/medication-form"
)
assert (
inst.rest[0].resource[52].searchParam[1].documentation
== "powder | tablets | carton +"
)
assert inst.rest[0].resource[52].searchParam[1].name == "form"
assert inst.rest[0].resource[52].searchParam[1].type == "token"
assert (
inst.rest[0].resource[52].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/medication-container"
)
assert (
inst.rest[0].resource[52].searchParam[2].documentation
== "E.g. box, vial, blister-pack"
)
assert inst.rest[0].resource[52].searchParam[2].name == "container"
assert inst.rest[0].resource[52].searchParam[2].type == "token"
assert (
inst.rest[0].resource[52].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/medication-manufacturer"
)
assert (
inst.rest[0].resource[52].searchParam[3].documentation
== "Manufacturer of the item"
)
assert inst.rest[0].resource[52].searchParam[3].name == "manufacturer"
assert inst.rest[0].resource[52].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[52].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/medication-ingredient"
)
assert (
inst.rest[0].resource[52].searchParam[4].documentation
== "The product contained"
)
assert inst.rest[0].resource[52].searchParam[4].name == "ingredient"
assert inst.rest[0].resource[52].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[52].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/medication-code"
)
assert (
inst.rest[0].resource[52].searchParam[5].documentation
== "Codes that identify this medication"
)
assert inst.rest[0].resource[52].searchParam[5].name == "code"
assert inst.rest[0].resource[52].searchParam[5].type == "token"
assert inst.rest[0].resource[52].searchRevInclude[0] == "Group.member"
assert inst.rest[0].resource[52].searchRevInclude[1] == "Medication.content"
assert inst.rest[0].resource[52].searchRevInclude[2] == "Medication.ingredient"
assert (
inst.rest[0].resource[52].searchRevInclude[3]
== "MedicationAdministration.medication"
)
assert (
inst.rest[0].resource[52].searchRevInclude[4] == "MedicationDispense.medication"
)
assert inst.rest[0].resource[52].searchRevInclude[5] == "MedicationOrder.medication"
assert (
inst.rest[0].resource[52].searchRevInclude[6]
== "MedicationStatement.medication"
)
assert inst.rest[0].resource[52].type == "Medication"
assert inst.rest[0].resource[53].conditionalCreate == True
assert inst.rest[0].resource[53].conditionalDelete == "multiple"
assert inst.rest[0].resource[53].conditionalUpdate == True
assert inst.rest[0].resource[53].interaction[0].code == "read"
assert (
inst.rest[0].resource[53].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[1].code == "vread"
assert (
inst.rest[0].resource[53].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[2].code == "update"
assert (
inst.rest[0].resource[53].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[3].code == "delete"
assert (
inst.rest[0].resource[53].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[53].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[5].code == "validate"
assert (
inst.rest[0].resource[53].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[53].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[7].code == "create"
assert (
inst.rest[0].resource[53].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[53].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[53].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[53].profile.reference
== "http://hl7.org/fhir/StructureDefinition/MedicationAdministration"
)
assert (
inst.rest[0].resource[53].searchInclude[0]
== "MedicationAdministration.medication"
)
assert (
inst.rest[0].resource[53].searchInclude[1] == "MedicationAdministration.patient"
)
assert (
inst.rest[0].resource[53].searchInclude[2]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[53].searchInclude[3]
== "MedicationAdministration.prescription"
)
assert (
inst.rest[0].resource[53].searchInclude[4] == "MedicationAdministration.device"
)
assert (
inst.rest[0].resource[53].searchInclude[5]
== "MedicationAdministration.encounter"
)
assert (
inst.rest[0].resource[53].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-medication"
)
assert (
inst.rest[0].resource[53].searchParam[0].documentation
== "Return administrations of this medication resource"
)
assert inst.rest[0].resource[53].searchParam[0].name == "medication"
assert inst.rest[0].resource[53].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-effectivetime"
)
assert (
inst.rest[0].resource[53].searchParam[1].documentation
== "Date administration happened (or did not happen)"
)
assert inst.rest[0].resource[53].searchParam[1].name == "effectivetime"
assert inst.rest[0].resource[53].searchParam[1].type == "date"
assert (
inst.rest[0].resource[53].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-patient"
)
assert (
inst.rest[0].resource[53].searchParam[2].documentation
== "The identity of a patient to list administrations for"
)
assert inst.rest[0].resource[53].searchParam[2].name == "patient"
assert inst.rest[0].resource[53].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-practitioner"
)
assert (
inst.rest[0].resource[53].searchParam[3].documentation
== "Who administered substance"
)
assert inst.rest[0].resource[53].searchParam[3].name == "practitioner"
assert inst.rest[0].resource[53].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-status"
)
assert (
inst.rest[0].resource[53].searchParam[4].documentation
== "MedicationAdministration event status (for example one of active/paused/completed/nullified)"
)
assert inst.rest[0].resource[53].searchParam[4].name == "status"
assert inst.rest[0].resource[53].searchParam[4].type == "token"
assert (
inst.rest[0].resource[53].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-prescription"
)
assert (
inst.rest[0].resource[53].searchParam[5].documentation
== "The identity of a prescription to list administrations from"
)
assert inst.rest[0].resource[53].searchParam[5].name == "prescription"
assert inst.rest[0].resource[53].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-device"
)
assert (
inst.rest[0].resource[53].searchParam[6].documentation
== "Return administrations with this administration device identity"
)
assert inst.rest[0].resource[53].searchParam[6].name == "device"
assert inst.rest[0].resource[53].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-notgiven"
)
assert (
inst.rest[0].resource[53].searchParam[7].documentation
== "Administrations that were not made"
)
assert inst.rest[0].resource[53].searchParam[7].name == "notgiven"
assert inst.rest[0].resource[53].searchParam[7].type == "token"
assert (
inst.rest[0].resource[53].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-code"
)
assert (
inst.rest[0].resource[53].searchParam[8].documentation
== "Return administrations of this medication code"
)
assert inst.rest[0].resource[53].searchParam[8].name == "code"
assert inst.rest[0].resource[53].searchParam[8].type == "token"
assert (
inst.rest[0].resource[53].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-encounter"
)
assert (
inst.rest[0].resource[53].searchParam[9].documentation
== "Return administrations that share this encounter"
)
assert inst.rest[0].resource[53].searchParam[9].name == "encounter"
assert inst.rest[0].resource[53].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[53].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/medicationadministration-identifier"
)
assert (
inst.rest[0].resource[53].searchParam[10].documentation
== "Return administrations with this external identifier"
)
assert inst.rest[0].resource[53].searchParam[10].name == "identifier"
assert inst.rest[0].resource[53].searchParam[10].type == "token"
assert inst.rest[0].resource[53].type == "MedicationAdministration"
assert inst.rest[0].resource[54].conditionalCreate == True
assert inst.rest[0].resource[54].conditionalDelete == "multiple"
assert inst.rest[0].resource[54].conditionalUpdate == True
assert inst.rest[0].resource[54].interaction[0].code == "read"
assert (
inst.rest[0].resource[54].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[1].code == "vread"
assert (
inst.rest[0].resource[54].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[2].code == "update"
assert (
inst.rest[0].resource[54].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[3].code == "delete"
assert (
inst.rest[0].resource[54].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[54].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[5].code == "validate"
assert (
inst.rest[0].resource[54].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[54].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[7].code == "create"
assert (
inst.rest[0].resource[54].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[54].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[54].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[54].profile.reference
== "http://hl7.org/fhir/StructureDefinition/MedicationDispense"
)
assert inst.rest[0].resource[54].searchInclude[0] == "MedicationDispense.medication"
assert inst.rest[0].resource[54].searchInclude[1] == "MedicationDispense.patient"
assert inst.rest[0].resource[54].searchInclude[2] == "MedicationDispense.receiver"
assert (
inst.rest[0].resource[54].searchInclude[3] == "MedicationDispense.prescription"
)
assert (
inst.rest[0].resource[54].searchInclude[4]
== "MedicationDispense.responsibleparty"
)
assert inst.rest[0].resource[54].searchInclude[5] == "MedicationDispense.dispenser"
assert (
inst.rest[0].resource[54].searchInclude[6] == "MedicationDispense.destination"
)
assert (
inst.rest[0].resource[54].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-medication"
)
assert (
inst.rest[0].resource[54].searchParam[0].documentation
== "Return dispenses of this medicine resource"
)
assert inst.rest[0].resource[54].searchParam[0].name == "medication"
assert inst.rest[0].resource[54].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-patient"
)
assert (
inst.rest[0].resource[54].searchParam[1].documentation
== "The identity of a patient to list dispenses for"
)
assert inst.rest[0].resource[54].searchParam[1].name == "patient"
assert inst.rest[0].resource[54].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-receiver"
)
assert (
inst.rest[0].resource[54].searchParam[2].documentation
== "Who collected the medication"
)
assert inst.rest[0].resource[54].searchParam[2].name == "receiver"
assert inst.rest[0].resource[54].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-status"
)
assert (
inst.rest[0].resource[54].searchParam[3].documentation
== "Status of the dispense"
)
assert inst.rest[0].resource[54].searchParam[3].name == "status"
assert inst.rest[0].resource[54].searchParam[3].type == "token"
assert (
inst.rest[0].resource[54].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-prescription"
)
assert (
inst.rest[0].resource[54].searchParam[4].documentation
== "The identity of a prescription to list dispenses from"
)
assert inst.rest[0].resource[54].searchParam[4].name == "prescription"
assert inst.rest[0].resource[54].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-responsibleparty"
)
assert (
inst.rest[0].resource[54].searchParam[5].documentation
== "Return all dispenses with the specified responsible party"
)
assert inst.rest[0].resource[54].searchParam[5].name == "responsibleparty"
assert inst.rest[0].resource[54].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-dispenser"
)
assert (
inst.rest[0].resource[54].searchParam[6].documentation
== "Return all dispenses performed by a specific individual"
)
assert inst.rest[0].resource[54].searchParam[6].name == "dispenser"
assert inst.rest[0].resource[54].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[54].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-code"
)
assert (
inst.rest[0].resource[54].searchParam[7].documentation
== "Return dispenses of this medicine code"
)
assert inst.rest[0].resource[54].searchParam[7].name == "code"
assert inst.rest[0].resource[54].searchParam[7].type == "token"
assert (
inst.rest[0].resource[54].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-type"
)
assert (
inst.rest[0].resource[54].searchParam[8].documentation
== "Return all dispenses of a specific type"
)
assert inst.rest[0].resource[54].searchParam[8].name == "type"
assert inst.rest[0].resource[54].searchParam[8].type == "token"
assert (
inst.rest[0].resource[54].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-identifier"
)
assert (
inst.rest[0].resource[54].searchParam[9].documentation
== "Return dispenses with this external identifier"
)
assert inst.rest[0].resource[54].searchParam[9].name == "identifier"
assert inst.rest[0].resource[54].searchParam[9].type == "token"
assert (
inst.rest[0].resource[54].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-whenprepared"
)
assert (
inst.rest[0].resource[54].searchParam[10].documentation
== "Date when medication prepared"
)
assert inst.rest[0].resource[54].searchParam[10].name == "whenprepared"
assert inst.rest[0].resource[54].searchParam[10].type == "date"
assert (
inst.rest[0].resource[54].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-whenhandedover"
)
assert (
inst.rest[0].resource[54].searchParam[11].documentation
== "Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)"
)
assert inst.rest[0].resource[54].searchParam[11].name == "whenhandedover"
assert inst.rest[0].resource[54].searchParam[11].type == "date"
assert (
inst.rest[0].resource[54].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/medicationdispense-destination"
)
assert (
inst.rest[0].resource[54].searchParam[12].documentation
== "Return dispenses that should be sent to a specific destination"
)
assert inst.rest[0].resource[54].searchParam[12].name == "destination"
assert inst.rest[0].resource[54].searchParam[12].type == "reference"
assert inst.rest[0].resource[54].type == "MedicationDispense"
assert inst.rest[0].resource[55].conditionalCreate == True
assert inst.rest[0].resource[55].conditionalDelete == "multiple"
assert inst.rest[0].resource[55].conditionalUpdate == True
assert inst.rest[0].resource[55].interaction[0].code == "read"
assert (
inst.rest[0].resource[55].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[1].code == "vread"
assert (
inst.rest[0].resource[55].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[2].code == "update"
assert (
inst.rest[0].resource[55].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[3].code == "delete"
assert (
inst.rest[0].resource[55].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[55].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[5].code == "validate"
assert (
inst.rest[0].resource[55].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[55].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[7].code == "create"
assert (
inst.rest[0].resource[55].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[55].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[55].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[55].profile.reference
== "http://hl7.org/fhir/StructureDefinition/MedicationOrder"
)
assert inst.rest[0].resource[55].searchInclude[0] == "MedicationOrder.medication"
assert inst.rest[0].resource[55].searchInclude[1] == "MedicationOrder.patient"
assert inst.rest[0].resource[55].searchInclude[2] == "MedicationOrder.prescriber"
assert inst.rest[0].resource[55].searchInclude[3] == "MedicationOrder.encounter"
assert (
inst.rest[0].resource[55].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-medication"
)
assert (
inst.rest[0].resource[55].searchParam[0].documentation
== "Return administrations of this medication reference"
)
assert inst.rest[0].resource[55].searchParam[0].name == "medication"
assert inst.rest[0].resource[55].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[55].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-datewritten"
)
assert (
inst.rest[0].resource[55].searchParam[1].documentation
== "Return prescriptions written on this date"
)
assert inst.rest[0].resource[55].searchParam[1].name == "datewritten"
assert inst.rest[0].resource[55].searchParam[1].type == "date"
assert (
inst.rest[0].resource[55].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-patient"
)
assert (
inst.rest[0].resource[55].searchParam[2].documentation
== "The identity of a patient to list orders for"
)
assert inst.rest[0].resource[55].searchParam[2].name == "patient"
assert inst.rest[0].resource[55].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[55].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-status"
)
assert (
inst.rest[0].resource[55].searchParam[3].documentation
== "Status of the prescription"
)
assert inst.rest[0].resource[55].searchParam[3].name == "status"
assert inst.rest[0].resource[55].searchParam[3].type == "token"
assert (
inst.rest[0].resource[55].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-prescriber"
)
assert (
inst.rest[0].resource[55].searchParam[4].documentation
== "Who ordered the medication(s)"
)
assert inst.rest[0].resource[55].searchParam[4].name == "prescriber"
assert inst.rest[0].resource[55].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[55].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-code"
)
assert (
inst.rest[0].resource[55].searchParam[5].documentation
== "Return administrations of this medication code"
)
assert inst.rest[0].resource[55].searchParam[5].name == "code"
assert inst.rest[0].resource[55].searchParam[5].type == "token"
assert (
inst.rest[0].resource[55].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-encounter"
)
assert (
inst.rest[0].resource[55].searchParam[6].documentation
== "Return prescriptions with this encounter identifier"
)
assert inst.rest[0].resource[55].searchParam[6].name == "encounter"
assert inst.rest[0].resource[55].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[55].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/medicationorder-identifier"
)
assert (
inst.rest[0].resource[55].searchParam[7].documentation
== "Return prescriptions with this external identifier"
)
assert inst.rest[0].resource[55].searchParam[7].name == "identifier"
assert inst.rest[0].resource[55].searchParam[7].type == "token"
assert inst.rest[0].resource[55].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[55].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[55].searchRevInclude[2] == "ClinicalImpression.action"
assert (
inst.rest[0].resource[55].searchRevInclude[3]
== "MedicationAdministration.prescription"
)
assert (
inst.rest[0].resource[55].searchRevInclude[4]
== "MedicationDispense.prescription"
)
assert inst.rest[0].resource[55].type == "MedicationOrder"
assert inst.rest[0].resource[56].conditionalCreate == True
assert inst.rest[0].resource[56].conditionalDelete == "multiple"
assert inst.rest[0].resource[56].conditionalUpdate == True
assert inst.rest[0].resource[56].interaction[0].code == "read"
assert (
inst.rest[0].resource[56].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[1].code == "vread"
assert (
inst.rest[0].resource[56].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[2].code == "update"
assert (
inst.rest[0].resource[56].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[3].code == "delete"
assert (
inst.rest[0].resource[56].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[56].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[5].code == "validate"
assert (
inst.rest[0].resource[56].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[56].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[7].code == "create"
assert (
inst.rest[0].resource[56].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[56].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[56].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[56].profile.reference
== "http://hl7.org/fhir/StructureDefinition/MedicationStatement"
)
assert (
inst.rest[0].resource[56].searchInclude[0] == "MedicationStatement.medication"
)
assert inst.rest[0].resource[56].searchInclude[1] == "MedicationStatement.patient"
assert inst.rest[0].resource[56].searchInclude[2] == "MedicationStatement.source"
assert (
inst.rest[0].resource[56].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-medication"
)
assert (
inst.rest[0].resource[56].searchParam[0].documentation
== "Return administrations of this medication reference"
)
assert inst.rest[0].resource[56].searchParam[0].name == "medication"
assert inst.rest[0].resource[56].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[56].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-patient"
)
assert (
inst.rest[0].resource[56].searchParam[1].documentation
== "The identity of a patient to list statements for"
)
assert inst.rest[0].resource[56].searchParam[1].name == "patient"
assert inst.rest[0].resource[56].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[56].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-source"
)
assert (
inst.rest[0].resource[56].searchParam[2].documentation
== "Who the information in the statement came from"
)
assert inst.rest[0].resource[56].searchParam[2].name == "source"
assert inst.rest[0].resource[56].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[56].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-status"
)
assert (
inst.rest[0].resource[56].searchParam[3].documentation
== "Return statements that match the given status"
)
assert inst.rest[0].resource[56].searchParam[3].name == "status"
assert inst.rest[0].resource[56].searchParam[3].type == "token"
assert (
inst.rest[0].resource[56].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-code"
)
assert (
inst.rest[0].resource[56].searchParam[4].documentation
== "Return administrations of this medication code"
)
assert inst.rest[0].resource[56].searchParam[4].name == "code"
assert inst.rest[0].resource[56].searchParam[4].type == "token"
assert (
inst.rest[0].resource[56].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-identifier"
)
assert (
inst.rest[0].resource[56].searchParam[5].documentation
== "Return statements with this external identifier"
)
assert inst.rest[0].resource[56].searchParam[5].name == "identifier"
assert inst.rest[0].resource[56].searchParam[5].type == "token"
assert (
inst.rest[0].resource[56].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/medicationstatement-effectivedate"
)
assert (
inst.rest[0].resource[56].searchParam[6].documentation
== "Date when patient was taking (or not taking) the medication"
)
assert inst.rest[0].resource[56].searchParam[6].name == "effectivedate"
assert inst.rest[0].resource[56].searchParam[6].type == "date"
assert inst.rest[0].resource[56].type == "MedicationStatement"
assert inst.rest[0].resource[57].conditionalCreate == True
assert inst.rest[0].resource[57].conditionalDelete == "multiple"
assert inst.rest[0].resource[57].conditionalUpdate == True
assert inst.rest[0].resource[57].interaction[0].code == "read"
assert (
inst.rest[0].resource[57].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[1].code == "vread"
assert (
inst.rest[0].resource[57].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[2].code == "update"
assert (
inst.rest[0].resource[57].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[3].code == "delete"
assert (
inst.rest[0].resource[57].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[57].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[5].code == "validate"
assert (
inst.rest[0].resource[57].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[57].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[7].code == "create"
assert (
inst.rest[0].resource[57].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[57].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[57].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[57].profile.reference
== "http://hl7.org/fhir/StructureDefinition/MessageHeader"
)
assert inst.rest[0].resource[57].searchInclude[0] == "MessageHeader.receiver"
assert inst.rest[0].resource[57].searchInclude[1] == "MessageHeader.responsible"
assert inst.rest[0].resource[57].searchInclude[2] == "MessageHeader.data"
assert inst.rest[0].resource[57].searchInclude[3] == "MessageHeader.author"
assert inst.rest[0].resource[57].searchInclude[4] == "MessageHeader.enterer"
assert inst.rest[0].resource[57].searchInclude[5] == "MessageHeader.target"
assert (
inst.rest[0].resource[57].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-destination-uri"
)
assert (
inst.rest[0].resource[57].searchParam[0].documentation
== "Actual destination address or id"
)
assert inst.rest[0].resource[57].searchParam[0].name == "destination-uri"
assert inst.rest[0].resource[57].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[57].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-receiver"
)
assert (
inst.rest[0].resource[57].searchParam[1].documentation
== 'Intended "real-world" recipient for the data'
)
assert inst.rest[0].resource[57].searchParam[1].name == "receiver"
assert inst.rest[0].resource[57].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[57].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-responsible"
)
assert (
inst.rest[0].resource[57].searchParam[2].documentation
== "Final responsibility for event"
)
assert inst.rest[0].resource[57].searchParam[2].name == "responsible"
assert inst.rest[0].resource[57].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[57].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-data"
)
assert (
inst.rest[0].resource[57].searchParam[3].documentation
== "The actual content of the message"
)
assert inst.rest[0].resource[57].searchParam[3].name == "data"
assert inst.rest[0].resource[57].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[57].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-code"
)
assert (
inst.rest[0].resource[57].searchParam[4].documentation
== "ok | transient-error | fatal-error"
)
assert inst.rest[0].resource[57].searchParam[4].name == "code"
assert inst.rest[0].resource[57].searchParam[4].type == "token"
assert (
inst.rest[0].resource[57].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-response-id"
)
assert (
inst.rest[0].resource[57].searchParam[5].documentation
== "Id of original message"
)
assert inst.rest[0].resource[57].searchParam[5].name == "response-id"
assert inst.rest[0].resource[57].searchParam[5].type == "token"
assert (
inst.rest[0].resource[57].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-destination"
)
assert inst.rest[0].resource[57].searchParam[6].documentation == "Name of system"
assert inst.rest[0].resource[57].searchParam[6].name == "destination"
assert inst.rest[0].resource[57].searchParam[6].type == "string"
assert (
inst.rest[0].resource[57].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-timestamp"
)
assert (
inst.rest[0].resource[57].searchParam[7].documentation
== "Time that the message was sent"
)
assert inst.rest[0].resource[57].searchParam[7].name == "timestamp"
assert inst.rest[0].resource[57].searchParam[7].type == "date"
assert (
inst.rest[0].resource[57].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-author"
)
assert (
inst.rest[0].resource[57].searchParam[8].documentation
== "The source of the decision"
)
assert inst.rest[0].resource[57].searchParam[8].name == "author"
assert inst.rest[0].resource[57].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[57].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-source-uri"
)
assert (
inst.rest[0].resource[57].searchParam[9].documentation
== "Actual message source address or id"
)
assert inst.rest[0].resource[57].searchParam[9].name == "source-uri"
assert inst.rest[0].resource[57].searchParam[9].type == "uri"
assert (
inst.rest[0].resource[57].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-source"
)
assert inst.rest[0].resource[57].searchParam[10].documentation == "Name of system"
assert inst.rest[0].resource[57].searchParam[10].name == "source"
assert inst.rest[0].resource[57].searchParam[10].type == "string"
assert (
inst.rest[0].resource[57].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-enterer"
)
assert (
inst.rest[0].resource[57].searchParam[11].documentation
== "The source of the data entry"
)
assert inst.rest[0].resource[57].searchParam[11].name == "enterer"
assert inst.rest[0].resource[57].searchParam[11].type == "reference"
assert (
inst.rest[0].resource[57].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-event"
)
assert (
inst.rest[0].resource[57].searchParam[12].documentation
== "Code for the event this message represents"
)
assert inst.rest[0].resource[57].searchParam[12].name == "event"
assert inst.rest[0].resource[57].searchParam[12].type == "token"
assert (
inst.rest[0].resource[57].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/messageheader-target"
)
assert (
inst.rest[0].resource[57].searchParam[13].documentation
== "Particular delivery destination within the destination"
)
assert inst.rest[0].resource[57].searchParam[13].name == "target"
assert inst.rest[0].resource[57].searchParam[13].type == "reference"
assert inst.rest[0].resource[57].type == "MessageHeader"
assert inst.rest[0].resource[58].conditionalCreate == True
assert inst.rest[0].resource[58].conditionalDelete == "multiple"
assert inst.rest[0].resource[58].conditionalUpdate == True
assert inst.rest[0].resource[58].interaction[0].code == "read"
assert (
inst.rest[0].resource[58].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[1].code == "vread"
assert (
inst.rest[0].resource[58].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[2].code == "update"
assert (
inst.rest[0].resource[58].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[3].code == "delete"
assert (
inst.rest[0].resource[58].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[58].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[5].code == "validate"
assert (
inst.rest[0].resource[58].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[58].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[7].code == "create"
assert (
inst.rest[0].resource[58].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[58].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[58].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[58].profile.reference
== "http://hl7.org/fhir/StructureDefinition/NamingSystem"
)
assert inst.rest[0].resource[58].searchInclude[0] == "NamingSystem.replaced-by"
assert (
inst.rest[0].resource[58].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-responsible"
)
assert (
inst.rest[0].resource[58].searchParam[0].documentation
== "Who maintains system namespace?"
)
assert inst.rest[0].resource[58].searchParam[0].name == "responsible"
assert inst.rest[0].resource[58].searchParam[0].type == "string"
assert (
inst.rest[0].resource[58].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-status"
)
assert (
inst.rest[0].resource[58].searchParam[1].documentation
== "draft | active | retired"
)
assert inst.rest[0].resource[58].searchParam[1].name == "status"
assert inst.rest[0].resource[58].searchParam[1].type == "token"
assert (
inst.rest[0].resource[58].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-type"
)
assert (
inst.rest[0].resource[58].searchParam[2].documentation
== "e.g. driver, provider, patient, bank etc."
)
assert inst.rest[0].resource[58].searchParam[2].name == "type"
assert inst.rest[0].resource[58].searchParam[2].type == "token"
assert (
inst.rest[0].resource[58].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-date"
)
assert (
inst.rest[0].resource[58].searchParam[3].documentation
== "Publication Date(/time)"
)
assert inst.rest[0].resource[58].searchParam[3].name == "date"
assert inst.rest[0].resource[58].searchParam[3].type == "date"
assert (
inst.rest[0].resource[58].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-period"
)
assert (
inst.rest[0].resource[58].searchParam[4].documentation
== "When is identifier valid?"
)
assert inst.rest[0].resource[58].searchParam[4].name == "period"
assert inst.rest[0].resource[58].searchParam[4].type == "date"
assert (
inst.rest[0].resource[58].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-contact"
)
assert (
inst.rest[0].resource[58].searchParam[5].documentation
== "Name of a individual to contact"
)
assert inst.rest[0].resource[58].searchParam[5].name == "contact"
assert inst.rest[0].resource[58].searchParam[5].type == "string"
assert (
inst.rest[0].resource[58].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-kind"
)
assert (
inst.rest[0].resource[58].searchParam[6].documentation
== "codesystem | identifier | root"
)
assert inst.rest[0].resource[58].searchParam[6].name == "kind"
assert inst.rest[0].resource[58].searchParam[6].type == "token"
assert (
inst.rest[0].resource[58].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-publisher"
)
assert (
inst.rest[0].resource[58].searchParam[7].documentation
== "Name of the publisher (Organization or individual)"
)
assert inst.rest[0].resource[58].searchParam[7].name == "publisher"
assert inst.rest[0].resource[58].searchParam[7].type == "string"
assert (
inst.rest[0].resource[58].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-id-type"
)
assert (
inst.rest[0].resource[58].searchParam[8].documentation
== "oid | uuid | uri | other"
)
assert inst.rest[0].resource[58].searchParam[8].name == "id-type"
assert inst.rest[0].resource[58].searchParam[8].type == "token"
assert (
inst.rest[0].resource[58].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-name"
)
assert (
inst.rest[0].resource[58].searchParam[9].documentation == "Human-readable label"
)
assert inst.rest[0].resource[58].searchParam[9].name == "name"
assert inst.rest[0].resource[58].searchParam[9].type == "string"
assert (
inst.rest[0].resource[58].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-context"
)
assert (
inst.rest[0].resource[58].searchParam[10].documentation
== "Content intends to support these contexts"
)
assert inst.rest[0].resource[58].searchParam[10].name == "context"
assert inst.rest[0].resource[58].searchParam[10].type == "token"
assert (
inst.rest[0].resource[58].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-value"
)
assert (
inst.rest[0].resource[58].searchParam[11].documentation
== "The unique identifier"
)
assert inst.rest[0].resource[58].searchParam[11].name == "value"
assert inst.rest[0].resource[58].searchParam[11].type == "string"
assert (
inst.rest[0].resource[58].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-telecom"
)
assert (
inst.rest[0].resource[58].searchParam[12].documentation
== "Contact details for individual or publisher"
)
assert inst.rest[0].resource[58].searchParam[12].name == "telecom"
assert inst.rest[0].resource[58].searchParam[12].type == "token"
assert (
inst.rest[0].resource[58].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/namingsystem-replaced-by"
)
assert inst.rest[0].resource[58].searchParam[13].documentation == "Use this instead"
assert inst.rest[0].resource[58].searchParam[13].name == "replaced-by"
assert inst.rest[0].resource[58].searchParam[13].type == "reference"
assert inst.rest[0].resource[58].searchRevInclude[0] == "NamingSystem.replaced-by"
assert inst.rest[0].resource[58].type == "NamingSystem"
assert inst.rest[0].resource[59].conditionalCreate == True
assert inst.rest[0].resource[59].conditionalDelete == "multiple"
assert inst.rest[0].resource[59].conditionalUpdate == True
assert inst.rest[0].resource[59].interaction[0].code == "read"
assert (
inst.rest[0].resource[59].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[1].code == "vread"
assert (
inst.rest[0].resource[59].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[2].code == "update"
assert (
inst.rest[0].resource[59].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[3].code == "delete"
assert (
inst.rest[0].resource[59].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[59].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[5].code == "validate"
assert (
inst.rest[0].resource[59].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[59].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[7].code == "create"
assert (
inst.rest[0].resource[59].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[59].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[59].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[59].profile.reference
== "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
)
assert inst.rest[0].resource[59].searchInclude[0] == "NutritionOrder.patient"
assert inst.rest[0].resource[59].searchInclude[1] == "NutritionOrder.provider"
assert inst.rest[0].resource[59].searchInclude[2] == "NutritionOrder.encounter"
assert (
inst.rest[0].resource[59].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-patient"
)
assert (
inst.rest[0].resource[59].searchParam[0].documentation
== "The identity of the person who requires the diet, formula or nutritional supplement"
)
assert inst.rest[0].resource[59].searchParam[0].name == "patient"
assert inst.rest[0].resource[59].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[59].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-status"
)
assert (
inst.rest[0].resource[59].searchParam[1].documentation
== "Status of the nutrition order."
)
assert inst.rest[0].resource[59].searchParam[1].name == "status"
assert inst.rest[0].resource[59].searchParam[1].type == "token"
assert (
inst.rest[0].resource[59].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-supplement"
)
assert (
inst.rest[0].resource[59].searchParam[2].documentation
== "Type of supplement product requested"
)
assert inst.rest[0].resource[59].searchParam[2].name == "supplement"
assert inst.rest[0].resource[59].searchParam[2].type == "token"
assert (
inst.rest[0].resource[59].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-oraldiet"
)
assert (
inst.rest[0].resource[59].searchParam[3].documentation
== "Type of diet that can be consumed orally (i.e., take via the mouth)."
)
assert inst.rest[0].resource[59].searchParam[3].name == "oraldiet"
assert inst.rest[0].resource[59].searchParam[3].type == "token"
assert (
inst.rest[0].resource[59].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-provider"
)
assert (
inst.rest[0].resource[59].searchParam[4].documentation
== "The identify of the provider who placed the nutrition order"
)
assert inst.rest[0].resource[59].searchParam[4].name == "provider"
assert inst.rest[0].resource[59].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[59].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-encounter"
)
assert (
inst.rest[0].resource[59].searchParam[5].documentation
== "Return nutrition orders with this encounter identifier"
)
assert inst.rest[0].resource[59].searchParam[5].name == "encounter"
assert inst.rest[0].resource[59].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[59].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-datetime"
)
assert (
inst.rest[0].resource[59].searchParam[6].documentation
== "Return nutrition orders requested on this date"
)
assert inst.rest[0].resource[59].searchParam[6].name == "datetime"
assert inst.rest[0].resource[59].searchParam[6].type == "date"
assert (
inst.rest[0].resource[59].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-additive"
)
assert (
inst.rest[0].resource[59].searchParam[7].documentation
== "Type of module component to add to the feeding"
)
assert inst.rest[0].resource[59].searchParam[7].name == "additive"
assert inst.rest[0].resource[59].searchParam[7].type == "token"
assert (
inst.rest[0].resource[59].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-identifier"
)
assert (
inst.rest[0].resource[59].searchParam[8].documentation
== "Return nutrition orders with this external identifier"
)
assert inst.rest[0].resource[59].searchParam[8].name == "identifier"
assert inst.rest[0].resource[59].searchParam[8].type == "token"
assert (
inst.rest[0].resource[59].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/nutritionorder-formula"
)
assert (
inst.rest[0].resource[59].searchParam[9].documentation
== "Type of enteral or infant formula"
)
assert inst.rest[0].resource[59].searchParam[9].name == "formula"
assert inst.rest[0].resource[59].searchParam[9].type == "token"
assert inst.rest[0].resource[59].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[59].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[59].searchRevInclude[2] == "ClinicalImpression.action"
assert inst.rest[0].resource[59].type == "NutritionOrder"
assert inst.rest[0].resource[60].conditionalCreate == True
assert inst.rest[0].resource[60].conditionalDelete == "multiple"
assert inst.rest[0].resource[60].conditionalUpdate == True
assert inst.rest[0].resource[60].interaction[0].code == "read"
assert (
inst.rest[0].resource[60].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[1].code == "vread"
assert (
inst.rest[0].resource[60].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[2].code == "update"
assert (
inst.rest[0].resource[60].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[3].code == "delete"
assert (
inst.rest[0].resource[60].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[60].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[5].code == "validate"
assert (
inst.rest[0].resource[60].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[60].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[7].code == "create"
assert (
inst.rest[0].resource[60].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[60].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[60].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[60].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Observation"
)
assert inst.rest[0].resource[60].searchInclude[0] == "Observation.subject"
assert inst.rest[0].resource[60].searchInclude[1] == "Observation.encounter"
assert inst.rest[0].resource[60].searchInclude[2] == "Observation.patient"
assert inst.rest[0].resource[60].searchInclude[3] == "Observation.specimen"
assert inst.rest[0].resource[60].searchInclude[4] == "Observation.related-target"
assert inst.rest[0].resource[60].searchInclude[5] == "Observation.device"
assert inst.rest[0].resource[60].searchInclude[6] == "Observation.performer"
assert (
inst.rest[0].resource[60].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/observation-subject"
)
assert (
inst.rest[0].resource[60].searchParam[0].documentation
== "The subject that the observation is about"
)
assert inst.rest[0].resource[60].searchParam[0].name == "subject"
assert inst.rest[0].resource[60].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/observation-encounter"
)
assert (
inst.rest[0].resource[60].searchParam[1].documentation
== "Healthcare event related to the observation"
)
assert inst.rest[0].resource[60].searchParam[1].name == "encounter"
assert inst.rest[0].resource[60].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/observation-date"
)
assert (
inst.rest[0].resource[60].searchParam[2].documentation
== "Obtained date/time. If the obtained element is a period, a date that falls in the period"
)
assert inst.rest[0].resource[60].searchParam[2].name == "date"
assert inst.rest[0].resource[60].searchParam[2].type == "date"
assert (
inst.rest[0].resource[60].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-value-quantity"
)
assert (
inst.rest[0].resource[60].searchParam[3].documentation
== "The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)"
)
assert inst.rest[0].resource[60].searchParam[3].name == "component-value-quantity"
assert inst.rest[0].resource[60].searchParam[3].type == "quantity"
assert (
inst.rest[0].resource[60].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/observation-related"
)
assert (
inst.rest[0].resource[60].searchParam[4].documentation
== "Related Observations - search on related-type and related-target together"
)
assert inst.rest[0].resource[60].searchParam[4].name == "related"
assert inst.rest[0].resource[60].searchParam[4].type == "composite"
assert (
inst.rest[0].resource[60].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/observation-patient"
)
assert (
inst.rest[0].resource[60].searchParam[5].documentation
== "The subject that the observation is about (if patient)"
)
assert inst.rest[0].resource[60].searchParam[5].name == "patient"
assert inst.rest[0].resource[60].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/observation-specimen"
)
assert (
inst.rest[0].resource[60].searchParam[6].documentation
== "Specimen used for this observation"
)
assert inst.rest[0].resource[60].searchParam[6].name == "specimen"
assert inst.rest[0].resource[60].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-value-concept"
)
assert (
inst.rest[0].resource[60].searchParam[7].documentation
== "The value of the component observation, if the value is a CodeableConcept"
)
assert inst.rest[0].resource[60].searchParam[7].name == "component-value-concept"
assert inst.rest[0].resource[60].searchParam[7].type == "token"
assert (
inst.rest[0].resource[60].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-code-value"
)
assert (
inst.rest[0].resource[60].searchParam[8].documentation
== "Both component code and one of the component value parameters"
)
assert inst.rest[0].resource[60].searchParam[8].name == "component-code-value-[x]"
assert inst.rest[0].resource[60].searchParam[8].type == "composite"
assert (
inst.rest[0].resource[60].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/observation-value-quantity"
)
assert (
inst.rest[0].resource[60].searchParam[9].documentation
== "The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)"
)
assert inst.rest[0].resource[60].searchParam[9].name == "value-quantity"
assert inst.rest[0].resource[60].searchParam[9].type == "quantity"
assert (
inst.rest[0].resource[60].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/observation-value-date"
)
assert (
inst.rest[0].resource[60].searchParam[10].documentation
== "The value of the observation, if the value is a date or period of time"
)
assert inst.rest[0].resource[60].searchParam[10].name == "value-date"
assert inst.rest[0].resource[60].searchParam[10].type == "date"
assert (
inst.rest[0].resource[60].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/observation-value-string"
)
assert (
inst.rest[0].resource[60].searchParam[11].documentation
== "The value of the observation, if the value is a string, and also searches in CodeableConcept.text"
)
assert inst.rest[0].resource[60].searchParam[11].name == "value-string"
assert inst.rest[0].resource[60].searchParam[11].type == "string"
assert (
inst.rest[0].resource[60].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-code"
)
assert (
inst.rest[0].resource[60].searchParam[12].documentation
== "The component code of the observation type"
)
assert inst.rest[0].resource[60].searchParam[12].name == "component-code"
assert inst.rest[0].resource[60].searchParam[12].type == "token"
assert (
inst.rest[0].resource[60].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/observation-status"
)
assert (
inst.rest[0].resource[60].searchParam[13].documentation
== "The status of the observation"
)
assert inst.rest[0].resource[60].searchParam[13].name == "status"
assert inst.rest[0].resource[60].searchParam[13].type == "token"
assert (
inst.rest[0].resource[60].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/observation-value-concept"
)
assert (
inst.rest[0].resource[60].searchParam[14].documentation
== "The value of the observation, if the value is a CodeableConcept"
)
assert inst.rest[0].resource[60].searchParam[14].name == "value-concept"
assert inst.rest[0].resource[60].searchParam[14].type == "token"
assert (
inst.rest[0].resource[60].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/observation-code"
)
assert (
inst.rest[0].resource[60].searchParam[15].documentation
== "The code of the observation type"
)
assert inst.rest[0].resource[60].searchParam[15].name == "code"
assert inst.rest[0].resource[60].searchParam[15].type == "token"
assert (
inst.rest[0].resource[60].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/observation-related-target"
)
assert (
inst.rest[0].resource[60].searchParam[16].documentation
== "Resource that is related to this one"
)
assert inst.rest[0].resource[60].searchParam[16].name == "related-target"
assert inst.rest[0].resource[60].searchParam[16].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/observation-data-absent-reason"
)
assert (
inst.rest[0].resource[60].searchParam[17].documentation
== "The reason why the expected value in the element Observation.value[x] is missing."
)
assert inst.rest[0].resource[60].searchParam[17].name == "data-absent-reason"
assert inst.rest[0].resource[60].searchParam[17].type == "token"
assert (
inst.rest[0].resource[60].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/observation-category"
)
assert (
inst.rest[0].resource[60].searchParam[18].documentation
== "The classification of the type of observation"
)
assert inst.rest[0].resource[60].searchParam[18].name == "category"
assert inst.rest[0].resource[60].searchParam[18].type == "token"
assert (
inst.rest[0].resource[60].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-data-absent-reason"
)
assert (
inst.rest[0].resource[60].searchParam[19].documentation
== "The reason why the expected value in the element Observation.component.value[x] is missing."
)
assert (
inst.rest[0].resource[60].searchParam[19].name == "component-data-absent-reason"
)
assert inst.rest[0].resource[60].searchParam[19].type == "token"
assert (
inst.rest[0].resource[60].searchParam[20].definition
== "http://hl7.org/fhir/SearchParameter/observation-device"
)
assert (
inst.rest[0].resource[60].searchParam[20].documentation
== "The Device that generated the observation data."
)
assert inst.rest[0].resource[60].searchParam[20].name == "device"
assert inst.rest[0].resource[60].searchParam[20].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[21].definition
== "http://hl7.org/fhir/SearchParameter/observation-related-type"
)
assert (
inst.rest[0].resource[60].searchParam[21].documentation
== "has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by"
)
assert inst.rest[0].resource[60].searchParam[21].name == "related-type"
assert inst.rest[0].resource[60].searchParam[21].type == "token"
assert (
inst.rest[0].resource[60].searchParam[22].definition
== "http://hl7.org/fhir/SearchParameter/observation-performer"
)
assert (
inst.rest[0].resource[60].searchParam[22].documentation
== "Who performed the observation"
)
assert inst.rest[0].resource[60].searchParam[22].name == "performer"
assert inst.rest[0].resource[60].searchParam[22].type == "reference"
assert (
inst.rest[0].resource[60].searchParam[23].definition
== "http://hl7.org/fhir/SearchParameter/observation-identifier"
)
assert (
inst.rest[0].resource[60].searchParam[23].documentation
== "The unique id for a particular observation"
)
assert inst.rest[0].resource[60].searchParam[23].name == "identifier"
assert inst.rest[0].resource[60].searchParam[23].type == "token"
assert (
inst.rest[0].resource[60].searchParam[24].definition
== "http://hl7.org/fhir/SearchParameter/observation-code-value"
)
assert (
inst.rest[0].resource[60].searchParam[24].documentation
== "Both code and one of the value parameters"
)
assert inst.rest[0].resource[60].searchParam[24].name == "code-value-[x]"
assert inst.rest[0].resource[60].searchParam[24].type == "composite"
assert (
inst.rest[0].resource[60].searchParam[25].definition
== "http://hl7.org/fhir/SearchParameter/observation-component-value-string"
)
assert (
inst.rest[0].resource[60].searchParam[25].documentation
== "The value of the component observation, if the value is a string, and also searches in CodeableConcept.text"
)
assert inst.rest[0].resource[60].searchParam[25].name == "component-value-string"
assert inst.rest[0].resource[60].searchParam[25].type == "string"
assert (
inst.rest[0].resource[60].searchRevInclude[0]
== "ClinicalImpression.investigation"
)
assert inst.rest[0].resource[60].searchRevInclude[1] == "DiagnosticReport.result"
assert inst.rest[0].resource[60].searchRevInclude[2] == "Immunization.reaction"
assert (
inst.rest[0].resource[60].searchRevInclude[3]
== "ImmunizationRecommendation.information"
)
assert inst.rest[0].resource[60].searchRevInclude[4] == "Observation.related-target"
assert inst.rest[0].resource[60].type == "Observation"
assert inst.rest[0].resource[61].conditionalCreate == True
assert inst.rest[0].resource[61].conditionalDelete == "multiple"
assert inst.rest[0].resource[61].conditionalUpdate == True
assert inst.rest[0].resource[61].interaction[0].code == "read"
assert (
inst.rest[0].resource[61].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[1].code == "vread"
assert (
inst.rest[0].resource[61].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[2].code == "update"
assert (
inst.rest[0].resource[61].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[3].code == "delete"
assert (
inst.rest[0].resource[61].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[61].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[5].code == "validate"
assert (
inst.rest[0].resource[61].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[61].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[7].code == "create"
assert (
inst.rest[0].resource[61].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[61].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[61].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[61].profile.reference
== "http://hl7.org/fhir/StructureDefinition/OperationDefinition"
)
assert inst.rest[0].resource[61].searchInclude[0] == "OperationDefinition.base"
assert inst.rest[0].resource[61].searchInclude[1] == "OperationDefinition.profile"
assert (
inst.rest[0].resource[61].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-status"
)
assert (
inst.rest[0].resource[61].searchParam[0].documentation
== "draft | active | retired"
)
assert inst.rest[0].resource[61].searchParam[0].name == "status"
assert inst.rest[0].resource[61].searchParam[0].type == "token"
assert (
inst.rest[0].resource[61].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-code"
)
assert (
inst.rest[0].resource[61].searchParam[1].documentation
== "Name used to invoke the operation"
)
assert inst.rest[0].resource[61].searchParam[1].name == "code"
assert inst.rest[0].resource[61].searchParam[1].type == "token"
assert (
inst.rest[0].resource[61].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-date"
)
assert (
inst.rest[0].resource[61].searchParam[2].documentation
== "Date for this version of the operation definition"
)
assert inst.rest[0].resource[61].searchParam[2].name == "date"
assert inst.rest[0].resource[61].searchParam[2].type == "date"
assert (
inst.rest[0].resource[61].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-type"
)
assert (
inst.rest[0].resource[61].searchParam[3].documentation
== "Invoke at resource level for these type"
)
assert inst.rest[0].resource[61].searchParam[3].name == "type"
assert inst.rest[0].resource[61].searchParam[3].type == "token"
assert (
inst.rest[0].resource[61].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-url"
)
assert (
inst.rest[0].resource[61].searchParam[4].documentation
== "Logical URL to reference this operation definition"
)
assert inst.rest[0].resource[61].searchParam[4].name == "url"
assert inst.rest[0].resource[61].searchParam[4].type == "uri"
assert (
inst.rest[0].resource[61].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-kind"
)
assert inst.rest[0].resource[61].searchParam[5].documentation == "operation | query"
assert inst.rest[0].resource[61].searchParam[5].name == "kind"
assert inst.rest[0].resource[61].searchParam[5].type == "token"
assert (
inst.rest[0].resource[61].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-version"
)
assert (
inst.rest[0].resource[61].searchParam[6].documentation
== "Logical id for this version of the operation definition"
)
assert inst.rest[0].resource[61].searchParam[6].name == "version"
assert inst.rest[0].resource[61].searchParam[6].type == "token"
assert (
inst.rest[0].resource[61].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-publisher"
)
assert (
inst.rest[0].resource[61].searchParam[7].documentation
== "Name of the publisher (Organization or individual)"
)
assert inst.rest[0].resource[61].searchParam[7].name == "publisher"
assert inst.rest[0].resource[61].searchParam[7].type == "string"
assert (
inst.rest[0].resource[61].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-system"
)
assert (
inst.rest[0].resource[61].searchParam[8].documentation
== "Invoke at the system level?"
)
assert inst.rest[0].resource[61].searchParam[8].name == "system"
assert inst.rest[0].resource[61].searchParam[8].type == "token"
assert (
inst.rest[0].resource[61].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-name"
)
assert (
inst.rest[0].resource[61].searchParam[9].documentation
== "Informal name for this operation"
)
assert inst.rest[0].resource[61].searchParam[9].name == "name"
assert inst.rest[0].resource[61].searchParam[9].type == "string"
assert (
inst.rest[0].resource[61].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-base"
)
assert (
inst.rest[0].resource[61].searchParam[10].documentation
== "Marks this as a profile of the base"
)
assert inst.rest[0].resource[61].searchParam[10].name == "base"
assert inst.rest[0].resource[61].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[61].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-instance"
)
assert (
inst.rest[0].resource[61].searchParam[11].documentation
== "Invoke on an instance?"
)
assert inst.rest[0].resource[61].searchParam[11].name == "instance"
assert inst.rest[0].resource[61].searchParam[11].type == "token"
assert (
inst.rest[0].resource[61].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/operationdefinition-profile"
)
assert (
inst.rest[0].resource[61].searchParam[12].documentation == "Profile on the type"
)
assert inst.rest[0].resource[61].searchParam[12].name == "profile"
assert inst.rest[0].resource[61].searchParam[12].type == "reference"
assert inst.rest[0].resource[61].searchRevInclude[0] == "OperationDefinition.base"
assert inst.rest[0].resource[61].type == "OperationDefinition"
assert inst.rest[0].resource[62].conditionalCreate == True
assert inst.rest[0].resource[62].conditionalDelete == "multiple"
assert inst.rest[0].resource[62].conditionalUpdate == True
assert inst.rest[0].resource[62].interaction[0].code == "read"
assert (
inst.rest[0].resource[62].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[1].code == "vread"
assert (
inst.rest[0].resource[62].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[2].code == "update"
assert (
inst.rest[0].resource[62].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[3].code == "delete"
assert (
inst.rest[0].resource[62].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[62].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[5].code == "validate"
assert (
inst.rest[0].resource[62].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[62].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[7].code == "create"
assert (
inst.rest[0].resource[62].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[62].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[62].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[62].profile.reference
== "http://hl7.org/fhir/StructureDefinition/OperationOutcome"
)
assert inst.rest[0].resource[62].type == "OperationOutcome"
assert inst.rest[0].resource[63].conditionalCreate == True
assert inst.rest[0].resource[63].conditionalDelete == "multiple"
assert inst.rest[0].resource[63].conditionalUpdate == True
assert inst.rest[0].resource[63].interaction[0].code == "read"
assert (
inst.rest[0].resource[63].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[1].code == "vread"
assert (
inst.rest[0].resource[63].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[2].code == "update"
assert (
inst.rest[0].resource[63].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[3].code == "delete"
assert (
inst.rest[0].resource[63].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[63].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[5].code == "validate"
assert (
inst.rest[0].resource[63].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[63].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[7].code == "create"
assert (
inst.rest[0].resource[63].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[63].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[63].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[63].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Order"
)
assert inst.rest[0].resource[63].searchInclude[0] == "Order.detail"
assert inst.rest[0].resource[63].searchInclude[1] == "Order.patient"
assert inst.rest[0].resource[63].searchInclude[2] == "Order.source"
assert inst.rest[0].resource[63].searchInclude[3] == "Order.subject"
assert inst.rest[0].resource[63].searchInclude[4] == "Order.target"
assert (
inst.rest[0].resource[63].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/order-detail"
)
assert (
inst.rest[0].resource[63].searchParam[0].documentation
== "What action is being ordered"
)
assert inst.rest[0].resource[63].searchParam[0].name == "detail"
assert inst.rest[0].resource[63].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[63].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/order-patient"
)
assert (
inst.rest[0].resource[63].searchParam[1].documentation
== "Patient this order is about"
)
assert inst.rest[0].resource[63].searchParam[1].name == "patient"
assert inst.rest[0].resource[63].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[63].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/order-source"
)
assert (
inst.rest[0].resource[63].searchParam[2].documentation
== "Who initiated the order"
)
assert inst.rest[0].resource[63].searchParam[2].name == "source"
assert inst.rest[0].resource[63].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[63].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/order-subject"
)
assert (
inst.rest[0].resource[63].searchParam[3].documentation
== "Patient this order is about"
)
assert inst.rest[0].resource[63].searchParam[3].name == "subject"
assert inst.rest[0].resource[63].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[63].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/order-when"
)
assert inst.rest[0].resource[63].searchParam[4].documentation == "A formal schedule"
assert inst.rest[0].resource[63].searchParam[4].name == "when"
assert inst.rest[0].resource[63].searchParam[4].type == "date"
assert (
inst.rest[0].resource[63].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/order-target"
)
assert (
inst.rest[0].resource[63].searchParam[5].documentation
== "Who is intended to fulfill the order"
)
assert inst.rest[0].resource[63].searchParam[5].name == "target"
assert inst.rest[0].resource[63].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[63].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/order-whencode"
)
assert (
inst.rest[0].resource[63].searchParam[6].documentation
== "Code specifies when request should be done. The code may simply be a priority code"
)
assert inst.rest[0].resource[63].searchParam[6].name == "when_code"
assert inst.rest[0].resource[63].searchParam[6].type == "token"
assert (
inst.rest[0].resource[63].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/order-date"
)
assert (
inst.rest[0].resource[63].searchParam[7].documentation
== "When the order was made"
)
assert inst.rest[0].resource[63].searchParam[7].name == "date"
assert inst.rest[0].resource[63].searchParam[7].type == "date"
assert (
inst.rest[0].resource[63].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/order-identifier"
)
assert (
inst.rest[0].resource[63].searchParam[8].documentation
== "Instance id from source, target, and/or others"
)
assert inst.rest[0].resource[63].searchParam[8].name == "identifier"
assert inst.rest[0].resource[63].searchParam[8].type == "token"
assert inst.rest[0].resource[63].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[63].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[63].searchRevInclude[2] == "OrderResponse.request"
assert inst.rest[0].resource[63].type == "Order"
assert inst.rest[0].resource[64].conditionalCreate == True
assert inst.rest[0].resource[64].conditionalDelete == "multiple"
assert inst.rest[0].resource[64].conditionalUpdate == True
assert inst.rest[0].resource[64].interaction[0].code == "read"
assert (
inst.rest[0].resource[64].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[1].code == "vread"
assert (
inst.rest[0].resource[64].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[2].code == "update"
assert (
inst.rest[0].resource[64].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[3].code == "delete"
assert (
inst.rest[0].resource[64].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[64].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[5].code == "validate"
assert (
inst.rest[0].resource[64].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[64].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[7].code == "create"
assert (
inst.rest[0].resource[64].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[64].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[64].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[64].profile.reference
== "http://hl7.org/fhir/StructureDefinition/OrderResponse"
)
assert inst.rest[0].resource[64].searchInclude[0] == "OrderResponse.fulfillment"
assert inst.rest[0].resource[64].searchInclude[1] == "OrderResponse.request"
assert inst.rest[0].resource[64].searchInclude[2] == "OrderResponse.who"
assert (
inst.rest[0].resource[64].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-fulfillment"
)
assert (
inst.rest[0].resource[64].searchParam[0].documentation
== "Details of the outcome of performing the order"
)
assert inst.rest[0].resource[64].searchParam[0].name == "fulfillment"
assert inst.rest[0].resource[64].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[64].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-request"
)
assert (
inst.rest[0].resource[64].searchParam[1].documentation
== "The order that this is a response to"
)
assert inst.rest[0].resource[64].searchParam[1].name == "request"
assert inst.rest[0].resource[64].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[64].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-code"
)
assert (
inst.rest[0].resource[64].searchParam[2].documentation
== "pending | review | rejected | error | accepted | cancelled | replaced | aborted | completed"
)
assert inst.rest[0].resource[64].searchParam[2].name == "code"
assert inst.rest[0].resource[64].searchParam[2].type == "token"
assert (
inst.rest[0].resource[64].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-date"
)
assert (
inst.rest[0].resource[64].searchParam[3].documentation
== "When the response was made"
)
assert inst.rest[0].resource[64].searchParam[3].name == "date"
assert inst.rest[0].resource[64].searchParam[3].type == "date"
assert (
inst.rest[0].resource[64].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-identifier"
)
assert (
inst.rest[0].resource[64].searchParam[4].documentation
== "Identifiers assigned to this order by the orderer or by the receiver"
)
assert inst.rest[0].resource[64].searchParam[4].name == "identifier"
assert inst.rest[0].resource[64].searchParam[4].type == "token"
assert (
inst.rest[0].resource[64].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/orderresponse-who"
)
assert (
inst.rest[0].resource[64].searchParam[5].documentation
== "Who made the response"
)
assert inst.rest[0].resource[64].searchParam[5].name == "who"
assert inst.rest[0].resource[64].searchParam[5].type == "reference"
assert inst.rest[0].resource[64].type == "OrderResponse"
assert inst.rest[0].resource[65].conditionalCreate == True
assert inst.rest[0].resource[65].conditionalDelete == "multiple"
assert inst.rest[0].resource[65].conditionalUpdate == True
assert inst.rest[0].resource[65].interaction[0].code == "read"
assert (
inst.rest[0].resource[65].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[1].code == "vread"
assert (
inst.rest[0].resource[65].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[2].code == "update"
assert (
inst.rest[0].resource[65].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[3].code == "delete"
assert (
inst.rest[0].resource[65].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[65].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[5].code == "validate"
assert (
inst.rest[0].resource[65].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[65].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[7].code == "create"
assert (
inst.rest[0].resource[65].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[65].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[65].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[65].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Organization"
)
assert inst.rest[0].resource[65].searchInclude[0] == "Organization.partof"
assert (
inst.rest[0].resource[65].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/organization-address-state"
)
assert (
inst.rest[0].resource[65].searchParam[0].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[65].searchParam[0].name == "address-state"
assert inst.rest[0].resource[65].searchParam[0].type == "string"
assert (
inst.rest[0].resource[65].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/organization-address-city"
)
assert (
inst.rest[0].resource[65].searchParam[1].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[65].searchParam[1].name == "address-city"
assert inst.rest[0].resource[65].searchParam[1].type == "string"
assert (
inst.rest[0].resource[65].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/organization-phonetic"
)
assert (
inst.rest[0].resource[65].searchParam[2].documentation
== "A portion of the organization's name using some kind of phonetic matching algorithm"
)
assert inst.rest[0].resource[65].searchParam[2].name == "phonetic"
assert inst.rest[0].resource[65].searchParam[2].type == "string"
assert (
inst.rest[0].resource[65].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/organization-partof"
)
assert (
inst.rest[0].resource[65].searchParam[3].documentation
== "Search all organizations that are part of the given organization"
)
assert inst.rest[0].resource[65].searchParam[3].name == "partof"
assert inst.rest[0].resource[65].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[65].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/organization-address"
)
assert (
inst.rest[0].resource[65].searchParam[4].documentation
== "A (part of the) address of the Organization"
)
assert inst.rest[0].resource[65].searchParam[4].name == "address"
assert inst.rest[0].resource[65].searchParam[4].type == "string"
assert (
inst.rest[0].resource[65].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/organization-address-use"
)
assert (
inst.rest[0].resource[65].searchParam[5].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[65].searchParam[5].name == "address-use"
assert inst.rest[0].resource[65].searchParam[5].type == "token"
assert (
inst.rest[0].resource[65].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/organization-name"
)
assert (
inst.rest[0].resource[65].searchParam[6].documentation
== "A portion of the organization's name"
)
assert inst.rest[0].resource[65].searchParam[6].name == "name"
assert inst.rest[0].resource[65].searchParam[6].type == "string"
assert (
inst.rest[0].resource[65].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/organization-address-country"
)
assert (
inst.rest[0].resource[65].searchParam[7].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[65].searchParam[7].name == "address-country"
assert inst.rest[0].resource[65].searchParam[7].type == "string"
assert (
inst.rest[0].resource[65].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/organization-active"
)
assert (
inst.rest[0].resource[65].searchParam[8].documentation
== "Whether the organization's record is active"
)
assert inst.rest[0].resource[65].searchParam[8].name == "active"
assert inst.rest[0].resource[65].searchParam[8].type == "token"
assert (
inst.rest[0].resource[65].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/organization-type"
)
assert (
inst.rest[0].resource[65].searchParam[9].documentation
== "A code for the type of organization"
)
assert inst.rest[0].resource[65].searchParam[9].name == "type"
assert inst.rest[0].resource[65].searchParam[9].type == "token"
assert (
inst.rest[0].resource[65].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/organization-identifier"
)
assert (
inst.rest[0].resource[65].searchParam[10].documentation
== "Any identifier for the organization (not the accreditation issuer's identifier)"
)
assert inst.rest[0].resource[65].searchParam[10].name == "identifier"
assert inst.rest[0].resource[65].searchParam[10].type == "token"
assert (
inst.rest[0].resource[65].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/organization-address-postalcode"
)
assert (
inst.rest[0].resource[65].searchParam[11].documentation
== "A postal code specified in an address"
)
assert inst.rest[0].resource[65].searchParam[11].name == "address-postalcode"
assert inst.rest[0].resource[65].searchParam[11].type == "string"
assert inst.rest[0].resource[65].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[65].searchRevInclude[1] == "Account.subject"
assert inst.rest[0].resource[65].searchRevInclude[2] == "Account.owner"
assert inst.rest[0].resource[65].searchRevInclude[3] == "AuditEvent.patient"
assert inst.rest[0].resource[65].searchRevInclude[4] == "AuditEvent.participant"
assert inst.rest[0].resource[65].searchRevInclude[5] == "CarePlan.participant"
assert inst.rest[0].resource[65].searchRevInclude[6] == "CarePlan.performer"
assert inst.rest[0].resource[65].searchRevInclude[7] == "Communication.sender"
assert inst.rest[0].resource[65].searchRevInclude[8] == "Communication.recipient"
assert (
inst.rest[0].resource[65].searchRevInclude[9] == "CommunicationRequest.sender"
)
assert (
inst.rest[0].resource[65].searchRevInclude[10]
== "CommunicationRequest.recipient"
)
assert inst.rest[0].resource[65].searchRevInclude[11] == "Composition.attester"
assert inst.rest[0].resource[65].searchRevInclude[12] == "Contract.signer"
assert inst.rest[0].resource[65].searchRevInclude[13] == "Contract.actor"
assert inst.rest[0].resource[65].searchRevInclude[14] == "Coverage.issuer"
assert inst.rest[0].resource[65].searchRevInclude[15] == "Device.organization"
assert (
inst.rest[0].resource[65].searchRevInclude[16] == "DiagnosticReport.performer"
)
assert (
inst.rest[0].resource[65].searchRevInclude[17] == "DocumentManifest.recipient"
)
assert inst.rest[0].resource[65].searchRevInclude[18] == "DocumentManifest.author"
assert inst.rest[0].resource[65].searchRevInclude[19] == "DocumentReference.author"
assert (
inst.rest[0].resource[65].searchRevInclude[20] == "DocumentReference.custodian"
)
assert (
inst.rest[0].resource[65].searchRevInclude[21]
== "DocumentReference.authenticator"
)
assert (
inst.rest[0].resource[65].searchRevInclude[22] == "EpisodeOfCare.organization"
)
assert inst.rest[0].resource[65].searchRevInclude[23] == "EpisodeOfCare.team-member"
assert inst.rest[0].resource[65].searchRevInclude[24] == "Flag.author"
assert inst.rest[0].resource[65].searchRevInclude[25] == "Flag.patient"
assert inst.rest[0].resource[65].searchRevInclude[26] == "Flag.subject"
assert inst.rest[0].resource[65].searchRevInclude[27] == "Goal.patient"
assert inst.rest[0].resource[65].searchRevInclude[28] == "Goal.subject"
assert (
inst.rest[0].resource[65].searchRevInclude[29]
== "HealthcareService.organization"
)
assert (
inst.rest[0].resource[65].searchRevInclude[30]
== "ImagingObjectSelection.author"
)
assert inst.rest[0].resource[65].searchRevInclude[31] == "Immunization.manufacturer"
assert inst.rest[0].resource[65].searchRevInclude[32] == "Location.organization"
assert inst.rest[0].resource[65].searchRevInclude[33] == "Medication.manufacturer"
assert inst.rest[0].resource[65].searchRevInclude[34] == "MessageHeader.receiver"
assert inst.rest[0].resource[65].searchRevInclude[35] == "MessageHeader.responsible"
assert inst.rest[0].resource[65].searchRevInclude[36] == "Observation.performer"
assert inst.rest[0].resource[65].searchRevInclude[37] == "Order.source"
assert inst.rest[0].resource[65].searchRevInclude[38] == "Order.target"
assert inst.rest[0].resource[65].searchRevInclude[39] == "OrderResponse.who"
assert inst.rest[0].resource[65].searchRevInclude[40] == "Organization.partof"
assert inst.rest[0].resource[65].searchRevInclude[41] == "Patient.organization"
assert inst.rest[0].resource[65].searchRevInclude[42] == "Patient.careprovider"
assert inst.rest[0].resource[65].searchRevInclude[43] == "Person.organization"
assert inst.rest[0].resource[65].searchRevInclude[44] == "Practitioner.organization"
assert inst.rest[0].resource[65].searchRevInclude[45] == "Procedure.performer"
assert (
inst.rest[0].resource[65].searchRevInclude[46] == "ProcedureRequest.performer"
)
assert (
inst.rest[0].resource[65].searchRevInclude[47] == "ProcessRequest.organization"
)
assert (
inst.rest[0].resource[65].searchRevInclude[48] == "ProcessResponse.organization"
)
assert (
inst.rest[0].resource[65].searchRevInclude[49]
== "ProcessResponse.requestorganization"
)
assert inst.rest[0].resource[65].searchRevInclude[50] == "Provenance.agent"
assert inst.rest[0].resource[65].searchRevInclude[51] == "ReferralRequest.requester"
assert inst.rest[0].resource[65].searchRevInclude[52] == "ReferralRequest.recipient"
assert inst.rest[0].resource[65].searchRevInclude[53] == "SupplyRequest.source"
assert inst.rest[0].resource[65].searchRevInclude[54] == "SupplyRequest.supplier"
assert inst.rest[0].resource[65].type == "Organization"
assert inst.rest[0].resource[66].conditionalCreate == True
assert inst.rest[0].resource[66].conditionalDelete == "multiple"
assert inst.rest[0].resource[66].conditionalUpdate == True
assert inst.rest[0].resource[66].interaction[0].code == "read"
assert (
inst.rest[0].resource[66].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[1].code == "vread"
assert (
inst.rest[0].resource[66].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[2].code == "update"
assert (
inst.rest[0].resource[66].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[3].code == "delete"
assert (
inst.rest[0].resource[66].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[66].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[5].code == "validate"
assert (
inst.rest[0].resource[66].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[66].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[7].code == "create"
assert (
inst.rest[0].resource[66].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[66].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[66].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[66].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Patient"
)
assert inst.rest[0].resource[66].searchInclude[0] == "Patient.link"
assert inst.rest[0].resource[66].searchInclude[1] == "Patient.organization"
assert inst.rest[0].resource[66].searchInclude[2] == "Patient.careprovider"
assert (
inst.rest[0].resource[66].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/patient-animal-breed"
)
assert (
inst.rest[0].resource[66].searchParam[0].documentation
== "The breed for animal patients"
)
assert inst.rest[0].resource[66].searchParam[0].name == "animal-breed"
assert inst.rest[0].resource[66].searchParam[0].type == "token"
assert (
inst.rest[0].resource[66].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/patient-phone"
)
assert (
inst.rest[0].resource[66].searchParam[1].documentation
== "A value in a phone contact"
)
assert inst.rest[0].resource[66].searchParam[1].name == "phone"
assert inst.rest[0].resource[66].searchParam[1].type == "token"
assert (
inst.rest[0].resource[66].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/patient-phonetic"
)
assert (
inst.rest[0].resource[66].searchParam[2].documentation
== "A portion of either family or given name using some kind of phonetic matching algorithm"
)
assert inst.rest[0].resource[66].searchParam[2].name == "phonetic"
assert inst.rest[0].resource[66].searchParam[2].type == "string"
assert (
inst.rest[0].resource[66].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/patient-link"
)
assert (
inst.rest[0].resource[66].searchParam[3].documentation
== "All patients linked to the given patient"
)
assert inst.rest[0].resource[66].searchParam[3].name == "link"
assert inst.rest[0].resource[66].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[66].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/patient-address-country"
)
assert (
inst.rest[0].resource[66].searchParam[4].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[66].searchParam[4].name == "address-country"
assert inst.rest[0].resource[66].searchParam[4].type == "string"
assert (
inst.rest[0].resource[66].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/patient-animal-species"
)
assert (
inst.rest[0].resource[66].searchParam[5].documentation
== "The species for animal patients"
)
assert inst.rest[0].resource[66].searchParam[5].name == "animal-species"
assert inst.rest[0].resource[66].searchParam[5].type == "token"
assert (
inst.rest[0].resource[66].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/patient-deathdate"
)
assert (
inst.rest[0].resource[66].searchParam[6].documentation
== "The date of death has been provided and satisfies this search value"
)
assert inst.rest[0].resource[66].searchParam[6].name == "deathdate"
assert inst.rest[0].resource[66].searchParam[6].type == "date"
assert (
inst.rest[0].resource[66].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/patient-organization"
)
assert (
inst.rest[0].resource[66].searchParam[7].documentation
== "The organization at which this person is a patient"
)
assert inst.rest[0].resource[66].searchParam[7].name == "organization"
assert inst.rest[0].resource[66].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[66].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/patient-address-city"
)
assert (
inst.rest[0].resource[66].searchParam[8].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[66].searchParam[8].name == "address-city"
assert inst.rest[0].resource[66].searchParam[8].type == "string"
assert (
inst.rest[0].resource[66].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/patient-address-state"
)
assert (
inst.rest[0].resource[66].searchParam[9].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[66].searchParam[9].name == "address-state"
assert inst.rest[0].resource[66].searchParam[9].type == "string"
assert (
inst.rest[0].resource[66].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/patient-careprovider"
)
assert (
inst.rest[0].resource[66].searchParam[10].documentation
== "Patient's nominated care provider, could be a care manager, not the organization that manages the record"
)
assert inst.rest[0].resource[66].searchParam[10].name == "careprovider"
assert inst.rest[0].resource[66].searchParam[10].type == "reference"
assert (
inst.rest[0].resource[66].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/patient-given"
)
assert (
inst.rest[0].resource[66].searchParam[11].documentation
== "A portion of the given name of the patient"
)
assert inst.rest[0].resource[66].searchParam[11].name == "given"
assert inst.rest[0].resource[66].searchParam[11].type == "string"
assert (
inst.rest[0].resource[66].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/patient-email"
)
assert (
inst.rest[0].resource[66].searchParam[12].documentation
== "A value in an email contact"
)
assert inst.rest[0].resource[66].searchParam[12].name == "email"
assert inst.rest[0].resource[66].searchParam[12].type == "token"
assert (
inst.rest[0].resource[66].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/patient-address"
)
assert (
inst.rest[0].resource[66].searchParam[13].documentation
== "An address in any kind of address/part of the patient"
)
assert inst.rest[0].resource[66].searchParam[13].name == "address"
assert inst.rest[0].resource[66].searchParam[13].type == "string"
assert (
inst.rest[0].resource[66].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/patient-address-use"
)
assert (
inst.rest[0].resource[66].searchParam[14].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[66].searchParam[14].name == "address-use"
assert inst.rest[0].resource[66].searchParam[14].type == "token"
assert (
inst.rest[0].resource[66].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/patient-family"
)
assert (
inst.rest[0].resource[66].searchParam[15].documentation
== "A portion of the family name of the patient"
)
assert inst.rest[0].resource[66].searchParam[15].name == "family"
assert inst.rest[0].resource[66].searchParam[15].type == "string"
assert (
inst.rest[0].resource[66].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/patient-name"
)
assert (
inst.rest[0].resource[66].searchParam[16].documentation
== "A portion of either family or given name of the patient"
)
assert inst.rest[0].resource[66].searchParam[16].name == "name"
assert inst.rest[0].resource[66].searchParam[16].type == "string"
assert (
inst.rest[0].resource[66].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/patient-birthdate"
)
assert (
inst.rest[0].resource[66].searchParam[17].documentation
== "The patient's date of birth"
)
assert inst.rest[0].resource[66].searchParam[17].name == "birthdate"
assert inst.rest[0].resource[66].searchParam[17].type == "date"
assert (
inst.rest[0].resource[66].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/patient-telecom"
)
assert (
inst.rest[0].resource[66].searchParam[18].documentation
== "The value in any kind of telecom details of the patient"
)
assert inst.rest[0].resource[66].searchParam[18].name == "telecom"
assert inst.rest[0].resource[66].searchParam[18].type == "token"
assert (
inst.rest[0].resource[66].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/patient-active"
)
assert (
inst.rest[0].resource[66].searchParam[19].documentation
== "Whether the patient record is active"
)
assert inst.rest[0].resource[66].searchParam[19].name == "active"
assert inst.rest[0].resource[66].searchParam[19].type == "token"
assert (
inst.rest[0].resource[66].searchParam[20].definition
== "http://hl7.org/fhir/SearchParameter/patient-gender"
)
assert (
inst.rest[0].resource[66].searchParam[20].documentation
== "Gender of the patient"
)
assert inst.rest[0].resource[66].searchParam[20].name == "gender"
assert inst.rest[0].resource[66].searchParam[20].type == "token"
assert (
inst.rest[0].resource[66].searchParam[21].definition
== "http://hl7.org/fhir/SearchParameter/patient-deceased"
)
assert (
inst.rest[0].resource[66].searchParam[21].documentation
== "This patient has been marked as deceased, or as a death date entered"
)
assert inst.rest[0].resource[66].searchParam[21].name == "deceased"
assert inst.rest[0].resource[66].searchParam[21].type == "token"
assert (
inst.rest[0].resource[66].searchParam[22].definition
== "http://hl7.org/fhir/SearchParameter/patient-language"
)
assert (
inst.rest[0].resource[66].searchParam[22].documentation
== "Language code (irrespective of use value)"
)
assert inst.rest[0].resource[66].searchParam[22].name == "language"
assert inst.rest[0].resource[66].searchParam[22].type == "token"
assert (
inst.rest[0].resource[66].searchParam[23].definition
== "http://hl7.org/fhir/SearchParameter/patient-identifier"
)
assert (
inst.rest[0].resource[66].searchParam[23].documentation
== "A patient identifier"
)
assert inst.rest[0].resource[66].searchParam[23].name == "identifier"
assert inst.rest[0].resource[66].searchParam[23].type == "token"
assert (
inst.rest[0].resource[66].searchParam[24].definition
== "http://hl7.org/fhir/SearchParameter/patient-address-postalcode"
)
assert (
inst.rest[0].resource[66].searchParam[24].documentation
== "A postalCode specified in an address"
)
assert inst.rest[0].resource[66].searchParam[24].name == "address-postalcode"
assert inst.rest[0].resource[66].searchParam[24].type == "string"
assert inst.rest[0].resource[66].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[66].searchRevInclude[1] == "Account.subject"
assert (
inst.rest[0].resource[66].searchRevInclude[2] == "AllergyIntolerance.reporter"
)
assert inst.rest[0].resource[66].searchRevInclude[3] == "AllergyIntolerance.patient"
assert (
inst.rest[0].resource[66].searchRevInclude[4] == "AllergyIntolerance.recorder"
)
assert inst.rest[0].resource[66].searchRevInclude[5] == "Appointment.patient"
assert inst.rest[0].resource[66].searchRevInclude[6] == "Appointment.practitioner"
assert inst.rest[0].resource[66].searchRevInclude[7] == "Appointment.location"
assert inst.rest[0].resource[66].searchRevInclude[8] == "Appointment.actor"
assert (
inst.rest[0].resource[66].searchRevInclude[9] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[10]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[66].searchRevInclude[11] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[66].searchRevInclude[12] == "AppointmentResponse.actor"
assert inst.rest[0].resource[66].searchRevInclude[13] == "AuditEvent.patient"
assert inst.rest[0].resource[66].searchRevInclude[14] == "AuditEvent.participant"
assert inst.rest[0].resource[66].searchRevInclude[15] == "Basic.author"
assert inst.rest[0].resource[66].searchRevInclude[16] == "BodySite.patient"
assert inst.rest[0].resource[66].searchRevInclude[17] == "CarePlan.subject"
assert inst.rest[0].resource[66].searchRevInclude[18] == "CarePlan.patient"
assert inst.rest[0].resource[66].searchRevInclude[19] == "CarePlan.participant"
assert inst.rest[0].resource[66].searchRevInclude[20] == "CarePlan.performer"
assert inst.rest[0].resource[66].searchRevInclude[21] == "Claim.patient"
assert (
inst.rest[0].resource[66].searchRevInclude[22] == "ClinicalImpression.patient"
)
assert inst.rest[0].resource[66].searchRevInclude[23] == "Communication.sender"
assert inst.rest[0].resource[66].searchRevInclude[24] == "Communication.patient"
assert inst.rest[0].resource[66].searchRevInclude[25] == "Communication.subject"
assert inst.rest[0].resource[66].searchRevInclude[26] == "Communication.recipient"
assert (
inst.rest[0].resource[66].searchRevInclude[27] == "CommunicationRequest.sender"
)
assert (
inst.rest[0].resource[66].searchRevInclude[28]
== "CommunicationRequest.requester"
)
assert (
inst.rest[0].resource[66].searchRevInclude[29] == "CommunicationRequest.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[30] == "CommunicationRequest.subject"
)
assert (
inst.rest[0].resource[66].searchRevInclude[31]
== "CommunicationRequest.recipient"
)
assert inst.rest[0].resource[66].searchRevInclude[32] == "Composition.author"
assert inst.rest[0].resource[66].searchRevInclude[33] == "Composition.attester"
assert inst.rest[0].resource[66].searchRevInclude[34] == "Condition.asserter"
assert inst.rest[0].resource[66].searchRevInclude[35] == "Condition.patient"
assert inst.rest[0].resource[66].searchRevInclude[36] == "Contract.signer"
assert inst.rest[0].resource[66].searchRevInclude[37] == "Contract.actor"
assert inst.rest[0].resource[66].searchRevInclude[38] == "DetectedIssue.patient"
assert inst.rest[0].resource[66].searchRevInclude[39] == "Device.patient"
assert inst.rest[0].resource[66].searchRevInclude[40] == "DeviceUseRequest.patient"
assert inst.rest[0].resource[66].searchRevInclude[41] == "DeviceUseRequest.subject"
assert (
inst.rest[0].resource[66].searchRevInclude[42] == "DeviceUseStatement.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[43] == "DeviceUseStatement.subject"
)
assert inst.rest[0].resource[66].searchRevInclude[44] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[66].searchRevInclude[45] == "DiagnosticOrder.patient"
assert inst.rest[0].resource[66].searchRevInclude[46] == "DiagnosticReport.subject"
assert inst.rest[0].resource[66].searchRevInclude[47] == "DiagnosticReport.patient"
assert inst.rest[0].resource[66].searchRevInclude[48] == "DocumentManifest.subject"
assert (
inst.rest[0].resource[66].searchRevInclude[49] == "DocumentManifest.recipient"
)
assert inst.rest[0].resource[66].searchRevInclude[50] == "DocumentManifest.author"
assert inst.rest[0].resource[66].searchRevInclude[51] == "DocumentManifest.patient"
assert inst.rest[0].resource[66].searchRevInclude[52] == "DocumentReference.subject"
assert inst.rest[0].resource[66].searchRevInclude[53] == "DocumentReference.author"
assert inst.rest[0].resource[66].searchRevInclude[54] == "DocumentReference.patient"
assert inst.rest[0].resource[66].searchRevInclude[55] == "Encounter.patient"
assert inst.rest[0].resource[66].searchRevInclude[56] == "EnrollmentRequest.patient"
assert inst.rest[0].resource[66].searchRevInclude[57] == "EnrollmentRequest.subject"
assert inst.rest[0].resource[66].searchRevInclude[58] == "EpisodeOfCare.patient"
assert (
inst.rest[0].resource[66].searchRevInclude[59] == "FamilyMemberHistory.patient"
)
assert inst.rest[0].resource[66].searchRevInclude[60] == "Flag.author"
assert inst.rest[0].resource[66].searchRevInclude[61] == "Flag.patient"
assert inst.rest[0].resource[66].searchRevInclude[62] == "Flag.subject"
assert inst.rest[0].resource[66].searchRevInclude[63] == "Goal.patient"
assert inst.rest[0].resource[66].searchRevInclude[64] == "Goal.subject"
assert inst.rest[0].resource[66].searchRevInclude[65] == "Group.member"
assert (
inst.rest[0].resource[66].searchRevInclude[66]
== "ImagingObjectSelection.author"
)
assert (
inst.rest[0].resource[66].searchRevInclude[67]
== "ImagingObjectSelection.patient"
)
assert inst.rest[0].resource[66].searchRevInclude[68] == "ImagingStudy.patient"
assert inst.rest[0].resource[66].searchRevInclude[69] == "Immunization.patient"
assert (
inst.rest[0].resource[66].searchRevInclude[70]
== "ImmunizationRecommendation.patient"
)
assert inst.rest[0].resource[66].searchRevInclude[71] == "List.patient"
assert inst.rest[0].resource[66].searchRevInclude[72] == "List.source"
assert inst.rest[0].resource[66].searchRevInclude[73] == "List.subject"
assert inst.rest[0].resource[66].searchRevInclude[74] == "Media.patient"
assert inst.rest[0].resource[66].searchRevInclude[75] == "Media.subject"
assert (
inst.rest[0].resource[66].searchRevInclude[76]
== "MedicationAdministration.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[77]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[66].searchRevInclude[78] == "MedicationDispense.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[79] == "MedicationDispense.receiver"
)
assert inst.rest[0].resource[66].searchRevInclude[80] == "MedicationOrder.patient"
assert (
inst.rest[0].resource[66].searchRevInclude[81] == "MedicationStatement.patient"
)
assert (
inst.rest[0].resource[66].searchRevInclude[82] == "MedicationStatement.source"
)
assert inst.rest[0].resource[66].searchRevInclude[83] == "NutritionOrder.patient"
assert inst.rest[0].resource[66].searchRevInclude[84] == "Observation.subject"
assert inst.rest[0].resource[66].searchRevInclude[85] == "Observation.patient"
assert inst.rest[0].resource[66].searchRevInclude[86] == "Observation.performer"
assert inst.rest[0].resource[66].searchRevInclude[87] == "Order.patient"
assert inst.rest[0].resource[66].searchRevInclude[88] == "Order.subject"
assert inst.rest[0].resource[66].searchRevInclude[89] == "Patient.link"
assert inst.rest[0].resource[66].searchRevInclude[90] == "Person.link"
assert inst.rest[0].resource[66].searchRevInclude[91] == "Person.relatedperson"
assert inst.rest[0].resource[66].searchRevInclude[92] == "Person.patient"
assert inst.rest[0].resource[66].searchRevInclude[93] == "Person.practitioner"
assert inst.rest[0].resource[66].searchRevInclude[94] == "Procedure.patient"
assert inst.rest[0].resource[66].searchRevInclude[95] == "Procedure.subject"
assert inst.rest[0].resource[66].searchRevInclude[96] == "Procedure.performer"
assert inst.rest[0].resource[66].searchRevInclude[97] == "ProcedureRequest.orderer"
assert inst.rest[0].resource[66].searchRevInclude[98] == "ProcedureRequest.patient"
assert inst.rest[0].resource[66].searchRevInclude[99] == "ProcedureRequest.subject"
assert (
inst.rest[0].resource[66].searchRevInclude[100] == "ProcedureRequest.performer"
)
assert inst.rest[0].resource[66].searchRevInclude[101] == "Provenance.agent"
assert (
inst.rest[0].resource[66].searchRevInclude[102]
== "QuestionnaireResponse.author"
)
assert (
inst.rest[0].resource[66].searchRevInclude[103]
== "QuestionnaireResponse.source"
)
assert (
inst.rest[0].resource[66].searchRevInclude[104] == "ReferralRequest.requester"
)
assert inst.rest[0].resource[66].searchRevInclude[105] == "ReferralRequest.patient"
assert inst.rest[0].resource[66].searchRevInclude[106] == "RelatedPerson.patient"
assert inst.rest[0].resource[66].searchRevInclude[107] == "RiskAssessment.patient"
assert inst.rest[0].resource[66].searchRevInclude[108] == "RiskAssessment.subject"
assert inst.rest[0].resource[66].searchRevInclude[109] == "Schedule.actor"
assert inst.rest[0].resource[66].searchRevInclude[110] == "Specimen.patient"
assert inst.rest[0].resource[66].searchRevInclude[111] == "Specimen.subject"
assert inst.rest[0].resource[66].searchRevInclude[112] == "SupplyDelivery.patient"
assert inst.rest[0].resource[66].searchRevInclude[113] == "SupplyRequest.patient"
assert inst.rest[0].resource[66].searchRevInclude[114] == "SupplyRequest.source"
assert (
inst.rest[0].resource[66].searchRevInclude[115] == "VisionPrescription.patient"
)
assert inst.rest[0].resource[66].type == "Patient"
assert inst.rest[0].resource[67].conditionalCreate == True
assert inst.rest[0].resource[67].conditionalDelete == "multiple"
assert inst.rest[0].resource[67].conditionalUpdate == True
assert inst.rest[0].resource[67].interaction[0].code == "read"
assert (
inst.rest[0].resource[67].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[1].code == "vread"
assert (
inst.rest[0].resource[67].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[2].code == "update"
assert (
inst.rest[0].resource[67].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[3].code == "delete"
assert (
inst.rest[0].resource[67].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[67].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[5].code == "validate"
assert (
inst.rest[0].resource[67].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[67].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[7].code == "create"
assert (
inst.rest[0].resource[67].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[67].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[67].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[67].profile.reference
== "http://hl7.org/fhir/StructureDefinition/PaymentNotice"
)
assert (
inst.rest[0].resource[67].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/paymentnotice-identifier"
)
assert (
inst.rest[0].resource[67].searchParam[0].documentation
== "The business identifier of the Eligibility"
)
assert inst.rest[0].resource[67].searchParam[0].name == "identifier"
assert inst.rest[0].resource[67].searchParam[0].type == "token"
assert inst.rest[0].resource[67].type == "PaymentNotice"
assert inst.rest[0].resource[68].conditionalCreate == True
assert inst.rest[0].resource[68].conditionalDelete == "multiple"
assert inst.rest[0].resource[68].conditionalUpdate == True
assert inst.rest[0].resource[68].interaction[0].code == "read"
assert (
inst.rest[0].resource[68].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[1].code == "vread"
assert (
inst.rest[0].resource[68].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[2].code == "update"
assert (
inst.rest[0].resource[68].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[3].code == "delete"
assert (
inst.rest[0].resource[68].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[68].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[5].code == "validate"
assert (
inst.rest[0].resource[68].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[68].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[7].code == "create"
assert (
inst.rest[0].resource[68].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[68].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[68].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[68].profile.reference
== "http://hl7.org/fhir/StructureDefinition/PaymentReconciliation"
)
assert (
inst.rest[0].resource[68].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/paymentreconciliation-identifier"
)
assert (
inst.rest[0].resource[68].searchParam[0].documentation
== "The business identifier of the Explanation of Benefit"
)
assert inst.rest[0].resource[68].searchParam[0].name == "identifier"
assert inst.rest[0].resource[68].searchParam[0].type == "token"
assert inst.rest[0].resource[68].type == "PaymentReconciliation"
assert inst.rest[0].resource[69].conditionalCreate == True
assert inst.rest[0].resource[69].conditionalDelete == "multiple"
assert inst.rest[0].resource[69].conditionalUpdate == True
assert inst.rest[0].resource[69].interaction[0].code == "read"
assert (
inst.rest[0].resource[69].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[1].code == "vread"
assert (
inst.rest[0].resource[69].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[2].code == "update"
assert (
inst.rest[0].resource[69].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[3].code == "delete"
assert (
inst.rest[0].resource[69].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[69].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[5].code == "validate"
assert (
inst.rest[0].resource[69].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[69].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[7].code == "create"
assert (
inst.rest[0].resource[69].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[69].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[69].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[69].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Person"
)
assert inst.rest[0].resource[69].searchInclude[0] == "Person.link"
assert inst.rest[0].resource[69].searchInclude[1] == "Person.relatedperson"
assert inst.rest[0].resource[69].searchInclude[2] == "Person.organization"
assert inst.rest[0].resource[69].searchInclude[3] == "Person.patient"
assert inst.rest[0].resource[69].searchInclude[4] == "Person.practitioner"
assert (
inst.rest[0].resource[69].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/person-phone"
)
assert (
inst.rest[0].resource[69].searchParam[0].documentation
== "A value in a phone contact"
)
assert inst.rest[0].resource[69].searchParam[0].name == "phone"
assert inst.rest[0].resource[69].searchParam[0].type == "token"
assert (
inst.rest[0].resource[69].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/person-phonetic"
)
assert (
inst.rest[0].resource[69].searchParam[1].documentation
== "A portion of name using some kind of phonetic matching algorithm"
)
assert inst.rest[0].resource[69].searchParam[1].name == "phonetic"
assert inst.rest[0].resource[69].searchParam[1].type == "string"
assert (
inst.rest[0].resource[69].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/person-link"
)
assert (
inst.rest[0].resource[69].searchParam[2].documentation
== "Any link has this Patient, Person, RelatedPerson or Practitioner reference"
)
assert inst.rest[0].resource[69].searchParam[2].name == "link"
assert inst.rest[0].resource[69].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[69].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/person-address-country"
)
assert (
inst.rest[0].resource[69].searchParam[3].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[69].searchParam[3].name == "address-country"
assert inst.rest[0].resource[69].searchParam[3].type == "string"
assert (
inst.rest[0].resource[69].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/person-relatedperson"
)
assert (
inst.rest[0].resource[69].searchParam[4].documentation
== "The Person links to this RelatedPerson"
)
assert inst.rest[0].resource[69].searchParam[4].name == "relatedperson"
assert inst.rest[0].resource[69].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[69].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/person-organization"
)
assert (
inst.rest[0].resource[69].searchParam[5].documentation
== "The organization at which this person record is being managed"
)
assert inst.rest[0].resource[69].searchParam[5].name == "organization"
assert inst.rest[0].resource[69].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[69].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/person-patient"
)
assert (
inst.rest[0].resource[69].searchParam[6].documentation
== "The Person links to this Patient"
)
assert inst.rest[0].resource[69].searchParam[6].name == "patient"
assert inst.rest[0].resource[69].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[69].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/person-address-city"
)
assert (
inst.rest[0].resource[69].searchParam[7].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[69].searchParam[7].name == "address-city"
assert inst.rest[0].resource[69].searchParam[7].type == "string"
assert (
inst.rest[0].resource[69].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/person-address-state"
)
assert (
inst.rest[0].resource[69].searchParam[8].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[69].searchParam[8].name == "address-state"
assert inst.rest[0].resource[69].searchParam[8].type == "string"
assert (
inst.rest[0].resource[69].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/person-practitioner"
)
assert (
inst.rest[0].resource[69].searchParam[9].documentation
== "The Person links to this Practitioner"
)
assert inst.rest[0].resource[69].searchParam[9].name == "practitioner"
assert inst.rest[0].resource[69].searchParam[9].type == "reference"
assert (
inst.rest[0].resource[69].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/person-email"
)
assert (
inst.rest[0].resource[69].searchParam[10].documentation
== "A value in an email contact"
)
assert inst.rest[0].resource[69].searchParam[10].name == "email"
assert inst.rest[0].resource[69].searchParam[10].type == "token"
assert (
inst.rest[0].resource[69].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/person-address"
)
assert (
inst.rest[0].resource[69].searchParam[11].documentation
== "An address in any kind of address/part"
)
assert inst.rest[0].resource[69].searchParam[11].name == "address"
assert inst.rest[0].resource[69].searchParam[11].type == "string"
assert (
inst.rest[0].resource[69].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/person-address-use"
)
assert (
inst.rest[0].resource[69].searchParam[12].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[69].searchParam[12].name == "address-use"
assert inst.rest[0].resource[69].searchParam[12].type == "token"
assert (
inst.rest[0].resource[69].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/person-name"
)
assert (
inst.rest[0].resource[69].searchParam[13].documentation
== "A portion of name in any name part"
)
assert inst.rest[0].resource[69].searchParam[13].name == "name"
assert inst.rest[0].resource[69].searchParam[13].type == "string"
assert (
inst.rest[0].resource[69].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/person-birthdate"
)
assert (
inst.rest[0].resource[69].searchParam[14].documentation
== "The person's date of birth"
)
assert inst.rest[0].resource[69].searchParam[14].name == "birthdate"
assert inst.rest[0].resource[69].searchParam[14].type == "date"
assert (
inst.rest[0].resource[69].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/person-telecom"
)
assert (
inst.rest[0].resource[69].searchParam[15].documentation
== "The value in any kind of contact"
)
assert inst.rest[0].resource[69].searchParam[15].name == "telecom"
assert inst.rest[0].resource[69].searchParam[15].type == "token"
assert (
inst.rest[0].resource[69].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/person-gender"
)
assert (
inst.rest[0].resource[69].searchParam[16].documentation
== "The gender of the person"
)
assert inst.rest[0].resource[69].searchParam[16].name == "gender"
assert inst.rest[0].resource[69].searchParam[16].type == "token"
assert (
inst.rest[0].resource[69].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/person-identifier"
)
assert (
inst.rest[0].resource[69].searchParam[17].documentation == "A person Identifier"
)
assert inst.rest[0].resource[69].searchParam[17].name == "identifier"
assert inst.rest[0].resource[69].searchParam[17].type == "token"
assert (
inst.rest[0].resource[69].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/person-address-postalcode"
)
assert (
inst.rest[0].resource[69].searchParam[18].documentation
== "A postal code specified in an address"
)
assert inst.rest[0].resource[69].searchParam[18].name == "address-postalcode"
assert inst.rest[0].resource[69].searchParam[18].type == "string"
assert inst.rest[0].resource[69].searchRevInclude[0] == "Person.link"
assert inst.rest[0].resource[69].searchRevInclude[1] == "Person.relatedperson"
assert inst.rest[0].resource[69].searchRevInclude[2] == "Person.patient"
assert inst.rest[0].resource[69].searchRevInclude[3] == "Person.practitioner"
assert inst.rest[0].resource[69].type == "Person"
assert inst.rest[0].resource[70].conditionalCreate == True
assert inst.rest[0].resource[70].conditionalDelete == "multiple"
assert inst.rest[0].resource[70].conditionalUpdate == True
assert inst.rest[0].resource[70].interaction[0].code == "read"
assert (
inst.rest[0].resource[70].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[1].code == "vread"
assert (
inst.rest[0].resource[70].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[2].code == "update"
assert (
inst.rest[0].resource[70].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[3].code == "delete"
assert (
inst.rest[0].resource[70].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[70].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[5].code == "validate"
assert (
inst.rest[0].resource[70].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[70].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[7].code == "create"
assert (
inst.rest[0].resource[70].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[70].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[70].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[70].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Practitioner"
)
assert inst.rest[0].resource[70].searchInclude[0] == "Practitioner.location"
assert inst.rest[0].resource[70].searchInclude[1] == "Practitioner.organization"
assert (
inst.rest[0].resource[70].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-phone"
)
assert (
inst.rest[0].resource[70].searchParam[0].documentation
== "A value in a phone contact"
)
assert inst.rest[0].resource[70].searchParam[0].name == "phone"
assert inst.rest[0].resource[70].searchParam[0].type == "token"
assert (
inst.rest[0].resource[70].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-phonetic"
)
assert (
inst.rest[0].resource[70].searchParam[1].documentation
== "A portion of either family or given name using some kind of phonetic matching algorithm"
)
assert inst.rest[0].resource[70].searchParam[1].name == "phonetic"
assert inst.rest[0].resource[70].searchParam[1].type == "string"
assert (
inst.rest[0].resource[70].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-location"
)
assert (
inst.rest[0].resource[70].searchParam[2].documentation
== "One of the locations at which this practitioner provides care"
)
assert inst.rest[0].resource[70].searchParam[2].name == "location"
assert inst.rest[0].resource[70].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[70].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-communication"
)
assert (
inst.rest[0].resource[70].searchParam[3].documentation
== "One of the languages that the practitioner can communicate with"
)
assert inst.rest[0].resource[70].searchParam[3].name == "communication"
assert inst.rest[0].resource[70].searchParam[3].type == "token"
assert (
inst.rest[0].resource[70].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address-country"
)
assert (
inst.rest[0].resource[70].searchParam[4].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[70].searchParam[4].name == "address-country"
assert inst.rest[0].resource[70].searchParam[4].type == "string"
assert (
inst.rest[0].resource[70].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-organization"
)
assert (
inst.rest[0].resource[70].searchParam[5].documentation
== "The identity of the organization the practitioner represents / acts on behalf of"
)
assert inst.rest[0].resource[70].searchParam[5].name == "organization"
assert inst.rest[0].resource[70].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[70].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address-city"
)
assert (
inst.rest[0].resource[70].searchParam[6].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[70].searchParam[6].name == "address-city"
assert inst.rest[0].resource[70].searchParam[6].type == "string"
assert (
inst.rest[0].resource[70].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address-state"
)
assert (
inst.rest[0].resource[70].searchParam[7].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[70].searchParam[7].name == "address-state"
assert inst.rest[0].resource[70].searchParam[7].type == "string"
assert (
inst.rest[0].resource[70].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-given"
)
assert (
inst.rest[0].resource[70].searchParam[8].documentation
== "A portion of the given name"
)
assert inst.rest[0].resource[70].searchParam[8].name == "given"
assert inst.rest[0].resource[70].searchParam[8].type == "string"
assert (
inst.rest[0].resource[70].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-email"
)
assert (
inst.rest[0].resource[70].searchParam[9].documentation
== "A value in an email contact"
)
assert inst.rest[0].resource[70].searchParam[9].name == "email"
assert inst.rest[0].resource[70].searchParam[9].type == "token"
assert (
inst.rest[0].resource[70].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address"
)
assert (
inst.rest[0].resource[70].searchParam[10].documentation
== "An address in any kind of address/part"
)
assert inst.rest[0].resource[70].searchParam[10].name == "address"
assert inst.rest[0].resource[70].searchParam[10].type == "string"
assert (
inst.rest[0].resource[70].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address-use"
)
assert (
inst.rest[0].resource[70].searchParam[11].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[70].searchParam[11].name == "address-use"
assert inst.rest[0].resource[70].searchParam[11].type == "token"
assert (
inst.rest[0].resource[70].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-family"
)
assert (
inst.rest[0].resource[70].searchParam[12].documentation
== "A portion of the family name"
)
assert inst.rest[0].resource[70].searchParam[12].name == "family"
assert inst.rest[0].resource[70].searchParam[12].type == "string"
assert (
inst.rest[0].resource[70].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-name"
)
assert (
inst.rest[0].resource[70].searchParam[13].documentation
== "A portion of either family or given name"
)
assert inst.rest[0].resource[70].searchParam[13].name == "name"
assert inst.rest[0].resource[70].searchParam[13].type == "string"
assert (
inst.rest[0].resource[70].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-telecom"
)
assert (
inst.rest[0].resource[70].searchParam[14].documentation
== "The value in any kind of contact"
)
assert inst.rest[0].resource[70].searchParam[14].name == "telecom"
assert inst.rest[0].resource[70].searchParam[14].type == "token"
assert (
inst.rest[0].resource[70].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-role"
)
assert (
inst.rest[0].resource[70].searchParam[15].documentation
== "The practitioner can perform this role at for the organization"
)
assert inst.rest[0].resource[70].searchParam[15].name == "role"
assert inst.rest[0].resource[70].searchParam[15].type == "token"
assert (
inst.rest[0].resource[70].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-gender"
)
assert (
inst.rest[0].resource[70].searchParam[16].documentation
== "Gender of the practitioner"
)
assert inst.rest[0].resource[70].searchParam[16].name == "gender"
assert inst.rest[0].resource[70].searchParam[16].type == "token"
assert (
inst.rest[0].resource[70].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-specialty"
)
assert (
inst.rest[0].resource[70].searchParam[17].documentation
== "The practitioner has this specialty at an organization"
)
assert inst.rest[0].resource[70].searchParam[17].name == "specialty"
assert inst.rest[0].resource[70].searchParam[17].type == "token"
assert (
inst.rest[0].resource[70].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-identifier"
)
assert (
inst.rest[0].resource[70].searchParam[18].documentation
== "A practitioner's Identifier"
)
assert inst.rest[0].resource[70].searchParam[18].name == "identifier"
assert inst.rest[0].resource[70].searchParam[18].type == "token"
assert (
inst.rest[0].resource[70].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/practitioner-address-postalcode"
)
assert (
inst.rest[0].resource[70].searchParam[19].documentation
== "A postalCode specified in an address"
)
assert inst.rest[0].resource[70].searchParam[19].name == "address-postalcode"
assert inst.rest[0].resource[70].searchParam[19].type == "string"
assert inst.rest[0].resource[70].searchRevInclude[0] == "Account.patient"
assert inst.rest[0].resource[70].searchRevInclude[1] == "Account.subject"
assert (
inst.rest[0].resource[70].searchRevInclude[2] == "AllergyIntolerance.reporter"
)
assert (
inst.rest[0].resource[70].searchRevInclude[3] == "AllergyIntolerance.recorder"
)
assert inst.rest[0].resource[70].searchRevInclude[4] == "Appointment.patient"
assert inst.rest[0].resource[70].searchRevInclude[5] == "Appointment.practitioner"
assert inst.rest[0].resource[70].searchRevInclude[6] == "Appointment.location"
assert inst.rest[0].resource[70].searchRevInclude[7] == "Appointment.actor"
assert (
inst.rest[0].resource[70].searchRevInclude[8] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[70].searchRevInclude[9]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[70].searchRevInclude[10] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[70].searchRevInclude[11] == "AppointmentResponse.actor"
assert inst.rest[0].resource[70].searchRevInclude[12] == "AuditEvent.patient"
assert inst.rest[0].resource[70].searchRevInclude[13] == "AuditEvent.participant"
assert inst.rest[0].resource[70].searchRevInclude[14] == "Basic.author"
assert inst.rest[0].resource[70].searchRevInclude[15] == "CarePlan.participant"
assert inst.rest[0].resource[70].searchRevInclude[16] == "CarePlan.performer"
assert inst.rest[0].resource[70].searchRevInclude[17] == "Claim.provider"
assert (
inst.rest[0].resource[70].searchRevInclude[18] == "ClinicalImpression.assessor"
)
assert inst.rest[0].resource[70].searchRevInclude[19] == "Communication.sender"
assert inst.rest[0].resource[70].searchRevInclude[20] == "Communication.recipient"
assert (
inst.rest[0].resource[70].searchRevInclude[21] == "CommunicationRequest.sender"
)
assert (
inst.rest[0].resource[70].searchRevInclude[22]
== "CommunicationRequest.requester"
)
assert (
inst.rest[0].resource[70].searchRevInclude[23]
== "CommunicationRequest.recipient"
)
assert inst.rest[0].resource[70].searchRevInclude[24] == "Composition.author"
assert inst.rest[0].resource[70].searchRevInclude[25] == "Composition.attester"
assert inst.rest[0].resource[70].searchRevInclude[26] == "Condition.asserter"
assert inst.rest[0].resource[70].searchRevInclude[27] == "Contract.signer"
assert inst.rest[0].resource[70].searchRevInclude[28] == "Contract.actor"
assert inst.rest[0].resource[70].searchRevInclude[29] == "DetectedIssue.author"
assert inst.rest[0].resource[70].searchRevInclude[30] == "DiagnosticOrder.orderer"
assert inst.rest[0].resource[70].searchRevInclude[31] == "DiagnosticOrder.actor"
assert (
inst.rest[0].resource[70].searchRevInclude[32] == "DiagnosticReport.performer"
)
assert inst.rest[0].resource[70].searchRevInclude[33] == "DocumentManifest.subject"
assert (
inst.rest[0].resource[70].searchRevInclude[34] == "DocumentManifest.recipient"
)
assert inst.rest[0].resource[70].searchRevInclude[35] == "DocumentManifest.author"
assert inst.rest[0].resource[70].searchRevInclude[36] == "DocumentManifest.patient"
assert inst.rest[0].resource[70].searchRevInclude[37] == "DocumentReference.subject"
assert inst.rest[0].resource[70].searchRevInclude[38] == "DocumentReference.author"
assert inst.rest[0].resource[70].searchRevInclude[39] == "DocumentReference.patient"
assert (
inst.rest[0].resource[70].searchRevInclude[40]
== "DocumentReference.authenticator"
)
assert inst.rest[0].resource[70].searchRevInclude[41] == "Encounter.practitioner"
assert inst.rest[0].resource[70].searchRevInclude[42] == "Encounter.participant"
assert (
inst.rest[0].resource[70].searchRevInclude[43] == "EpisodeOfCare.care-manager"
)
assert inst.rest[0].resource[70].searchRevInclude[44] == "EpisodeOfCare.team-member"
assert inst.rest[0].resource[70].searchRevInclude[45] == "Flag.author"
assert inst.rest[0].resource[70].searchRevInclude[46] == "Flag.patient"
assert inst.rest[0].resource[70].searchRevInclude[47] == "Flag.subject"
assert inst.rest[0].resource[70].searchRevInclude[48] == "Group.member"
assert (
inst.rest[0].resource[70].searchRevInclude[49]
== "ImagingObjectSelection.author"
)
assert inst.rest[0].resource[70].searchRevInclude[50] == "Immunization.requester"
assert inst.rest[0].resource[70].searchRevInclude[51] == "Immunization.performer"
assert inst.rest[0].resource[70].searchRevInclude[52] == "List.source"
assert inst.rest[0].resource[70].searchRevInclude[53] == "Media.patient"
assert inst.rest[0].resource[70].searchRevInclude[54] == "Media.subject"
assert inst.rest[0].resource[70].searchRevInclude[55] == "Media.operator"
assert (
inst.rest[0].resource[70].searchRevInclude[56]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[70].searchRevInclude[57] == "MedicationDispense.receiver"
)
assert (
inst.rest[0].resource[70].searchRevInclude[58]
== "MedicationDispense.responsibleparty"
)
assert (
inst.rest[0].resource[70].searchRevInclude[59] == "MedicationDispense.dispenser"
)
assert (
inst.rest[0].resource[70].searchRevInclude[60] == "MedicationOrder.prescriber"
)
assert (
inst.rest[0].resource[70].searchRevInclude[61] == "MedicationStatement.source"
)
assert inst.rest[0].resource[70].searchRevInclude[62] == "MessageHeader.receiver"
assert inst.rest[0].resource[70].searchRevInclude[63] == "MessageHeader.responsible"
assert inst.rest[0].resource[70].searchRevInclude[64] == "MessageHeader.author"
assert inst.rest[0].resource[70].searchRevInclude[65] == "MessageHeader.enterer"
assert inst.rest[0].resource[70].searchRevInclude[66] == "NutritionOrder.provider"
assert inst.rest[0].resource[70].searchRevInclude[67] == "Observation.performer"
assert inst.rest[0].resource[70].searchRevInclude[68] == "Order.source"
assert inst.rest[0].resource[70].searchRevInclude[69] == "Order.target"
assert inst.rest[0].resource[70].searchRevInclude[70] == "OrderResponse.who"
assert inst.rest[0].resource[70].searchRevInclude[71] == "Patient.careprovider"
assert inst.rest[0].resource[70].searchRevInclude[72] == "Person.link"
assert inst.rest[0].resource[70].searchRevInclude[73] == "Person.relatedperson"
assert inst.rest[0].resource[70].searchRevInclude[74] == "Person.patient"
assert inst.rest[0].resource[70].searchRevInclude[75] == "Person.practitioner"
assert inst.rest[0].resource[70].searchRevInclude[76] == "Procedure.performer"
assert inst.rest[0].resource[70].searchRevInclude[77] == "ProcedureRequest.orderer"
assert (
inst.rest[0].resource[70].searchRevInclude[78] == "ProcedureRequest.performer"
)
assert inst.rest[0].resource[70].searchRevInclude[79] == "ProcessRequest.provider"
assert (
inst.rest[0].resource[70].searchRevInclude[80]
== "ProcessResponse.requestprovider"
)
assert inst.rest[0].resource[70].searchRevInclude[81] == "Provenance.agent"
assert (
inst.rest[0].resource[70].searchRevInclude[82] == "QuestionnaireResponse.author"
)
assert (
inst.rest[0].resource[70].searchRevInclude[83] == "QuestionnaireResponse.source"
)
assert inst.rest[0].resource[70].searchRevInclude[84] == "ReferralRequest.requester"
assert inst.rest[0].resource[70].searchRevInclude[85] == "ReferralRequest.recipient"
assert inst.rest[0].resource[70].searchRevInclude[86] == "RiskAssessment.performer"
assert inst.rest[0].resource[70].searchRevInclude[87] == "Schedule.actor"
assert inst.rest[0].resource[70].searchRevInclude[88] == "Specimen.collector"
assert inst.rest[0].resource[70].searchRevInclude[89] == "SupplyDelivery.receiver"
assert inst.rest[0].resource[70].searchRevInclude[90] == "SupplyDelivery.supplier"
assert inst.rest[0].resource[70].searchRevInclude[91] == "SupplyRequest.source"
assert (
inst.rest[0].resource[70].searchRevInclude[92]
== "VisionPrescription.prescriber"
)
assert inst.rest[0].resource[70].type == "Practitioner"
assert inst.rest[0].resource[71].conditionalCreate == True
assert inst.rest[0].resource[71].conditionalDelete == "multiple"
assert inst.rest[0].resource[71].conditionalUpdate == True
assert inst.rest[0].resource[71].interaction[0].code == "read"
assert (
inst.rest[0].resource[71].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[1].code == "vread"
assert (
inst.rest[0].resource[71].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[2].code == "update"
assert (
inst.rest[0].resource[71].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[3].code == "delete"
assert (
inst.rest[0].resource[71].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[71].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[5].code == "validate"
assert (
inst.rest[0].resource[71].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[71].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[7].code == "create"
assert (
inst.rest[0].resource[71].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[71].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[71].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[71].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Procedure"
)
assert inst.rest[0].resource[71].searchInclude[0] == "Procedure.patient"
assert inst.rest[0].resource[71].searchInclude[1] == "Procedure.location"
assert inst.rest[0].resource[71].searchInclude[2] == "Procedure.subject"
assert inst.rest[0].resource[71].searchInclude[3] == "Procedure.performer"
assert inst.rest[0].resource[71].searchInclude[4] == "Procedure.encounter"
assert (
inst.rest[0].resource[71].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/procedure-patient"
)
assert (
inst.rest[0].resource[71].searchParam[0].documentation
== "Search by subject - a patient"
)
assert inst.rest[0].resource[71].searchParam[0].name == "patient"
assert inst.rest[0].resource[71].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[71].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/procedure-location"
)
assert (
inst.rest[0].resource[71].searchParam[1].documentation
== "Where the procedure happened"
)
assert inst.rest[0].resource[71].searchParam[1].name == "location"
assert inst.rest[0].resource[71].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[71].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/procedure-subject"
)
assert inst.rest[0].resource[71].searchParam[2].documentation == "Search by subject"
assert inst.rest[0].resource[71].searchParam[2].name == "subject"
assert inst.rest[0].resource[71].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[71].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/procedure-performer"
)
assert (
inst.rest[0].resource[71].searchParam[3].documentation
== "The reference to the practitioner"
)
assert inst.rest[0].resource[71].searchParam[3].name == "performer"
assert inst.rest[0].resource[71].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[71].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/procedure-encounter"
)
assert (
inst.rest[0].resource[71].searchParam[4].documentation
== "The encounter associated with the procedure"
)
assert inst.rest[0].resource[71].searchParam[4].name == "encounter"
assert inst.rest[0].resource[71].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[71].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/procedure-code"
)
assert (
inst.rest[0].resource[71].searchParam[5].documentation
== "A code to identify a procedure"
)
assert inst.rest[0].resource[71].searchParam[5].name == "code"
assert inst.rest[0].resource[71].searchParam[5].type == "token"
assert (
inst.rest[0].resource[71].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/procedure-date"
)
assert (
inst.rest[0].resource[71].searchParam[6].documentation
== "Date/Period the procedure was performed"
)
assert inst.rest[0].resource[71].searchParam[6].name == "date"
assert inst.rest[0].resource[71].searchParam[6].type == "date"
assert (
inst.rest[0].resource[71].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/procedure-identifier"
)
assert (
inst.rest[0].resource[71].searchParam[7].documentation
== "A unique identifier for a procedure"
)
assert inst.rest[0].resource[71].searchParam[7].name == "identifier"
assert inst.rest[0].resource[71].searchParam[7].type == "token"
assert inst.rest[0].resource[71].searchRevInclude[0] == "ClinicalImpression.action"
assert inst.rest[0].resource[71].searchRevInclude[1] == "Encounter.condition"
assert inst.rest[0].resource[71].searchRevInclude[2] == "Encounter.indication"
assert inst.rest[0].resource[71].searchRevInclude[3] == "Encounter.procedure"
assert inst.rest[0].resource[71].type == "Procedure"
assert inst.rest[0].resource[72].conditionalCreate == True
assert inst.rest[0].resource[72].conditionalDelete == "multiple"
assert inst.rest[0].resource[72].conditionalUpdate == True
assert inst.rest[0].resource[72].interaction[0].code == "read"
assert (
inst.rest[0].resource[72].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[1].code == "vread"
assert (
inst.rest[0].resource[72].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[2].code == "update"
assert (
inst.rest[0].resource[72].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[3].code == "delete"
assert (
inst.rest[0].resource[72].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[72].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[5].code == "validate"
assert (
inst.rest[0].resource[72].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[72].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[7].code == "create"
assert (
inst.rest[0].resource[72].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[72].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[72].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[72].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
)
assert inst.rest[0].resource[72].searchInclude[0] == "ProcedureRequest.orderer"
assert inst.rest[0].resource[72].searchInclude[1] == "ProcedureRequest.patient"
assert inst.rest[0].resource[72].searchInclude[2] == "ProcedureRequest.subject"
assert inst.rest[0].resource[72].searchInclude[3] == "ProcedureRequest.performer"
assert inst.rest[0].resource[72].searchInclude[4] == "ProcedureRequest.encounter"
assert (
inst.rest[0].resource[72].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-orderer"
)
assert inst.rest[0].resource[72].searchParam[0].documentation == "Who made request"
assert inst.rest[0].resource[72].searchParam[0].name == "orderer"
assert inst.rest[0].resource[72].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[72].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-patient"
)
assert (
inst.rest[0].resource[72].searchParam[1].documentation
== "Search by subject - a patient"
)
assert inst.rest[0].resource[72].searchParam[1].name == "patient"
assert inst.rest[0].resource[72].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[72].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-subject"
)
assert inst.rest[0].resource[72].searchParam[2].documentation == "Search by subject"
assert inst.rest[0].resource[72].searchParam[2].name == "subject"
assert inst.rest[0].resource[72].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[72].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-performer"
)
assert (
inst.rest[0].resource[72].searchParam[3].documentation
== "Who should perform the procedure"
)
assert inst.rest[0].resource[72].searchParam[3].name == "performer"
assert inst.rest[0].resource[72].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[72].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-encounter"
)
assert (
inst.rest[0].resource[72].searchParam[4].documentation
== "Encounter request created during"
)
assert inst.rest[0].resource[72].searchParam[4].name == "encounter"
assert inst.rest[0].resource[72].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[72].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/procedurerequest-identifier"
)
assert (
inst.rest[0].resource[72].searchParam[5].documentation
== "A unique identifier of the Procedure Request"
)
assert inst.rest[0].resource[72].searchParam[5].name == "identifier"
assert inst.rest[0].resource[72].searchParam[5].type == "token"
assert inst.rest[0].resource[72].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[72].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[72].searchRevInclude[2] == "ClinicalImpression.action"
assert inst.rest[0].resource[72].searchRevInclude[3] == "DiagnosticReport.request"
assert inst.rest[0].resource[72].type == "ProcedureRequest"
assert inst.rest[0].resource[73].conditionalCreate == True
assert inst.rest[0].resource[73].conditionalDelete == "multiple"
assert inst.rest[0].resource[73].conditionalUpdate == True
assert inst.rest[0].resource[73].interaction[0].code == "read"
assert (
inst.rest[0].resource[73].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[1].code == "vread"
assert (
inst.rest[0].resource[73].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[2].code == "update"
assert (
inst.rest[0].resource[73].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[3].code == "delete"
assert (
inst.rest[0].resource[73].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[73].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[5].code == "validate"
assert (
inst.rest[0].resource[73].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[73].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[7].code == "create"
assert (
inst.rest[0].resource[73].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[73].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[73].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[73].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ProcessRequest"
)
assert inst.rest[0].resource[73].searchInclude[0] == "ProcessRequest.organization"
assert inst.rest[0].resource[73].searchInclude[1] == "ProcessRequest.provider"
assert (
inst.rest[0].resource[73].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/processrequest-organization"
)
assert (
inst.rest[0].resource[73].searchParam[0].documentation
== "The organization who generated this request"
)
assert inst.rest[0].resource[73].searchParam[0].name == "organization"
assert inst.rest[0].resource[73].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[73].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/processrequest-action"
)
assert (
inst.rest[0].resource[73].searchParam[1].documentation
== "The action requested by this resource"
)
assert inst.rest[0].resource[73].searchParam[1].name == "action"
assert inst.rest[0].resource[73].searchParam[1].type == "token"
assert (
inst.rest[0].resource[73].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/processrequest-provider"
)
assert (
inst.rest[0].resource[73].searchParam[2].documentation
== "The provider who regenerated this request"
)
assert inst.rest[0].resource[73].searchParam[2].name == "provider"
assert inst.rest[0].resource[73].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[73].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/processrequest-identifier"
)
assert (
inst.rest[0].resource[73].searchParam[3].documentation
== "The business identifier of the ProcessRequest"
)
assert inst.rest[0].resource[73].searchParam[3].name == "identifier"
assert inst.rest[0].resource[73].searchParam[3].type == "token"
assert inst.rest[0].resource[73].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[73].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[73].type == "ProcessRequest"
assert inst.rest[0].resource[74].conditionalCreate == True
assert inst.rest[0].resource[74].conditionalDelete == "multiple"
assert inst.rest[0].resource[74].conditionalUpdate == True
assert inst.rest[0].resource[74].interaction[0].code == "read"
assert (
inst.rest[0].resource[74].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[1].code == "vread"
assert (
inst.rest[0].resource[74].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[2].code == "update"
assert (
inst.rest[0].resource[74].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[3].code == "delete"
assert (
inst.rest[0].resource[74].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[74].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[5].code == "validate"
assert (
inst.rest[0].resource[74].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[74].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[7].code == "create"
assert (
inst.rest[0].resource[74].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[74].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[74].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[74].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ProcessResponse"
)
assert inst.rest[0].resource[74].searchInclude[0] == "ProcessResponse.organization"
assert (
inst.rest[0].resource[74].searchInclude[1] == "ProcessResponse.requestprovider"
)
assert inst.rest[0].resource[74].searchInclude[2] == "ProcessResponse.request"
assert (
inst.rest[0].resource[74].searchInclude[3]
== "ProcessResponse.requestorganization"
)
assert (
inst.rest[0].resource[74].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/processresponse-organization"
)
assert (
inst.rest[0].resource[74].searchParam[0].documentation
== "The organization who generated this resource"
)
assert inst.rest[0].resource[74].searchParam[0].name == "organization"
assert inst.rest[0].resource[74].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[74].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/processresponse-requestprovider"
)
assert (
inst.rest[0].resource[74].searchParam[1].documentation
== "The Provider who is responsible the request transaction"
)
assert inst.rest[0].resource[74].searchParam[1].name == "requestprovider"
assert inst.rest[0].resource[74].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[74].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/processresponse-request"
)
assert (
inst.rest[0].resource[74].searchParam[2].documentation
== "The reference to the claim"
)
assert inst.rest[0].resource[74].searchParam[2].name == "request"
assert inst.rest[0].resource[74].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[74].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/processresponse-requestorganization"
)
assert (
inst.rest[0].resource[74].searchParam[3].documentation
== "The Organization who is responsible the request transaction"
)
assert inst.rest[0].resource[74].searchParam[3].name == "requestorganization"
assert inst.rest[0].resource[74].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[74].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/processresponse-identifier"
)
assert (
inst.rest[0].resource[74].searchParam[4].documentation
== "The business identifier of the Explanation of Benefit"
)
assert inst.rest[0].resource[74].searchParam[4].name == "identifier"
assert inst.rest[0].resource[74].searchParam[4].type == "token"
assert inst.rest[0].resource[74].type == "ProcessResponse"
assert inst.rest[0].resource[75].conditionalCreate == True
assert inst.rest[0].resource[75].conditionalDelete == "multiple"
assert inst.rest[0].resource[75].conditionalUpdate == True
assert inst.rest[0].resource[75].interaction[0].code == "read"
assert (
inst.rest[0].resource[75].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[1].code == "vread"
assert (
inst.rest[0].resource[75].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[2].code == "update"
assert (
inst.rest[0].resource[75].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[3].code == "delete"
assert (
inst.rest[0].resource[75].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[75].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[5].code == "validate"
assert (
inst.rest[0].resource[75].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[75].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[7].code == "create"
assert (
inst.rest[0].resource[75].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[75].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[75].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[75].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Provenance"
)
assert inst.rest[0].resource[75].searchInclude[0] == "Provenance.patient"
assert inst.rest[0].resource[75].searchInclude[1] == "Provenance.location"
assert inst.rest[0].resource[75].searchInclude[2] == "Provenance.target"
assert inst.rest[0].resource[75].searchInclude[3] == "Provenance.agent"
assert (
inst.rest[0].resource[75].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/provenance-sigtype"
)
assert (
inst.rest[0].resource[75].searchParam[0].documentation
== "Indication of the reason the entity signed the object(s)"
)
assert inst.rest[0].resource[75].searchParam[0].name == "sigtype"
assert inst.rest[0].resource[75].searchParam[0].type == "token"
assert (
inst.rest[0].resource[75].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/provenance-patient"
)
assert (
inst.rest[0].resource[75].searchParam[1].documentation
== "Target Reference(s) (usually version specific)"
)
assert inst.rest[0].resource[75].searchParam[1].name == "patient"
assert inst.rest[0].resource[75].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[75].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/provenance-location"
)
assert (
inst.rest[0].resource[75].searchParam[2].documentation
== "Where the activity occurred, if relevant"
)
assert inst.rest[0].resource[75].searchParam[2].name == "location"
assert inst.rest[0].resource[75].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[75].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/provenance-start"
)
assert (
inst.rest[0].resource[75].searchParam[3].documentation
== "Starting time with inclusive boundary"
)
assert inst.rest[0].resource[75].searchParam[3].name == "start"
assert inst.rest[0].resource[75].searchParam[3].type == "date"
assert (
inst.rest[0].resource[75].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/provenance-entity"
)
assert (
inst.rest[0].resource[75].searchParam[4].documentation == "Identity of entity"
)
assert inst.rest[0].resource[75].searchParam[4].name == "entity"
assert inst.rest[0].resource[75].searchParam[4].type == "uri"
assert (
inst.rest[0].resource[75].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/provenance-userid"
)
assert (
inst.rest[0].resource[75].searchParam[5].documentation
== "Authorization-system identifier for the agent"
)
assert inst.rest[0].resource[75].searchParam[5].name == "userid"
assert inst.rest[0].resource[75].searchParam[5].type == "token"
assert (
inst.rest[0].resource[75].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/provenance-target"
)
assert (
inst.rest[0].resource[75].searchParam[6].documentation
== "Target Reference(s) (usually version specific)"
)
assert inst.rest[0].resource[75].searchParam[6].name == "target"
assert inst.rest[0].resource[75].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[75].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/provenance-agent"
)
assert (
inst.rest[0].resource[75].searchParam[7].documentation
== "Individual, device or organization playing role"
)
assert inst.rest[0].resource[75].searchParam[7].name == "agent"
assert inst.rest[0].resource[75].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[75].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/provenance-entitytype"
)
assert (
inst.rest[0].resource[75].searchParam[8].documentation
== "The type of resource in this entity"
)
assert inst.rest[0].resource[75].searchParam[8].name == "entitytype"
assert inst.rest[0].resource[75].searchParam[8].type == "token"
assert (
inst.rest[0].resource[75].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/provenance-end"
)
assert (
inst.rest[0].resource[75].searchParam[9].documentation
== "End time with inclusive boundary, if not ongoing"
)
assert inst.rest[0].resource[75].searchParam[9].name == "end"
assert inst.rest[0].resource[75].searchParam[9].type == "date"
assert inst.rest[0].resource[75].type == "Provenance"
assert inst.rest[0].resource[76].conditionalCreate == True
assert inst.rest[0].resource[76].conditionalDelete == "multiple"
assert inst.rest[0].resource[76].conditionalUpdate == True
assert inst.rest[0].resource[76].interaction[0].code == "read"
assert (
inst.rest[0].resource[76].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[1].code == "vread"
assert (
inst.rest[0].resource[76].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[2].code == "update"
assert (
inst.rest[0].resource[76].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[3].code == "delete"
assert (
inst.rest[0].resource[76].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[76].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[5].code == "validate"
assert (
inst.rest[0].resource[76].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[76].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[7].code == "create"
assert (
inst.rest[0].resource[76].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[76].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[76].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[76].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Questionnaire"
)
assert (
inst.rest[0].resource[76].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-title"
)
assert (
inst.rest[0].resource[76].searchParam[0].documentation
== "All or part of the name of the questionnaire (title for the root group of the questionnaire)"
)
assert inst.rest[0].resource[76].searchParam[0].name == "title"
assert inst.rest[0].resource[76].searchParam[0].type == "string"
assert (
inst.rest[0].resource[76].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-status"
)
assert (
inst.rest[0].resource[76].searchParam[1].documentation
== "The status of the questionnaire"
)
assert inst.rest[0].resource[76].searchParam[1].name == "status"
assert inst.rest[0].resource[76].searchParam[1].type == "token"
assert (
inst.rest[0].resource[76].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-code"
)
assert (
inst.rest[0].resource[76].searchParam[2].documentation
== "A code that corresponds to the questionnaire or one of its groups"
)
assert inst.rest[0].resource[76].searchParam[2].name == "code"
assert inst.rest[0].resource[76].searchParam[2].type == "token"
assert (
inst.rest[0].resource[76].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-date"
)
assert (
inst.rest[0].resource[76].searchParam[3].documentation
== "When the questionnaire was last changed"
)
assert inst.rest[0].resource[76].searchParam[3].name == "date"
assert inst.rest[0].resource[76].searchParam[3].type == "date"
assert (
inst.rest[0].resource[76].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-identifier"
)
assert (
inst.rest[0].resource[76].searchParam[4].documentation
== "An identifier for the questionnaire"
)
assert inst.rest[0].resource[76].searchParam[4].name == "identifier"
assert inst.rest[0].resource[76].searchParam[4].type == "token"
assert (
inst.rest[0].resource[76].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-version"
)
assert (
inst.rest[0].resource[76].searchParam[5].documentation
== "The business version of the questionnaire"
)
assert inst.rest[0].resource[76].searchParam[5].name == "version"
assert inst.rest[0].resource[76].searchParam[5].type == "string"
assert (
inst.rest[0].resource[76].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-publisher"
)
assert (
inst.rest[0].resource[76].searchParam[6].documentation
== "The author of the questionnaire"
)
assert inst.rest[0].resource[76].searchParam[6].name == "publisher"
assert inst.rest[0].resource[76].searchParam[6].type == "string"
assert (
inst.rest[0].resource[76].searchRevInclude[0]
== "QuestionnaireResponse.questionnaire"
)
assert inst.rest[0].resource[76].type == "Questionnaire"
assert inst.rest[0].resource[77].conditionalCreate == True
assert inst.rest[0].resource[77].conditionalDelete == "multiple"
assert inst.rest[0].resource[77].conditionalUpdate == True
assert inst.rest[0].resource[77].interaction[0].code == "read"
assert (
inst.rest[0].resource[77].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[1].code == "vread"
assert (
inst.rest[0].resource[77].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[2].code == "update"
assert (
inst.rest[0].resource[77].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[3].code == "delete"
assert (
inst.rest[0].resource[77].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[77].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[5].code == "validate"
assert (
inst.rest[0].resource[77].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[77].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[7].code == "create"
assert (
inst.rest[0].resource[77].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[77].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[77].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[77].profile.reference
== "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
)
assert inst.rest[0].resource[77].searchInclude[0] == "QuestionnaireResponse.author"
assert (
inst.rest[0].resource[77].searchInclude[1]
== "QuestionnaireResponse.questionnaire"
)
assert inst.rest[0].resource[77].searchInclude[2] == "QuestionnaireResponse.patient"
assert inst.rest[0].resource[77].searchInclude[3] == "QuestionnaireResponse.source"
assert inst.rest[0].resource[77].searchInclude[4] == "QuestionnaireResponse.subject"
assert (
inst.rest[0].resource[77].searchInclude[5] == "QuestionnaireResponse.encounter"
)
assert (
inst.rest[0].resource[77].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-author"
)
assert (
inst.rest[0].resource[77].searchParam[0].documentation
== "The author of the questionnaire"
)
assert inst.rest[0].resource[77].searchParam[0].name == "author"
assert inst.rest[0].resource[77].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[77].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-questionnaire"
)
assert (
inst.rest[0].resource[77].searchParam[1].documentation
== "The questionnaire the answers are provided for"
)
assert inst.rest[0].resource[77].searchParam[1].name == "questionnaire"
assert inst.rest[0].resource[77].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[77].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-patient"
)
assert (
inst.rest[0].resource[77].searchParam[2].documentation
== "The patient that is the subject of the questionnaire"
)
assert inst.rest[0].resource[77].searchParam[2].name == "patient"
assert inst.rest[0].resource[77].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[77].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-authored"
)
assert (
inst.rest[0].resource[77].searchParam[3].documentation
== "When the questionnaire was authored"
)
assert inst.rest[0].resource[77].searchParam[3].name == "authored"
assert inst.rest[0].resource[77].searchParam[3].type == "date"
assert (
inst.rest[0].resource[77].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-source"
)
assert (
inst.rest[0].resource[77].searchParam[4].documentation
== "The person who answered the questions"
)
assert inst.rest[0].resource[77].searchParam[4].name == "source"
assert inst.rest[0].resource[77].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[77].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-status"
)
assert (
inst.rest[0].resource[77].searchParam[5].documentation
== "The status of the questionnaire response"
)
assert inst.rest[0].resource[77].searchParam[5].name == "status"
assert inst.rest[0].resource[77].searchParam[5].type == "token"
assert (
inst.rest[0].resource[77].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-subject"
)
assert (
inst.rest[0].resource[77].searchParam[6].documentation
== "The subject of the questionnaire"
)
assert inst.rest[0].resource[77].searchParam[6].name == "subject"
assert inst.rest[0].resource[77].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[77].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse-encounter"
)
assert (
inst.rest[0].resource[77].searchParam[7].documentation
== "Encounter during which questionnaire was authored"
)
assert inst.rest[0].resource[77].searchParam[7].name == "encounter"
assert inst.rest[0].resource[77].searchParam[7].type == "reference"
assert (
inst.rest[0].resource[77].searchRevInclude[0]
== "ClinicalImpression.investigation"
)
assert inst.rest[0].resource[77].searchRevInclude[1] == "Observation.related-target"
assert inst.rest[0].resource[77].type == "QuestionnaireResponse"
assert inst.rest[0].resource[78].conditionalCreate == True
assert inst.rest[0].resource[78].conditionalDelete == "multiple"
assert inst.rest[0].resource[78].conditionalUpdate == True
assert inst.rest[0].resource[78].interaction[0].code == "read"
assert (
inst.rest[0].resource[78].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[1].code == "vread"
assert (
inst.rest[0].resource[78].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[2].code == "update"
assert (
inst.rest[0].resource[78].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[3].code == "delete"
assert (
inst.rest[0].resource[78].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[78].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[5].code == "validate"
assert (
inst.rest[0].resource[78].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[78].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[7].code == "create"
assert (
inst.rest[0].resource[78].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[78].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[78].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[78].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
)
assert inst.rest[0].resource[78].searchInclude[0] == "ReferralRequest.requester"
assert inst.rest[0].resource[78].searchInclude[1] == "ReferralRequest.patient"
assert inst.rest[0].resource[78].searchInclude[2] == "ReferralRequest.recipient"
assert (
inst.rest[0].resource[78].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-requester"
)
assert (
inst.rest[0].resource[78].searchParam[0].documentation
== "Requester of referral / transfer of care"
)
assert inst.rest[0].resource[78].searchParam[0].name == "requester"
assert inst.rest[0].resource[78].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[78].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-patient"
)
assert (
inst.rest[0].resource[78].searchParam[1].documentation
== "Who the referral is about"
)
assert inst.rest[0].resource[78].searchParam[1].name == "patient"
assert inst.rest[0].resource[78].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[78].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-status"
)
assert (
inst.rest[0].resource[78].searchParam[2].documentation
== "The status of the referral"
)
assert inst.rest[0].resource[78].searchParam[2].name == "status"
assert inst.rest[0].resource[78].searchParam[2].type == "token"
assert (
inst.rest[0].resource[78].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-priority"
)
assert (
inst.rest[0].resource[78].searchParam[3].documentation
== "The priority assigned to the referral"
)
assert inst.rest[0].resource[78].searchParam[3].name == "priority"
assert inst.rest[0].resource[78].searchParam[3].type == "token"
assert (
inst.rest[0].resource[78].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-type"
)
assert (
inst.rest[0].resource[78].searchParam[4].documentation
== "The type of the referral"
)
assert inst.rest[0].resource[78].searchParam[4].name == "type"
assert inst.rest[0].resource[78].searchParam[4].type == "token"
assert (
inst.rest[0].resource[78].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-date"
)
assert (
inst.rest[0].resource[78].searchParam[5].documentation
== "Creation or activation date"
)
assert inst.rest[0].resource[78].searchParam[5].name == "date"
assert inst.rest[0].resource[78].searchParam[5].type == "date"
assert (
inst.rest[0].resource[78].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-specialty"
)
assert (
inst.rest[0].resource[78].searchParam[6].documentation
== "The specialty that the referral is for"
)
assert inst.rest[0].resource[78].searchParam[6].name == "specialty"
assert inst.rest[0].resource[78].searchParam[6].type == "token"
assert (
inst.rest[0].resource[78].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/referralrequest-recipient"
)
assert (
inst.rest[0].resource[78].searchParam[7].documentation
== "The person that the referral was sent to"
)
assert inst.rest[0].resource[78].searchParam[7].name == "recipient"
assert inst.rest[0].resource[78].searchParam[7].type == "reference"
assert inst.rest[0].resource[78].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[78].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[78].searchRevInclude[2] == "ClinicalImpression.action"
assert inst.rest[0].resource[78].searchRevInclude[3] == "DiagnosticReport.request"
assert inst.rest[0].resource[78].searchRevInclude[4] == "Encounter.incomingreferral"
assert (
inst.rest[0].resource[78].searchRevInclude[5]
== "EpisodeOfCare.incomingreferral"
)
assert inst.rest[0].resource[78].type == "ReferralRequest"
assert inst.rest[0].resource[79].conditionalCreate == True
assert inst.rest[0].resource[79].conditionalDelete == "multiple"
assert inst.rest[0].resource[79].conditionalUpdate == True
assert inst.rest[0].resource[79].interaction[0].code == "read"
assert (
inst.rest[0].resource[79].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[1].code == "vread"
assert (
inst.rest[0].resource[79].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[2].code == "update"
assert (
inst.rest[0].resource[79].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[3].code == "delete"
assert (
inst.rest[0].resource[79].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[79].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[5].code == "validate"
assert (
inst.rest[0].resource[79].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[79].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[7].code == "create"
assert (
inst.rest[0].resource[79].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[79].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[79].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[79].profile.reference
== "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
)
assert inst.rest[0].resource[79].searchInclude[0] == "RelatedPerson.patient"
assert (
inst.rest[0].resource[79].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-phone"
)
assert (
inst.rest[0].resource[79].searchParam[0].documentation
== "A value in a phone contact"
)
assert inst.rest[0].resource[79].searchParam[0].name == "phone"
assert inst.rest[0].resource[79].searchParam[0].type == "token"
assert (
inst.rest[0].resource[79].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-phonetic"
)
assert (
inst.rest[0].resource[79].searchParam[1].documentation
== "A portion of name using some kind of phonetic matching algorithm"
)
assert inst.rest[0].resource[79].searchParam[1].name == "phonetic"
assert inst.rest[0].resource[79].searchParam[1].type == "string"
assert (
inst.rest[0].resource[79].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address-country"
)
assert (
inst.rest[0].resource[79].searchParam[2].documentation
== "A country specified in an address"
)
assert inst.rest[0].resource[79].searchParam[2].name == "address-country"
assert inst.rest[0].resource[79].searchParam[2].type == "string"
assert (
inst.rest[0].resource[79].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-patient"
)
assert (
inst.rest[0].resource[79].searchParam[3].documentation
== "The patient this person is related to"
)
assert inst.rest[0].resource[79].searchParam[3].name == "patient"
assert inst.rest[0].resource[79].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[79].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address-city"
)
assert (
inst.rest[0].resource[79].searchParam[4].documentation
== "A city specified in an address"
)
assert inst.rest[0].resource[79].searchParam[4].name == "address-city"
assert inst.rest[0].resource[79].searchParam[4].type == "string"
assert (
inst.rest[0].resource[79].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address-state"
)
assert (
inst.rest[0].resource[79].searchParam[5].documentation
== "A state specified in an address"
)
assert inst.rest[0].resource[79].searchParam[5].name == "address-state"
assert inst.rest[0].resource[79].searchParam[5].type == "string"
assert (
inst.rest[0].resource[79].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-email"
)
assert (
inst.rest[0].resource[79].searchParam[6].documentation
== "A value in an email contact"
)
assert inst.rest[0].resource[79].searchParam[6].name == "email"
assert inst.rest[0].resource[79].searchParam[6].type == "token"
assert (
inst.rest[0].resource[79].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address"
)
assert (
inst.rest[0].resource[79].searchParam[7].documentation
== "An address in any kind of address/part"
)
assert inst.rest[0].resource[79].searchParam[7].name == "address"
assert inst.rest[0].resource[79].searchParam[7].type == "string"
assert (
inst.rest[0].resource[79].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address-use"
)
assert (
inst.rest[0].resource[79].searchParam[8].documentation
== "A use code specified in an address"
)
assert inst.rest[0].resource[79].searchParam[8].name == "address-use"
assert inst.rest[0].resource[79].searchParam[8].type == "token"
assert (
inst.rest[0].resource[79].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-name"
)
assert (
inst.rest[0].resource[79].searchParam[9].documentation
== "A portion of name in any name part"
)
assert inst.rest[0].resource[79].searchParam[9].name == "name"
assert inst.rest[0].resource[79].searchParam[9].type == "string"
assert (
inst.rest[0].resource[79].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-birthdate"
)
assert (
inst.rest[0].resource[79].searchParam[10].documentation
== "The Related Person's date of birth"
)
assert inst.rest[0].resource[79].searchParam[10].name == "birthdate"
assert inst.rest[0].resource[79].searchParam[10].type == "date"
assert (
inst.rest[0].resource[79].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-telecom"
)
assert (
inst.rest[0].resource[79].searchParam[11].documentation
== "The value in any kind of contact"
)
assert inst.rest[0].resource[79].searchParam[11].name == "telecom"
assert inst.rest[0].resource[79].searchParam[11].type == "token"
assert (
inst.rest[0].resource[79].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-gender"
)
assert (
inst.rest[0].resource[79].searchParam[12].documentation
== "Gender of the person"
)
assert inst.rest[0].resource[79].searchParam[12].name == "gender"
assert inst.rest[0].resource[79].searchParam[12].type == "token"
assert (
inst.rest[0].resource[79].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-identifier"
)
assert (
inst.rest[0].resource[79].searchParam[13].documentation
== "A patient Identifier"
)
assert inst.rest[0].resource[79].searchParam[13].name == "identifier"
assert inst.rest[0].resource[79].searchParam[13].type == "token"
assert (
inst.rest[0].resource[79].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/relatedperson-address-postalcode"
)
assert (
inst.rest[0].resource[79].searchParam[14].documentation
== "A postal code specified in an address"
)
assert inst.rest[0].resource[79].searchParam[14].name == "address-postalcode"
assert inst.rest[0].resource[79].searchParam[14].type == "string"
assert (
inst.rest[0].resource[79].searchRevInclude[0] == "AllergyIntolerance.reporter"
)
assert inst.rest[0].resource[79].searchRevInclude[1] == "Appointment.patient"
assert inst.rest[0].resource[79].searchRevInclude[2] == "Appointment.practitioner"
assert inst.rest[0].resource[79].searchRevInclude[3] == "Appointment.location"
assert inst.rest[0].resource[79].searchRevInclude[4] == "Appointment.actor"
assert (
inst.rest[0].resource[79].searchRevInclude[5] == "AppointmentResponse.patient"
)
assert (
inst.rest[0].resource[79].searchRevInclude[6]
== "AppointmentResponse.practitioner"
)
assert (
inst.rest[0].resource[79].searchRevInclude[7] == "AppointmentResponse.location"
)
assert inst.rest[0].resource[79].searchRevInclude[8] == "AppointmentResponse.actor"
assert inst.rest[0].resource[79].searchRevInclude[9] == "AuditEvent.patient"
assert inst.rest[0].resource[79].searchRevInclude[10] == "AuditEvent.participant"
assert inst.rest[0].resource[79].searchRevInclude[11] == "Basic.author"
assert inst.rest[0].resource[79].searchRevInclude[12] == "CarePlan.participant"
assert inst.rest[0].resource[79].searchRevInclude[13] == "CarePlan.performer"
assert inst.rest[0].resource[79].searchRevInclude[14] == "Communication.sender"
assert inst.rest[0].resource[79].searchRevInclude[15] == "Communication.recipient"
assert (
inst.rest[0].resource[79].searchRevInclude[16] == "CommunicationRequest.sender"
)
assert (
inst.rest[0].resource[79].searchRevInclude[17]
== "CommunicationRequest.requester"
)
assert (
inst.rest[0].resource[79].searchRevInclude[18]
== "CommunicationRequest.recipient"
)
assert inst.rest[0].resource[79].searchRevInclude[19] == "Composition.author"
assert inst.rest[0].resource[79].searchRevInclude[20] == "Contract.signer"
assert inst.rest[0].resource[79].searchRevInclude[21] == "Contract.actor"
assert (
inst.rest[0].resource[79].searchRevInclude[22] == "DocumentManifest.recipient"
)
assert inst.rest[0].resource[79].searchRevInclude[23] == "DocumentManifest.author"
assert inst.rest[0].resource[79].searchRevInclude[24] == "DocumentReference.author"
assert inst.rest[0].resource[79].searchRevInclude[25] == "Encounter.practitioner"
assert inst.rest[0].resource[79].searchRevInclude[26] == "Encounter.participant"
assert (
inst.rest[0].resource[79].searchRevInclude[27]
== "ImagingObjectSelection.author"
)
assert (
inst.rest[0].resource[79].searchRevInclude[28]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[79].searchRevInclude[29] == "MedicationStatement.source"
)
assert inst.rest[0].resource[79].searchRevInclude[30] == "Observation.performer"
assert inst.rest[0].resource[79].searchRevInclude[31] == "Person.link"
assert inst.rest[0].resource[79].searchRevInclude[32] == "Person.relatedperson"
assert inst.rest[0].resource[79].searchRevInclude[33] == "Person.patient"
assert inst.rest[0].resource[79].searchRevInclude[34] == "Person.practitioner"
assert inst.rest[0].resource[79].searchRevInclude[35] == "Procedure.performer"
assert inst.rest[0].resource[79].searchRevInclude[36] == "ProcedureRequest.orderer"
assert (
inst.rest[0].resource[79].searchRevInclude[37] == "ProcedureRequest.performer"
)
assert inst.rest[0].resource[79].searchRevInclude[38] == "Provenance.agent"
assert (
inst.rest[0].resource[79].searchRevInclude[39] == "QuestionnaireResponse.author"
)
assert (
inst.rest[0].resource[79].searchRevInclude[40] == "QuestionnaireResponse.source"
)
assert inst.rest[0].resource[79].searchRevInclude[41] == "Schedule.actor"
assert inst.rest[0].resource[79].type == "RelatedPerson"
assert inst.rest[0].resource[80].conditionalCreate == True
assert inst.rest[0].resource[80].conditionalDelete == "multiple"
assert inst.rest[0].resource[80].conditionalUpdate == True
assert inst.rest[0].resource[80].interaction[0].code == "read"
assert (
inst.rest[0].resource[80].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[1].code == "vread"
assert (
inst.rest[0].resource[80].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[2].code == "update"
assert (
inst.rest[0].resource[80].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[3].code == "delete"
assert (
inst.rest[0].resource[80].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[80].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[5].code == "validate"
assert (
inst.rest[0].resource[80].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[80].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[7].code == "create"
assert (
inst.rest[0].resource[80].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[80].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[80].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[80].profile.reference
== "http://hl7.org/fhir/StructureDefinition/RiskAssessment"
)
assert inst.rest[0].resource[80].searchInclude[0] == "RiskAssessment.patient"
assert inst.rest[0].resource[80].searchInclude[1] == "RiskAssessment.condition"
assert inst.rest[0].resource[80].searchInclude[2] == "RiskAssessment.subject"
assert inst.rest[0].resource[80].searchInclude[3] == "RiskAssessment.performer"
assert inst.rest[0].resource[80].searchInclude[4] == "RiskAssessment.encounter"
assert (
inst.rest[0].resource[80].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-patient"
)
assert (
inst.rest[0].resource[80].searchParam[0].documentation
== "Who/what does assessment apply to?"
)
assert inst.rest[0].resource[80].searchParam[0].name == "patient"
assert inst.rest[0].resource[80].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[80].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-condition"
)
assert (
inst.rest[0].resource[80].searchParam[1].documentation == "Condition assessed"
)
assert inst.rest[0].resource[80].searchParam[1].name == "condition"
assert inst.rest[0].resource[80].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[80].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-subject"
)
assert (
inst.rest[0].resource[80].searchParam[2].documentation
== "Who/what does assessment apply to?"
)
assert inst.rest[0].resource[80].searchParam[2].name == "subject"
assert inst.rest[0].resource[80].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[80].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-performer"
)
assert (
inst.rest[0].resource[80].searchParam[3].documentation == "Who did assessment?"
)
assert inst.rest[0].resource[80].searchParam[3].name == "performer"
assert inst.rest[0].resource[80].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[80].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-method"
)
assert (
inst.rest[0].resource[80].searchParam[4].documentation == "Evaluation mechanism"
)
assert inst.rest[0].resource[80].searchParam[4].name == "method"
assert inst.rest[0].resource[80].searchParam[4].type == "token"
assert (
inst.rest[0].resource[80].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-encounter"
)
assert (
inst.rest[0].resource[80].searchParam[5].documentation
== "Where was assessment performed?"
)
assert inst.rest[0].resource[80].searchParam[5].name == "encounter"
assert inst.rest[0].resource[80].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[80].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-date"
)
assert (
inst.rest[0].resource[80].searchParam[6].documentation
== "When was assessment made?"
)
assert inst.rest[0].resource[80].searchParam[6].name == "date"
assert inst.rest[0].resource[80].searchParam[6].type == "date"
assert (
inst.rest[0].resource[80].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/riskassessment-identifier"
)
assert (
inst.rest[0].resource[80].searchParam[7].documentation
== "Unique identifier for the assessment"
)
assert inst.rest[0].resource[80].searchParam[7].name == "identifier"
assert inst.rest[0].resource[80].searchParam[7].type == "token"
assert inst.rest[0].resource[80].type == "RiskAssessment"
assert inst.rest[0].resource[81].conditionalCreate == True
assert inst.rest[0].resource[81].conditionalDelete == "multiple"
assert inst.rest[0].resource[81].conditionalUpdate == True
assert inst.rest[0].resource[81].interaction[0].code == "read"
assert (
inst.rest[0].resource[81].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[1].code == "vread"
assert (
inst.rest[0].resource[81].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[2].code == "update"
assert (
inst.rest[0].resource[81].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[3].code == "delete"
assert (
inst.rest[0].resource[81].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[81].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[5].code == "validate"
assert (
inst.rest[0].resource[81].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[81].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[7].code == "create"
assert (
inst.rest[0].resource[81].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[81].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[81].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[81].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Schedule"
)
assert inst.rest[0].resource[81].searchInclude[0] == "Schedule.actor"
assert (
inst.rest[0].resource[81].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/schedule-actor"
)
assert (
inst.rest[0].resource[81].searchParam[0].documentation
== "The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for"
)
assert inst.rest[0].resource[81].searchParam[0].name == "actor"
assert inst.rest[0].resource[81].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[81].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/schedule-date"
)
assert (
inst.rest[0].resource[81].searchParam[1].documentation
== "Search for Schedule resources that have a period that contains this date specified"
)
assert inst.rest[0].resource[81].searchParam[1].name == "date"
assert inst.rest[0].resource[81].searchParam[1].type == "date"
assert (
inst.rest[0].resource[81].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/schedule-type"
)
assert (
inst.rest[0].resource[81].searchParam[2].documentation
== "The type of appointments that can be booked into associated slot(s)"
)
assert inst.rest[0].resource[81].searchParam[2].name == "type"
assert inst.rest[0].resource[81].searchParam[2].type == "token"
assert (
inst.rest[0].resource[81].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/schedule-identifier"
)
assert (
inst.rest[0].resource[81].searchParam[3].documentation
== "A Schedule Identifier"
)
assert inst.rest[0].resource[81].searchParam[3].name == "identifier"
assert inst.rest[0].resource[81].searchParam[3].type == "token"
assert inst.rest[0].resource[81].searchRevInclude[0] == "Slot.schedule"
assert inst.rest[0].resource[81].type == "Schedule"
assert inst.rest[0].resource[82].conditionalCreate == True
assert inst.rest[0].resource[82].conditionalDelete == "multiple"
assert inst.rest[0].resource[82].conditionalUpdate == True
assert inst.rest[0].resource[82].interaction[0].code == "read"
assert (
inst.rest[0].resource[82].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[1].code == "vread"
assert (
inst.rest[0].resource[82].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[2].code == "update"
assert (
inst.rest[0].resource[82].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[3].code == "delete"
assert (
inst.rest[0].resource[82].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[82].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[5].code == "validate"
assert (
inst.rest[0].resource[82].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[82].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[7].code == "create"
assert (
inst.rest[0].resource[82].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[82].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[82].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[82].profile.reference
== "http://hl7.org/fhir/StructureDefinition/SearchParameter"
)
assert (
inst.rest[0].resource[82].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-description"
)
assert (
inst.rest[0].resource[82].searchParam[0].documentation
== "Documentation for search parameter"
)
assert inst.rest[0].resource[82].searchParam[0].name == "description"
assert inst.rest[0].resource[82].searchParam[0].type == "string"
assert (
inst.rest[0].resource[82].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-name"
)
assert (
inst.rest[0].resource[82].searchParam[1].documentation
== "Informal name for this search parameter"
)
assert inst.rest[0].resource[82].searchParam[1].name == "name"
assert inst.rest[0].resource[82].searchParam[1].type == "string"
assert (
inst.rest[0].resource[82].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-target"
)
assert (
inst.rest[0].resource[82].searchParam[2].documentation
== "Types of resource (if a resource reference)"
)
assert inst.rest[0].resource[82].searchParam[2].name == "target"
assert inst.rest[0].resource[82].searchParam[2].type == "token"
assert (
inst.rest[0].resource[82].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-base"
)
assert (
inst.rest[0].resource[82].searchParam[3].documentation
== "The resource type this search parameter applies to"
)
assert inst.rest[0].resource[82].searchParam[3].name == "base"
assert inst.rest[0].resource[82].searchParam[3].type == "token"
assert (
inst.rest[0].resource[82].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-code"
)
assert inst.rest[0].resource[82].searchParam[4].documentation == "Code used in URL"
assert inst.rest[0].resource[82].searchParam[4].name == "code"
assert inst.rest[0].resource[82].searchParam[4].type == "token"
assert (
inst.rest[0].resource[82].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-type"
)
assert (
inst.rest[0].resource[82].searchParam[5].documentation
== "number | date | string | token | reference | composite | quantity | uri"
)
assert inst.rest[0].resource[82].searchParam[5].name == "type"
assert inst.rest[0].resource[82].searchParam[5].type == "token"
assert (
inst.rest[0].resource[82].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/searchparameter-url"
)
assert (
inst.rest[0].resource[82].searchParam[6].documentation
== "Absolute URL used to reference this search parameter"
)
assert inst.rest[0].resource[82].searchParam[6].name == "url"
assert inst.rest[0].resource[82].searchParam[6].type == "uri"
assert inst.rest[0].resource[82].type == "SearchParameter"
assert inst.rest[0].resource[83].conditionalCreate == True
assert inst.rest[0].resource[83].conditionalDelete == "multiple"
assert inst.rest[0].resource[83].conditionalUpdate == True
assert inst.rest[0].resource[83].interaction[0].code == "read"
assert (
inst.rest[0].resource[83].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[1].code == "vread"
assert (
inst.rest[0].resource[83].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[2].code == "update"
assert (
inst.rest[0].resource[83].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[3].code == "delete"
assert (
inst.rest[0].resource[83].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[83].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[5].code == "validate"
assert (
inst.rest[0].resource[83].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[83].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[7].code == "create"
assert (
inst.rest[0].resource[83].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[83].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[83].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[83].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Slot"
)
assert inst.rest[0].resource[83].searchInclude[0] == "Slot.schedule"
assert (
inst.rest[0].resource[83].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/slot-fb-type"
)
assert (
inst.rest[0].resource[83].searchParam[0].documentation
== "The free/busy status of the appointment"
)
assert inst.rest[0].resource[83].searchParam[0].name == "fb-type"
assert inst.rest[0].resource[83].searchParam[0].type == "token"
assert (
inst.rest[0].resource[83].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/slot-schedule"
)
assert (
inst.rest[0].resource[83].searchParam[1].documentation
== "The Schedule Resource that we are seeking a slot within"
)
assert inst.rest[0].resource[83].searchParam[1].name == "schedule"
assert inst.rest[0].resource[83].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[83].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/slot-start"
)
assert (
inst.rest[0].resource[83].searchParam[2].documentation
== "Appointment date/time."
)
assert inst.rest[0].resource[83].searchParam[2].name == "start"
assert inst.rest[0].resource[83].searchParam[2].type == "date"
assert (
inst.rest[0].resource[83].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/slot-slot-type"
)
assert (
inst.rest[0].resource[83].searchParam[3].documentation
== "The type of appointments that can be booked into the slot"
)
assert inst.rest[0].resource[83].searchParam[3].name == "slot-type"
assert inst.rest[0].resource[83].searchParam[3].type == "token"
assert (
inst.rest[0].resource[83].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/slot-identifier"
)
assert inst.rest[0].resource[83].searchParam[4].documentation == "A Slot Identifier"
assert inst.rest[0].resource[83].searchParam[4].name == "identifier"
assert inst.rest[0].resource[83].searchParam[4].type == "token"
assert inst.rest[0].resource[83].type == "Slot"
assert inst.rest[0].resource[84].conditionalCreate == True
assert inst.rest[0].resource[84].conditionalDelete == "multiple"
assert inst.rest[0].resource[84].conditionalUpdate == True
assert inst.rest[0].resource[84].interaction[0].code == "read"
assert (
inst.rest[0].resource[84].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[1].code == "vread"
assert (
inst.rest[0].resource[84].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[2].code == "update"
assert (
inst.rest[0].resource[84].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[3].code == "delete"
assert (
inst.rest[0].resource[84].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[84].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[5].code == "validate"
assert (
inst.rest[0].resource[84].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[84].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[7].code == "create"
assert (
inst.rest[0].resource[84].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[84].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[84].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[84].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Specimen"
)
assert inst.rest[0].resource[84].searchInclude[0] == "Specimen.collector"
assert inst.rest[0].resource[84].searchInclude[1] == "Specimen.patient"
assert inst.rest[0].resource[84].searchInclude[2] == "Specimen.subject"
assert inst.rest[0].resource[84].searchInclude[3] == "Specimen.parent"
assert (
inst.rest[0].resource[84].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/specimen-collector"
)
assert (
inst.rest[0].resource[84].searchParam[0].documentation
== "Who collected the specimen"
)
assert inst.rest[0].resource[84].searchParam[0].name == "collector"
assert inst.rest[0].resource[84].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[84].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/specimen-container-id"
)
assert (
inst.rest[0].resource[84].searchParam[1].documentation
== "The unique identifier associated with the specimen container"
)
assert inst.rest[0].resource[84].searchParam[1].name == "container-id"
assert inst.rest[0].resource[84].searchParam[1].type == "token"
assert (
inst.rest[0].resource[84].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/specimen-patient"
)
assert (
inst.rest[0].resource[84].searchParam[2].documentation
== "The patient the specimen comes from"
)
assert inst.rest[0].resource[84].searchParam[2].name == "patient"
assert inst.rest[0].resource[84].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[84].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/specimen-bodysite"
)
assert (
inst.rest[0].resource[84].searchParam[3].documentation
== "The code for the body site from where the specimen originated"
)
assert inst.rest[0].resource[84].searchParam[3].name == "bodysite"
assert inst.rest[0].resource[84].searchParam[3].type == "token"
assert (
inst.rest[0].resource[84].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/specimen-container"
)
assert (
inst.rest[0].resource[84].searchParam[4].documentation
== "The kind of specimen container"
)
assert inst.rest[0].resource[84].searchParam[4].name == "container"
assert inst.rest[0].resource[84].searchParam[4].type == "token"
assert (
inst.rest[0].resource[84].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/specimen-collected"
)
assert (
inst.rest[0].resource[84].searchParam[5].documentation
== "The date the specimen was collected"
)
assert inst.rest[0].resource[84].searchParam[5].name == "collected"
assert inst.rest[0].resource[84].searchParam[5].type == "date"
assert (
inst.rest[0].resource[84].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/specimen-subject"
)
assert (
inst.rest[0].resource[84].searchParam[6].documentation
== "The subject of the specimen"
)
assert inst.rest[0].resource[84].searchParam[6].name == "subject"
assert inst.rest[0].resource[84].searchParam[6].type == "reference"
assert (
inst.rest[0].resource[84].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/specimen-accession"
)
assert (
inst.rest[0].resource[84].searchParam[7].documentation
== "The accession number associated with the specimen"
)
assert inst.rest[0].resource[84].searchParam[7].name == "accession"
assert inst.rest[0].resource[84].searchParam[7].type == "token"
assert (
inst.rest[0].resource[84].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/specimen-parent"
)
assert (
inst.rest[0].resource[84].searchParam[8].documentation
== "The parent of the specimen"
)
assert inst.rest[0].resource[84].searchParam[8].name == "parent"
assert inst.rest[0].resource[84].searchParam[8].type == "reference"
assert (
inst.rest[0].resource[84].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/specimen-type"
)
assert inst.rest[0].resource[84].searchParam[9].documentation == "The specimen type"
assert inst.rest[0].resource[84].searchParam[9].name == "type"
assert inst.rest[0].resource[84].searchParam[9].type == "token"
assert (
inst.rest[0].resource[84].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/specimen-identifier"
)
assert (
inst.rest[0].resource[84].searchParam[10].documentation
== "The unique identifier associated with the specimen"
)
assert inst.rest[0].resource[84].searchParam[10].name == "identifier"
assert inst.rest[0].resource[84].searchParam[10].type == "token"
assert inst.rest[0].resource[84].searchRevInclude[0] == "DiagnosticOrder.specimen"
assert inst.rest[0].resource[84].searchRevInclude[1] == "DiagnosticReport.specimen"
assert inst.rest[0].resource[84].searchRevInclude[2] == "Media.patient"
assert inst.rest[0].resource[84].searchRevInclude[3] == "Media.subject"
assert inst.rest[0].resource[84].searchRevInclude[4] == "Observation.specimen"
assert inst.rest[0].resource[84].searchRevInclude[5] == "Specimen.parent"
assert inst.rest[0].resource[84].type == "Specimen"
assert inst.rest[0].resource[85].conditionalCreate == True
assert inst.rest[0].resource[85].conditionalDelete == "multiple"
assert inst.rest[0].resource[85].conditionalUpdate == True
assert inst.rest[0].resource[85].interaction[0].code == "read"
assert (
inst.rest[0].resource[85].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[1].code == "vread"
assert (
inst.rest[0].resource[85].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[2].code == "update"
assert (
inst.rest[0].resource[85].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[3].code == "delete"
assert (
inst.rest[0].resource[85].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[85].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[5].code == "validate"
assert (
inst.rest[0].resource[85].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[85].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[7].code == "create"
assert (
inst.rest[0].resource[85].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[85].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[85].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[85].profile.reference
== "http://hl7.org/fhir/StructureDefinition/StructureDefinition"
)
assert inst.rest[0].resource[85].searchInclude[0] == "StructureDefinition.valueset"
assert (
inst.rest[0].resource[85].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-abstract"
)
assert (
inst.rest[0].resource[85].searchParam[0].documentation
== "Whether the structure is abstract"
)
assert inst.rest[0].resource[85].searchParam[0].name == "abstract"
assert inst.rest[0].resource[85].searchParam[0].type == "token"
assert (
inst.rest[0].resource[85].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-status"
)
assert (
inst.rest[0].resource[85].searchParam[1].documentation
== "The current status of the profile"
)
assert inst.rest[0].resource[85].searchParam[1].name == "status"
assert inst.rest[0].resource[85].searchParam[1].type == "token"
assert (
inst.rest[0].resource[85].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-experimental"
)
assert (
inst.rest[0].resource[85].searchParam[2].documentation
== "If for testing purposes, not real usage"
)
assert inst.rest[0].resource[85].searchParam[2].name == "experimental"
assert inst.rest[0].resource[85].searchParam[2].type == "token"
assert (
inst.rest[0].resource[85].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-display"
)
assert (
inst.rest[0].resource[85].searchParam[3].documentation
== "Use this name when displaying the value"
)
assert inst.rest[0].resource[85].searchParam[3].name == "display"
assert inst.rest[0].resource[85].searchParam[3].type == "string"
assert (
inst.rest[0].resource[85].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-ext-context"
)
assert (
inst.rest[0].resource[85].searchParam[4].documentation
== "Where the extension can be used in instances"
)
assert inst.rest[0].resource[85].searchParam[4].name == "ext-context"
assert inst.rest[0].resource[85].searchParam[4].type == "string"
assert (
inst.rest[0].resource[85].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-code"
)
assert (
inst.rest[0].resource[85].searchParam[5].documentation
== "A code for the profile"
)
assert inst.rest[0].resource[85].searchParam[5].name == "code"
assert inst.rest[0].resource[85].searchParam[5].type == "token"
assert (
inst.rest[0].resource[85].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-date"
)
assert (
inst.rest[0].resource[85].searchParam[6].documentation
== "The profile publication date"
)
assert inst.rest[0].resource[85].searchParam[6].name == "date"
assert inst.rest[0].resource[85].searchParam[6].type == "date"
assert (
inst.rest[0].resource[85].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-type"
)
assert (
inst.rest[0].resource[85].searchParam[7].documentation
== "Any datatype or resource, including abstract ones"
)
assert inst.rest[0].resource[85].searchParam[7].name == "type"
assert inst.rest[0].resource[85].searchParam[7].type == "token"
assert (
inst.rest[0].resource[85].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-url"
)
assert (
inst.rest[0].resource[85].searchParam[8].documentation
== "Absolute URL used to reference this StructureDefinition"
)
assert inst.rest[0].resource[85].searchParam[8].name == "url"
assert inst.rest[0].resource[85].searchParam[8].type == "uri"
assert (
inst.rest[0].resource[85].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-kind"
)
assert (
inst.rest[0].resource[85].searchParam[9].documentation
== "datatype | resource | logical"
)
assert inst.rest[0].resource[85].searchParam[9].name == "kind"
assert inst.rest[0].resource[85].searchParam[9].type == "token"
assert (
inst.rest[0].resource[85].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-version"
)
assert (
inst.rest[0].resource[85].searchParam[10].documentation
== "The version identifier of the profile"
)
assert inst.rest[0].resource[85].searchParam[10].name == "version"
assert inst.rest[0].resource[85].searchParam[10].type == "token"
assert (
inst.rest[0].resource[85].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-publisher"
)
assert (
inst.rest[0].resource[85].searchParam[11].documentation
== "Name of the publisher of the profile"
)
assert inst.rest[0].resource[85].searchParam[11].name == "publisher"
assert inst.rest[0].resource[85].searchParam[11].type == "string"
assert (
inst.rest[0].resource[85].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-base-path"
)
assert (
inst.rest[0].resource[85].searchParam[12].documentation
== "Path that identifies the base element"
)
assert inst.rest[0].resource[85].searchParam[12].name == "base-path"
assert inst.rest[0].resource[85].searchParam[12].type == "token"
assert (
inst.rest[0].resource[85].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-valueset"
)
assert (
inst.rest[0].resource[85].searchParam[13].documentation
== "A vocabulary binding reference"
)
assert inst.rest[0].resource[85].searchParam[13].name == "valueset"
assert inst.rest[0].resource[85].searchParam[13].type == "reference"
assert (
inst.rest[0].resource[85].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-context-type"
)
assert (
inst.rest[0].resource[85].searchParam[14].documentation
== "resource | datatype | mapping | extension"
)
assert inst.rest[0].resource[85].searchParam[14].name == "context-type"
assert inst.rest[0].resource[85].searchParam[14].type == "token"
assert (
inst.rest[0].resource[85].searchParam[15].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-description"
)
assert (
inst.rest[0].resource[85].searchParam[15].documentation
== "Text search in the description of the profile"
)
assert inst.rest[0].resource[85].searchParam[15].name == "description"
assert inst.rest[0].resource[85].searchParam[15].type == "string"
assert (
inst.rest[0].resource[85].searchParam[16].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-name"
)
assert (
inst.rest[0].resource[85].searchParam[16].documentation == "Name of the profile"
)
assert inst.rest[0].resource[85].searchParam[16].name == "name"
assert inst.rest[0].resource[85].searchParam[16].type == "string"
assert (
inst.rest[0].resource[85].searchParam[17].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-base"
)
assert (
inst.rest[0].resource[85].searchParam[17].documentation
== "Structure that this set of constraints applies to"
)
assert inst.rest[0].resource[85].searchParam[17].name == "base"
assert inst.rest[0].resource[85].searchParam[17].type == "uri"
assert (
inst.rest[0].resource[85].searchParam[18].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-context"
)
assert (
inst.rest[0].resource[85].searchParam[18].documentation
== "A use context assigned to the structure"
)
assert inst.rest[0].resource[85].searchParam[18].name == "context"
assert inst.rest[0].resource[85].searchParam[18].type == "token"
assert (
inst.rest[0].resource[85].searchParam[19].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-path"
)
assert (
inst.rest[0].resource[85].searchParam[19].documentation
== "A path that is constrained in the profile"
)
assert inst.rest[0].resource[85].searchParam[19].name == "path"
assert inst.rest[0].resource[85].searchParam[19].type == "token"
assert (
inst.rest[0].resource[85].searchParam[20].definition
== "http://hl7.org/fhir/SearchParameter/structuredefinition-identifier"
)
assert (
inst.rest[0].resource[85].searchParam[20].documentation
== "The identifier of the profile"
)
assert inst.rest[0].resource[85].searchParam[20].name == "identifier"
assert inst.rest[0].resource[85].searchParam[20].type == "token"
assert inst.rest[0].resource[85].searchRevInclude[0] == "ConceptMap.sourceuri"
assert inst.rest[0].resource[85].searchRevInclude[1] == "ConceptMap.source"
assert inst.rest[0].resource[85].searchRevInclude[2] == "ConceptMap.target"
assert (
inst.rest[0].resource[85].searchRevInclude[3] == "Conformance.supported-profile"
)
assert inst.rest[0].resource[85].searchRevInclude[4] == "Conformance.profile"
assert (
inst.rest[0].resource[85].searchRevInclude[5] == "OperationDefinition.profile"
)
assert inst.rest[0].resource[85].type == "StructureDefinition"
assert inst.rest[0].resource[86].conditionalCreate == True
assert inst.rest[0].resource[86].conditionalDelete == "multiple"
assert inst.rest[0].resource[86].conditionalUpdate == True
assert inst.rest[0].resource[86].interaction[0].code == "read"
assert (
inst.rest[0].resource[86].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[1].code == "vread"
assert (
inst.rest[0].resource[86].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[2].code == "update"
assert (
inst.rest[0].resource[86].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[3].code == "delete"
assert (
inst.rest[0].resource[86].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[86].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[5].code == "validate"
assert (
inst.rest[0].resource[86].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[86].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[7].code == "create"
assert (
inst.rest[0].resource[86].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[86].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[86].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[86].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Subscription"
)
assert (
inst.rest[0].resource[86].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/subscription-criteria"
)
assert (
inst.rest[0].resource[86].searchParam[0].documentation
== "Rule for server push criteria"
)
assert inst.rest[0].resource[86].searchParam[0].name == "criteria"
assert inst.rest[0].resource[86].searchParam[0].type == "string"
assert (
inst.rest[0].resource[86].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/subscription-status"
)
assert (
inst.rest[0].resource[86].searchParam[1].documentation
== "requested | active | error | off"
)
assert inst.rest[0].resource[86].searchParam[1].name == "status"
assert inst.rest[0].resource[86].searchParam[1].type == "token"
assert (
inst.rest[0].resource[86].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/subscription-tag"
)
assert (
inst.rest[0].resource[86].searchParam[2].documentation
== "A tag to add to matching resources"
)
assert inst.rest[0].resource[86].searchParam[2].name == "tag"
assert inst.rest[0].resource[86].searchParam[2].type == "token"
assert (
inst.rest[0].resource[86].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/subscription-payload"
)
assert (
inst.rest[0].resource[86].searchParam[3].documentation
== "Mimetype to send, or blank for no payload"
)
assert inst.rest[0].resource[86].searchParam[3].name == "payload"
assert inst.rest[0].resource[86].searchParam[3].type == "string"
assert (
inst.rest[0].resource[86].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/subscription-type"
)
assert (
inst.rest[0].resource[86].searchParam[4].documentation
== "rest-hook | websocket | email | sms | message"
)
assert inst.rest[0].resource[86].searchParam[4].name == "type"
assert inst.rest[0].resource[86].searchParam[4].type == "token"
assert (
inst.rest[0].resource[86].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/subscription-contact"
)
assert (
inst.rest[0].resource[86].searchParam[5].documentation
== "Contact details for source (e.g. troubleshooting)"
)
assert inst.rest[0].resource[86].searchParam[5].name == "contact"
assert inst.rest[0].resource[86].searchParam[5].type == "token"
assert (
inst.rest[0].resource[86].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/subscription-url"
)
assert (
inst.rest[0].resource[86].searchParam[6].documentation
== "Where the channel points to"
)
assert inst.rest[0].resource[86].searchParam[6].name == "url"
assert inst.rest[0].resource[86].searchParam[6].type == "uri"
assert inst.rest[0].resource[86].type == "Subscription"
assert inst.rest[0].resource[87].conditionalCreate == True
assert inst.rest[0].resource[87].conditionalDelete == "multiple"
assert inst.rest[0].resource[87].conditionalUpdate == True
assert inst.rest[0].resource[87].interaction[0].code == "read"
assert (
inst.rest[0].resource[87].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[1].code == "vread"
assert (
inst.rest[0].resource[87].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[2].code == "update"
assert (
inst.rest[0].resource[87].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[3].code == "delete"
assert (
inst.rest[0].resource[87].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[87].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[5].code == "validate"
assert (
inst.rest[0].resource[87].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[87].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[7].code == "create"
assert (
inst.rest[0].resource[87].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[87].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[87].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[87].profile.reference
== "http://hl7.org/fhir/StructureDefinition/Substance"
)
assert inst.rest[0].resource[87].searchInclude[0] == "Substance.substance"
assert (
inst.rest[0].resource[87].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/substance-substance"
)
assert (
inst.rest[0].resource[87].searchParam[0].documentation
== "A component of the substance"
)
assert inst.rest[0].resource[87].searchParam[0].name == "substance"
assert inst.rest[0].resource[87].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[87].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/substance-container-identifier"
)
assert (
inst.rest[0].resource[87].searchParam[1].documentation
== "Identifier of the package/container"
)
assert inst.rest[0].resource[87].searchParam[1].name == "container-identifier"
assert inst.rest[0].resource[87].searchParam[1].type == "token"
assert (
inst.rest[0].resource[87].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/substance-category"
)
assert (
inst.rest[0].resource[87].searchParam[2].documentation
== "The category of the substance"
)
assert inst.rest[0].resource[87].searchParam[2].name == "category"
assert inst.rest[0].resource[87].searchParam[2].type == "token"
assert (
inst.rest[0].resource[87].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/substance-quantity"
)
assert (
inst.rest[0].resource[87].searchParam[3].documentation
== "Amount of substance in the package"
)
assert inst.rest[0].resource[87].searchParam[3].name == "quantity"
assert inst.rest[0].resource[87].searchParam[3].type == "quantity"
assert (
inst.rest[0].resource[87].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/substance-code"
)
assert (
inst.rest[0].resource[87].searchParam[4].documentation
== "The code of the substance"
)
assert inst.rest[0].resource[87].searchParam[4].name == "code"
assert inst.rest[0].resource[87].searchParam[4].type == "token"
assert (
inst.rest[0].resource[87].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/substance-identifier"
)
assert (
inst.rest[0].resource[87].searchParam[5].documentation
== "Unique identifier for the substance"
)
assert inst.rest[0].resource[87].searchParam[5].name == "identifier"
assert inst.rest[0].resource[87].searchParam[5].type == "token"
assert (
inst.rest[0].resource[87].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/substance-expiry"
)
assert (
inst.rest[0].resource[87].searchParam[6].documentation
== "Expiry date of package or container of substance"
)
assert inst.rest[0].resource[87].searchParam[6].name == "expiry"
assert inst.rest[0].resource[87].searchParam[6].type == "date"
assert inst.rest[0].resource[87].searchRevInclude[0] == "Contract.actor"
assert inst.rest[0].resource[87].searchRevInclude[1] == "Group.member"
assert inst.rest[0].resource[87].searchRevInclude[2] == "Medication.ingredient"
assert inst.rest[0].resource[87].searchRevInclude[3] == "Order.patient"
assert inst.rest[0].resource[87].searchRevInclude[4] == "Order.subject"
assert inst.rest[0].resource[87].searchRevInclude[5] == "Specimen.patient"
assert inst.rest[0].resource[87].searchRevInclude[6] == "Specimen.subject"
assert inst.rest[0].resource[87].searchRevInclude[7] == "Substance.substance"
assert inst.rest[0].resource[87].type == "Substance"
assert inst.rest[0].resource[88].conditionalCreate == True
assert inst.rest[0].resource[88].conditionalDelete == "multiple"
assert inst.rest[0].resource[88].conditionalUpdate == True
assert inst.rest[0].resource[88].interaction[0].code == "read"
assert (
inst.rest[0].resource[88].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[1].code == "vread"
assert (
inst.rest[0].resource[88].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[2].code == "update"
assert (
inst.rest[0].resource[88].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[3].code == "delete"
assert (
inst.rest[0].resource[88].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[88].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[5].code == "validate"
assert (
inst.rest[0].resource[88].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[88].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[7].code == "create"
assert (
inst.rest[0].resource[88].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[88].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[88].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[88].profile.reference
== "http://hl7.org/fhir/StructureDefinition/SupplyDelivery"
)
assert inst.rest[0].resource[88].searchInclude[0] == "SupplyDelivery.patient"
assert inst.rest[0].resource[88].searchInclude[1] == "SupplyDelivery.receiver"
assert inst.rest[0].resource[88].searchInclude[2] == "SupplyDelivery.supplier"
assert (
inst.rest[0].resource[88].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/supplydelivery-patient"
)
assert (
inst.rest[0].resource[88].searchParam[0].documentation
== "Patient for whom the item is supplied"
)
assert inst.rest[0].resource[88].searchParam[0].name == "patient"
assert inst.rest[0].resource[88].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[88].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/supplydelivery-receiver"
)
assert (
inst.rest[0].resource[88].searchParam[1].documentation
== "Who collected the Supply"
)
assert inst.rest[0].resource[88].searchParam[1].name == "receiver"
assert inst.rest[0].resource[88].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[88].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/supplydelivery-status"
)
assert (
inst.rest[0].resource[88].searchParam[2].documentation
== "in-progress | completed | abandoned"
)
assert inst.rest[0].resource[88].searchParam[2].name == "status"
assert inst.rest[0].resource[88].searchParam[2].type == "token"
assert (
inst.rest[0].resource[88].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/supplydelivery-identifier"
)
assert (
inst.rest[0].resource[88].searchParam[3].documentation == "External identifier"
)
assert inst.rest[0].resource[88].searchParam[3].name == "identifier"
assert inst.rest[0].resource[88].searchParam[3].type == "token"
assert (
inst.rest[0].resource[88].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/supplydelivery-supplier"
)
assert inst.rest[0].resource[88].searchParam[4].documentation == "Dispenser"
assert inst.rest[0].resource[88].searchParam[4].name == "supplier"
assert inst.rest[0].resource[88].searchParam[4].type == "reference"
assert inst.rest[0].resource[88].type == "SupplyDelivery"
assert inst.rest[0].resource[89].conditionalCreate == True
assert inst.rest[0].resource[89].conditionalDelete == "multiple"
assert inst.rest[0].resource[89].conditionalUpdate == True
assert inst.rest[0].resource[89].interaction[0].code == "read"
assert (
inst.rest[0].resource[89].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[1].code == "vread"
assert (
inst.rest[0].resource[89].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[2].code == "update"
assert (
inst.rest[0].resource[89].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[3].code == "delete"
assert (
inst.rest[0].resource[89].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[89].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[5].code == "validate"
assert (
inst.rest[0].resource[89].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[89].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[7].code == "create"
assert (
inst.rest[0].resource[89].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[89].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[89].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[89].profile.reference
== "http://hl7.org/fhir/StructureDefinition/SupplyRequest"
)
assert inst.rest[0].resource[89].searchInclude[0] == "SupplyRequest.patient"
assert inst.rest[0].resource[89].searchInclude[1] == "SupplyRequest.source"
assert inst.rest[0].resource[89].searchInclude[2] == "SupplyRequest.supplier"
assert (
inst.rest[0].resource[89].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-patient"
)
assert (
inst.rest[0].resource[89].searchParam[0].documentation
== "Patient for whom the item is supplied"
)
assert inst.rest[0].resource[89].searchParam[0].name == "patient"
assert inst.rest[0].resource[89].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[89].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-source"
)
assert (
inst.rest[0].resource[89].searchParam[1].documentation
== "Who initiated this order"
)
assert inst.rest[0].resource[89].searchParam[1].name == "source"
assert inst.rest[0].resource[89].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[89].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-status"
)
assert (
inst.rest[0].resource[89].searchParam[2].documentation
== "requested | completed | failed | cancelled"
)
assert inst.rest[0].resource[89].searchParam[2].name == "status"
assert inst.rest[0].resource[89].searchParam[2].type == "token"
assert (
inst.rest[0].resource[89].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-date"
)
assert (
inst.rest[0].resource[89].searchParam[3].documentation
== "When the request was made"
)
assert inst.rest[0].resource[89].searchParam[3].name == "date"
assert inst.rest[0].resource[89].searchParam[3].type == "date"
assert (
inst.rest[0].resource[89].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-identifier"
)
assert inst.rest[0].resource[89].searchParam[4].documentation == "Unique identifier"
assert inst.rest[0].resource[89].searchParam[4].name == "identifier"
assert inst.rest[0].resource[89].searchParam[4].type == "token"
assert (
inst.rest[0].resource[89].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-supplier"
)
assert (
inst.rest[0].resource[89].searchParam[5].documentation
== "Who is intended to fulfill the request"
)
assert inst.rest[0].resource[89].searchParam[5].name == "supplier"
assert inst.rest[0].resource[89].searchParam[5].type == "reference"
assert (
inst.rest[0].resource[89].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/supplyrequest-kind"
)
assert (
inst.rest[0].resource[89].searchParam[6].documentation
== "The kind of supply (central, non-stock, etc.)"
)
assert inst.rest[0].resource[89].searchParam[6].name == "kind"
assert inst.rest[0].resource[89].searchParam[6].type == "token"
assert inst.rest[0].resource[89].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[89].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[89].searchRevInclude[2] == "ClinicalImpression.action"
assert inst.rest[0].resource[89].type == "SupplyRequest"
assert inst.rest[0].resource[90].conditionalCreate == True
assert inst.rest[0].resource[90].conditionalDelete == "multiple"
assert inst.rest[0].resource[90].conditionalUpdate == True
assert inst.rest[0].resource[90].interaction[0].code == "read"
assert (
inst.rest[0].resource[90].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[1].code == "vread"
assert (
inst.rest[0].resource[90].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[2].code == "update"
assert (
inst.rest[0].resource[90].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[3].code == "delete"
assert (
inst.rest[0].resource[90].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[90].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[5].code == "validate"
assert (
inst.rest[0].resource[90].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[90].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[7].code == "create"
assert (
inst.rest[0].resource[90].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[90].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[90].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[90].profile.reference
== "http://hl7.org/fhir/StructureDefinition/TestScript"
)
assert (
inst.rest[0].resource[90].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/testscript-testscript-test-capability"
)
assert (
inst.rest[0].resource[90].searchParam[0].documentation
== "TestScript test required and validated capability"
)
assert inst.rest[0].resource[90].searchParam[0].name == "testscript-test-capability"
assert inst.rest[0].resource[90].searchParam[0].type == "string"
assert (
inst.rest[0].resource[90].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/testscript-testscript-setup-capability"
)
assert (
inst.rest[0].resource[90].searchParam[1].documentation
== "TestScript setup required and validated capability"
)
assert (
inst.rest[0].resource[90].searchParam[1].name == "testscript-setup-capability"
)
assert inst.rest[0].resource[90].searchParam[1].type == "string"
assert (
inst.rest[0].resource[90].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/testscript-description"
)
assert (
inst.rest[0].resource[90].searchParam[2].documentation
== "Natural language description of the TestScript"
)
assert inst.rest[0].resource[90].searchParam[2].name == "description"
assert inst.rest[0].resource[90].searchParam[2].type == "string"
assert (
inst.rest[0].resource[90].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/testscript-name"
)
assert (
inst.rest[0].resource[90].searchParam[3].documentation
== "Informal name for this TestScript"
)
assert inst.rest[0].resource[90].searchParam[3].name == "name"
assert inst.rest[0].resource[90].searchParam[3].type == "string"
assert (
inst.rest[0].resource[90].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/testscript-testscript-capability"
)
assert (
inst.rest[0].resource[90].searchParam[4].documentation
== "TestScript required and validated capability"
)
assert inst.rest[0].resource[90].searchParam[4].name == "testscript-capability"
assert inst.rest[0].resource[90].searchParam[4].type == "string"
assert (
inst.rest[0].resource[90].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/testscript-identifier"
)
assert (
inst.rest[0].resource[90].searchParam[5].documentation == "External identifier"
)
assert inst.rest[0].resource[90].searchParam[5].name == "identifier"
assert inst.rest[0].resource[90].searchParam[5].type == "token"
assert (
inst.rest[0].resource[90].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/testscript-url"
)
assert (
inst.rest[0].resource[90].searchParam[6].documentation
== "Absolute URL used to reference this TestScript"
)
assert inst.rest[0].resource[90].searchParam[6].name == "url"
assert inst.rest[0].resource[90].searchParam[6].type == "uri"
assert inst.rest[0].resource[90].type == "TestScript"
assert inst.rest[0].resource[91].conditionalCreate == True
assert inst.rest[0].resource[91].conditionalDelete == "multiple"
assert inst.rest[0].resource[91].conditionalUpdate == True
assert inst.rest[0].resource[91].interaction[0].code == "read"
assert (
inst.rest[0].resource[91].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[1].code == "vread"
assert (
inst.rest[0].resource[91].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[2].code == "update"
assert (
inst.rest[0].resource[91].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[3].code == "delete"
assert (
inst.rest[0].resource[91].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[91].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[5].code == "validate"
assert (
inst.rest[0].resource[91].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[91].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[7].code == "create"
assert (
inst.rest[0].resource[91].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[91].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[91].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[91].profile.reference
== "http://hl7.org/fhir/StructureDefinition/ValueSet"
)
assert (
inst.rest[0].resource[91].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/valueset-system"
)
assert (
inst.rest[0].resource[91].searchParam[0].documentation
== "The system for any codes defined by this value set"
)
assert inst.rest[0].resource[91].searchParam[0].name == "system"
assert inst.rest[0].resource[91].searchParam[0].type == "uri"
assert (
inst.rest[0].resource[91].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/valueset-expansion"
)
assert (
inst.rest[0].resource[91].searchParam[1].documentation
== "Uniquely identifies this expansion"
)
assert inst.rest[0].resource[91].searchParam[1].name == "expansion"
assert inst.rest[0].resource[91].searchParam[1].type == "uri"
assert (
inst.rest[0].resource[91].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/valueset-status"
)
assert (
inst.rest[0].resource[91].searchParam[2].documentation
== "The status of the value set"
)
assert inst.rest[0].resource[91].searchParam[2].name == "status"
assert inst.rest[0].resource[91].searchParam[2].type == "token"
assert (
inst.rest[0].resource[91].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/valueset-description"
)
assert (
inst.rest[0].resource[91].searchParam[3].documentation
== "Text search in the description of the value set"
)
assert inst.rest[0].resource[91].searchParam[3].name == "description"
assert inst.rest[0].resource[91].searchParam[3].type == "string"
assert (
inst.rest[0].resource[91].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/valueset-name"
)
assert (
inst.rest[0].resource[91].searchParam[4].documentation
== "The name of the value set"
)
assert inst.rest[0].resource[91].searchParam[4].name == "name"
assert inst.rest[0].resource[91].searchParam[4].type == "string"
assert (
inst.rest[0].resource[91].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/valueset-context"
)
assert (
inst.rest[0].resource[91].searchParam[5].documentation
== "A use context assigned to the value set"
)
assert inst.rest[0].resource[91].searchParam[5].name == "context"
assert inst.rest[0].resource[91].searchParam[5].type == "token"
assert (
inst.rest[0].resource[91].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/valueset-code"
)
assert (
inst.rest[0].resource[91].searchParam[6].documentation
== "A code defined in the value set"
)
assert inst.rest[0].resource[91].searchParam[6].name == "code"
assert inst.rest[0].resource[91].searchParam[6].type == "token"
assert (
inst.rest[0].resource[91].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/valueset-date"
)
assert (
inst.rest[0].resource[91].searchParam[7].documentation
== "The value set publication date"
)
assert inst.rest[0].resource[91].searchParam[7].name == "date"
assert inst.rest[0].resource[91].searchParam[7].type == "date"
assert (
inst.rest[0].resource[91].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/valueset-identifier"
)
assert (
inst.rest[0].resource[91].searchParam[8].documentation
== "The identifier for the value set"
)
assert inst.rest[0].resource[91].searchParam[8].name == "identifier"
assert inst.rest[0].resource[91].searchParam[8].type == "token"
assert (
inst.rest[0].resource[91].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/valueset-reference"
)
assert (
inst.rest[0].resource[91].searchParam[9].documentation
== "A code system included or excluded in the value set or an imported value set"
)
assert inst.rest[0].resource[91].searchParam[9].name == "reference"
assert inst.rest[0].resource[91].searchParam[9].type == "uri"
assert (
inst.rest[0].resource[91].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/valueset-url"
)
assert (
inst.rest[0].resource[91].searchParam[10].documentation
== "The logical URL for the value set"
)
assert inst.rest[0].resource[91].searchParam[10].name == "url"
assert inst.rest[0].resource[91].searchParam[10].type == "uri"
assert (
inst.rest[0].resource[91].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/valueset-publisher"
)
assert (
inst.rest[0].resource[91].searchParam[11].documentation
== "Name of the publisher of the value set"
)
assert inst.rest[0].resource[91].searchParam[11].name == "publisher"
assert inst.rest[0].resource[91].searchParam[11].type == "string"
assert (
inst.rest[0].resource[91].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/valueset-version"
)
assert (
inst.rest[0].resource[91].searchParam[12].documentation
== "The version identifier of the value set"
)
assert inst.rest[0].resource[91].searchParam[12].name == "version"
assert inst.rest[0].resource[91].searchParam[12].type == "token"
assert inst.rest[0].resource[91].searchRevInclude[0] == "ConceptMap.sourceuri"
assert inst.rest[0].resource[91].searchRevInclude[1] == "ConceptMap.source"
assert inst.rest[0].resource[91].searchRevInclude[2] == "ConceptMap.target"
assert (
inst.rest[0].resource[91].searchRevInclude[3] == "StructureDefinition.valueset"
)
assert inst.rest[0].resource[91].type == "ValueSet"
assert inst.rest[0].resource[92].conditionalCreate == True
assert inst.rest[0].resource[92].conditionalDelete == "multiple"
assert inst.rest[0].resource[92].conditionalUpdate == True
assert inst.rest[0].resource[92].interaction[0].code == "read"
assert (
inst.rest[0].resource[92].interaction[0].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[1].code == "vread"
assert (
inst.rest[0].resource[92].interaction[1].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[2].code == "update"
assert (
inst.rest[0].resource[92].interaction[2].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[3].code == "delete"
assert (
inst.rest[0].resource[92].interaction[3].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[92].interaction[4].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[5].code == "validate"
assert (
inst.rest[0].resource[92].interaction[5].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[6].code == "history-type"
assert (
inst.rest[0].resource[92].interaction[6].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[7].code == "create"
assert (
inst.rest[0].resource[92].interaction[7].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert inst.rest[0].resource[92].interaction[8].code == "search-type"
assert (
inst.rest[0].resource[92].interaction[8].documentation
== "Implemented per the specification (or Insert other doco here)"
)
assert (
inst.rest[0].resource[92].profile.reference
== "http://hl7.org/fhir/StructureDefinition/VisionPrescription"
)
assert inst.rest[0].resource[92].searchInclude[0] == "VisionPrescription.patient"
assert inst.rest[0].resource[92].searchInclude[1] == "VisionPrescription.prescriber"
assert inst.rest[0].resource[92].searchInclude[2] == "VisionPrescription.encounter"
assert (
inst.rest[0].resource[92].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/visionprescription-datewritten"
)
assert (
inst.rest[0].resource[92].searchParam[0].documentation
== "Return prescriptions written on this date"
)
assert inst.rest[0].resource[92].searchParam[0].name == "datewritten"
assert inst.rest[0].resource[92].searchParam[0].type == "date"
assert (
inst.rest[0].resource[92].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/visionprescription-patient"
)
assert (
inst.rest[0].resource[92].searchParam[1].documentation
== "The identity of a patient to list dispenses for"
)
assert inst.rest[0].resource[92].searchParam[1].name == "patient"
assert inst.rest[0].resource[92].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[92].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/visionprescription-prescriber"
)
assert (
inst.rest[0].resource[92].searchParam[2].documentation
== "Who authorizes the vision product"
)
assert inst.rest[0].resource[92].searchParam[2].name == "prescriber"
assert inst.rest[0].resource[92].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[92].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/visionprescription-encounter"
)
assert (
inst.rest[0].resource[92].searchParam[3].documentation
== "Return prescriptions with this encounter identifier"
)
assert inst.rest[0].resource[92].searchParam[3].name == "encounter"
assert inst.rest[0].resource[92].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[92].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/visionprescription-identifier"
)
assert (
inst.rest[0].resource[92].searchParam[4].documentation
== "Return prescriptions with this external identifier"
)
assert inst.rest[0].resource[92].searchParam[4].name == "identifier"
assert inst.rest[0].resource[92].searchParam[4].type == "token"
assert inst.rest[0].resource[92].searchRevInclude[0] == "CarePlan.activityreference"
assert inst.rest[0].resource[92].searchRevInclude[1] == "ClinicalImpression.plan"
assert inst.rest[0].resource[92].type == "VisionPrescription"
assert (
inst.rest[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/resource-security"
)
assert (
inst.rest[0].searchParam[0].documentation
== "Security Labels applied to this resource"
)
assert inst.rest[0].searchParam[0].name == "_security"
assert inst.rest[0].searchParam[0].type == "token"
assert (
inst.rest[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/resource-lastUpdated"
)
assert (
inst.rest[0].searchParam[1].documentation
== "When the resource version last changed"
)
assert inst.rest[0].searchParam[1].name == "_lastUpdated"
assert inst.rest[0].searchParam[1].type == "date"
assert (
inst.rest[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/resource-text"
)
assert (
inst.rest[0].searchParam[2].documentation
== "Search on the narrative of the resource"
)
assert inst.rest[0].searchParam[2].name == "_text"
assert inst.rest[0].searchParam[2].type == "string"
assert (
inst.rest[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/resource-id"
)
assert inst.rest[0].searchParam[3].documentation == "Logical id of this artifact"
assert inst.rest[0].searchParam[3].name == "_id"
assert inst.rest[0].searchParam[3].type == "token"
assert (
inst.rest[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/resource-content"
)
assert (
inst.rest[0].searchParam[4].documentation
== "Search on the entire content of the resource"
)
assert inst.rest[0].searchParam[4].name == "_content"
assert inst.rest[0].searchParam[4].type == "string"
assert (
inst.rest[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/resource-profile"
)
assert (
inst.rest[0].searchParam[5].documentation
== "Profiles this resource claims to conform to"
)
assert inst.rest[0].searchParam[5].name == "_profile"
assert inst.rest[0].searchParam[5].type == "uri"
assert (
inst.rest[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/resource-query"
)
assert (
inst.rest[0].searchParam[6].documentation
== "A custom search profile that describes a specific defined query operation"
)
assert inst.rest[0].searchParam[6].name == "_query"
assert inst.rest[0].searchParam[6].type == "token"
assert (
inst.rest[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/resource-tag"
)
assert inst.rest[0].searchParam[7].documentation == "Tags applied to this resource"
assert inst.rest[0].searchParam[7].name == "_tag"
assert inst.rest[0].searchParam[7].type == "token"
assert inst.rest[0].security.cors == True
assert (
inst.rest[0].security.description
== "This is the conformance statement to declare that the server supports SMART-on-FHIR. See the SMART-on-FHIR docs for the extension that would go with such a server"
)
assert inst.rest[0].security.service[0].coding[0].code == "SMART-on-FHIR"
assert inst.rest[0].security.service[0].coding[0].display == "SMART-on-FHIR"
assert (
inst.rest[0].security.service[0].coding[0].system
== "http://hl7.org/fhir/restful-security-service"
)
assert inst.rest[0].security.service[0].text == "See http://docs.smarthealthit.org/"
assert inst.rest[0].transactionMode == "both"
assert inst.software.name == "Insert your softwware name here..."
assert inst.status == "draft"
assert inst.text.status == "generated"
assert inst.url == "http://hl7.org/fhir/Conformance/base"
assert inst.version == "1.0.2-7202"
def test_Conformance_2(base_settings):
filename = base_settings["unittest_data_dir"] / "conformance-base2.canonical.json"
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_2(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_2(inst2)
def impl_Conformance_2(inst):
assert inst.acceptUnknown == "no"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://hl7.org/fhir"
assert inst.date == parse_datetime("2015-10-24T07:41:03+11:00")
assert (
inst.description
== "This is the base conformance statement for FHIR. It represents a server that provides the none of the functionality defined by FHIR. It is provided to use as a template for system designers to build their own conformance statements from. A conformance profile has to contain something, so this contains a read of a Conformance Statement"
)
assert inst.experimental == True
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "base2"
assert inst.kind == "capability"
assert inst.name == "Base FHIR Conformance Statement (Empty)"
assert inst.publisher == "FHIR Project Team"
assert inst.rest[0].documentation == "An empty conformance statement"
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "read"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Read Conformance Resource"
)
assert inst.rest[0].resource[0].type == "Conformance"
assert inst.rest[0].security.cors == True
assert (
inst.rest[0].security.description
== "This is the conformance statement to declare that the server supports SMART-on-FHIR. See the SMART-on-FHIR docs for the extension that would go with such a server"
)
assert inst.rest[0].security.service[0].coding[0].code == "SMART-on-FHIR"
assert inst.rest[0].security.service[0].coding[0].display == "SMART-on-FHIR"
assert (
inst.rest[0].security.service[0].coding[0].system
== "http://hl7.org/fhir/restful-security-service"
)
assert inst.rest[0].security.service[0].text == "See http://docs.smarthealthit.org/"
assert inst.software.name == "Insert your softwware name here..."
assert inst.status == "draft"
assert inst.text.status == "generated"
assert inst.url == "http://hl7.org/fhir/Conformance/base2"
assert inst.version == "1.0.2-7202"
def test_Conformance_3(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-daf-query-requestor.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_3(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_3(inst2)
def impl_Conformance_3(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.healthit.gov/"
assert inst.date == parse_date("2015-04-02")
assert (
inst.description
== "This profile defines the expected capabilities of the DAF Responder actor when conforming to the DAF FHIR implementation guide."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-daf-query-requestor"
assert inst.kind == "requirements"
assert inst.name == "DAF Requestor"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The DAF Requestor SHOULD support querying of one or more FHIR resources using appropriate DAF profile(s), RESTful operations defined for the profile, Search parameters identified for the profile."
)
assert inst.rest[0].mode == "client"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows discovery of existing DAFPatient resources using different search criteria"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific DAFPatients by id"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows review of changes to DAFPatient instance over time"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[3].code == "vread"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFPatient instance"
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-patient"
)
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/Patient-name"
)
assert (
inst.rest[0].resource[0].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[0].name == "name"
assert inst.rest[0].resource[0].searchParam[0].type == "string"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/Patient-family"
)
assert (
inst.rest[0].resource[0].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[1].name == "family"
assert inst.rest[0].resource[0].searchParam[1].type == "string"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/Patient-given"
)
assert (
inst.rest[0].resource[0].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[2].name == "given"
assert inst.rest[0].resource[0].searchParam[2].type == "string"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/Patient-identifier"
)
assert (
inst.rest[0].resource[0].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[3].name == "identifier"
assert inst.rest[0].resource[0].searchParam[3].type == "token"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/Patient-language"
)
assert (
inst.rest[0].resource[0].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[4].name == "language"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/Patient-telecom"
)
assert (
inst.rest[0].resource[0].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[5].name == "telecom"
assert inst.rest[0].resource[0].searchParam[5].type == "string"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/Patient-gender"
)
assert (
inst.rest[0].resource[0].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[6].name == "gender"
assert inst.rest[0].resource[0].searchParam[6].type == "token"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/Patient-birthdate"
)
assert (
inst.rest[0].resource[0].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[7].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[7].name == "birthdate"
assert inst.rest[0].resource[0].searchParam[7].type == "date"
assert (
inst.rest[0].resource[0].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-city"
)
assert (
inst.rest[0].resource[0].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[8].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[8].name == "city"
assert inst.rest[0].resource[0].searchParam[8].type == "string"
assert (
inst.rest[0].resource[0].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-postalCode"
)
assert (
inst.rest[0].resource[0].searchParam[9].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[9].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[9].name == "postalCode"
assert inst.rest[0].resource[0].searchParam[9].type == "string"
assert (
inst.rest[0].resource[0].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-state"
)
assert (
inst.rest[0].resource[0].searchParam[10].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[10].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[10].name == "state"
assert inst.rest[0].resource[0].searchParam[10].type == "string"
assert (
inst.rest[0].resource[0].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-mothersMaidenName"
)
assert (
inst.rest[0].resource[0].searchParam[11].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[11].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[11].name == "mothersMaidenName"
assert inst.rest[0].resource[0].searchParam[11].type == "string"
assert (
inst.rest[0].resource[0].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-age"
)
assert (
inst.rest[0].resource[0].searchParam[12].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[12].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[12].name == "age"
assert inst.rest[0].resource[0].searchParam[12].type == "number"
assert (
inst.rest[0].resource[0].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/us-core-Patient-race"
)
assert (
inst.rest[0].resource[0].searchParam[13].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[13].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[13].name == "race"
assert inst.rest[0].resource[0].searchParam[13].type == "token"
assert (
inst.rest[0].resource[0].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/us-core-Patient-ethnicity"
)
assert (
inst.rest[0].resource[0].searchParam[14].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[14].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[14].name == "ethnicity"
assert inst.rest[0].resource[0].searchParam[14].type == "token"
assert inst.rest[0].resource[0].type == "Patient"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing DAFAllergyIntolerance resources using different search criteria"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific DAFAllergyIntolerance by id"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows review of changes to DAFAllergyIntolerance instance over time"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[3].code == "vread"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFAllergyIntolerance instance"
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-allergyintolerance"
)
assert inst.rest[0].resource[1].searchInclude[0] == "AllergyIntolerance.patient"
assert (
inst.rest[0].resource[1].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[0].name == "identifier"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert inst.rest[0].resource[1].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[1].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[1].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[1].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[1].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[1].name == "patient"
assert inst.rest[0].resource[1].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[1].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[2].name == "category"
assert inst.rest[0].resource[1].searchParam[2].type == "token"
assert (
inst.rest[0].resource[1].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[3].name == "status"
assert inst.rest[0].resource[1].searchParam[3].type == "token"
assert (
inst.rest[0].resource[1].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[4].name == "substance"
assert inst.rest[0].resource[1].searchParam[4].type == "token"
assert (
inst.rest[0].resource[1].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[5].name == "manifestation"
assert inst.rest[0].resource[1].searchParam[5].type == "token"
assert (
inst.rest[0].resource[1].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[6].name == "severity"
assert inst.rest[0].resource[1].searchParam[6].type == "token"
assert (
inst.rest[0].resource[1].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[7].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[7].name == "duration"
assert inst.rest[0].resource[1].searchParam[7].type == "quantity"
assert (
inst.rest[0].resource[1].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[8].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].searchParam[8].name == "onset"
assert inst.rest[0].resource[1].searchParam[8].type == "date"
assert inst.rest[0].resource[1].type == "AllergyIntolerance"
assert inst.rest[0].resource[2].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Allows discovery of existing DAFDiagnosticOrder resources using different search criteria"
)
assert (
inst.rest[0].resource[2].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[1].code == "read"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Allows retrieval of a specific DAFDiagnosticOrder by id"
)
assert (
inst.rest[0].resource[2].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Allows review of changes to DAFDiagnosticOrder instance over time"
)
assert (
inst.rest[0].resource[2].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[3].code == "vread"
assert (
inst.rest[0].resource[2].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFDiagnosticOrder instance"
)
assert (
inst.rest[0].resource[2].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[2].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticorder"
)
assert inst.rest[0].resource[2].searchInclude[0] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[2].searchInclude[1] == "DiagnosticOrder.orderer"
assert inst.rest[0].resource[2].searchInclude[2] == "DiagnosticOrder.encounter"
assert (
inst.rest[0].resource[2].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[0].name == "identifier"
assert inst.rest[0].resource[2].searchParam[0].type == "token"
assert inst.rest[0].resource[2].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[2].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[2].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[2].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[2].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[1].name == "patient"
assert inst.rest[0].resource[2].searchParam[1].type == "reference"
assert inst.rest[0].resource[2].searchParam[2].chain[0] == "orderer.identifier"
assert inst.rest[0].resource[2].searchParam[2].chain[1] == "orderer.given"
assert inst.rest[0].resource[2].searchParam[2].chain[2] == "orderer.family"
assert (
inst.rest[0].resource[2].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[2].name == "orderer"
assert inst.rest[0].resource[2].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[3].name == "code"
assert inst.rest[0].resource[2].searchParam[3].type == "token"
assert inst.rest[0].resource[2].searchParam[4].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[2].searchParam[4].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[2].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[4].name == "encounter"
assert inst.rest[0].resource[2].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].searchParam[5].name == "item-date"
assert inst.rest[0].resource[2].searchParam[5].type == "date"
assert inst.rest[0].resource[2].type == "DiagnosticOrder"
assert inst.rest[0].resource[3].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[3].interaction[0].documentation
== "Allows discovery of existing DAFDiagnosticReport resources using different search criteria"
)
assert (
inst.rest[0].resource[3].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].interaction[1].code == "read"
assert (
inst.rest[0].resource[3].interaction[1].documentation
== "Allows retrieval of a specific DAFDiagnosticReport by id"
)
assert (
inst.rest[0].resource[3].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[3].interaction[2].documentation
== "Allows review of changes to DAFDiagnosticReport instance over time"
)
assert (
inst.rest[0].resource[3].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].interaction[3].code == "vread"
assert (
inst.rest[0].resource[3].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFDiagnosticReport instance"
)
assert (
inst.rest[0].resource[3].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[3].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticreport"
)
assert inst.rest[0].resource[3].searchInclude[0] == "DiagnosticReport.subject"
assert inst.rest[0].resource[3].searchInclude[1] == "DiagnosticReport.performer"
assert inst.rest[0].resource[3].searchInclude[2] == "DiagnosticReport.encounter"
assert inst.rest[0].resource[3].searchInclude[3] == "DiagnosticReport.result"
assert (
inst.rest[0].resource[3].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[0].name == "identifier"
assert inst.rest[0].resource[3].searchParam[0].type == "token"
assert inst.rest[0].resource[3].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[3].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[3].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[3].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[3].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[1].name == "patient"
assert inst.rest[0].resource[3].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[2].name == "name"
assert inst.rest[0].resource[3].searchParam[2].type == "token"
assert (
inst.rest[0].resource[3].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[3].name == "date"
assert inst.rest[0].resource[3].searchParam[3].type == "date"
assert inst.rest[0].resource[3].searchParam[4].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[3].searchParam[4].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[3].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[4].name == "encounter"
assert inst.rest[0].resource[3].searchParam[4].type == "reference"
assert inst.rest[0].resource[3].searchParam[5].chain[0] == "performer.identifier"
assert inst.rest[0].resource[3].searchParam[5].chain[1] == "performer.name"
assert (
inst.rest[0].resource[3].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[5].name == "performer"
assert inst.rest[0].resource[3].searchParam[5].type == "reference"
assert inst.rest[0].resource[3].searchParam[6].chain[0] == "result.code"
assert (
inst.rest[0].resource[3].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].searchParam[6].name == "result"
assert inst.rest[0].resource[3].searchParam[6].type == "reference"
assert inst.rest[0].resource[3].type == "DiagnosticReport"
assert inst.rest[0].resource[4].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[4].interaction[0].documentation
== "Allows discovery of existing DAFEncounter resources using different search criteria"
)
assert (
inst.rest[0].resource[4].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].interaction[1].code == "read"
assert (
inst.rest[0].resource[4].interaction[1].documentation
== "Allows retrieval of a specific DAFEncounter by id"
)
assert (
inst.rest[0].resource[4].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[4].interaction[2].documentation
== "Allows review of changes to DAFEncounter instance over time"
)
assert (
inst.rest[0].resource[4].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].interaction[3].code == "vread"
assert (
inst.rest[0].resource[4].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFEncounter instance"
)
assert (
inst.rest[0].resource[4].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[4].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-encounter"
)
assert inst.rest[0].resource[4].searchInclude[0] == "Encounter.patient"
assert inst.rest[0].resource[4].searchInclude[1] == "Encounter.location"
assert (
inst.rest[0].resource[4].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[0].name == "identifier"
assert inst.rest[0].resource[4].searchParam[0].type == "token"
assert inst.rest[0].resource[4].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[4].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[4].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[4].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[4].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[1].name == "patient"
assert inst.rest[0].resource[4].searchParam[1].type == "reference"
assert inst.rest[0].resource[4].searchParam[2].chain[0] == "location.identifier"
assert inst.rest[0].resource[4].searchParam[2].chain[1] == "location.name"
assert inst.rest[0].resource[4].searchParam[2].chain[2] == "location.address"
assert (
inst.rest[0].resource[4].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[2].name == "location"
assert inst.rest[0].resource[4].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[4].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[3].name == "type"
assert inst.rest[0].resource[4].searchParam[3].type == "token"
assert (
inst.rest[0].resource[4].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[4].name == "date"
assert inst.rest[0].resource[4].searchParam[4].type == "date"
assert (
inst.rest[0].resource[4].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].searchParam[5].name == "location-period"
assert inst.rest[0].resource[4].searchParam[5].type == "date"
assert inst.rest[0].resource[4].type == "Encounter"
assert inst.rest[0].resource[5].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[5].interaction[0].documentation
== "Allows discovery of existing DAFFamilyHistory resources using different search criteria"
)
assert (
inst.rest[0].resource[5].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].interaction[1].code == "read"
assert (
inst.rest[0].resource[5].interaction[1].documentation
== "Allows retrieval of a specific DAFFamilyHistory by id"
)
assert (
inst.rest[0].resource[5].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[5].interaction[2].documentation
== "Allows review of changes to DAFFamilyHistory instance over time"
)
assert (
inst.rest[0].resource[5].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].interaction[3].code == "vread"
assert (
inst.rest[0].resource[5].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFFamilyHistory instance"
)
assert (
inst.rest[0].resource[5].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[5].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-familymemberhistory"
)
assert inst.rest[0].resource[5].searchInclude[0] == "FamilyMemberHistory.patient"
assert (
inst.rest[0].resource[5].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].searchParam[0].name == "identifier"
assert inst.rest[0].resource[5].searchParam[0].type == "token"
assert inst.rest[0].resource[5].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[5].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[5].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[5].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[5].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].searchParam[1].name == "patient"
assert inst.rest[0].resource[5].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[5].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].searchParam[2].name == "relationship"
assert inst.rest[0].resource[5].searchParam[2].type == "token"
assert (
inst.rest[0].resource[5].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[5].searchParam[3].name == "familymemberhistorycondition"
)
assert inst.rest[0].resource[5].searchParam[3].type == "token"
assert inst.rest[0].resource[5].type == "FamilyMemberHistory"
assert inst.rest[0].resource[6].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[6].interaction[0].documentation
== "Allows discovery of existing DAFImmunization resources using different search criteria"
)
assert (
inst.rest[0].resource[6].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].interaction[1].code == "read"
assert (
inst.rest[0].resource[6].interaction[1].documentation
== "Allows retrieval of a specific DAFImmunization by id"
)
assert (
inst.rest[0].resource[6].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[6].interaction[2].documentation
== "Allows review of changes to DAFImmunization instance over time"
)
assert (
inst.rest[0].resource[6].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].interaction[3].code == "vread"
assert (
inst.rest[0].resource[6].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFImmunization instance"
)
assert (
inst.rest[0].resource[6].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[6].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-immunization"
)
assert inst.rest[0].resource[6].searchInclude[0] == "Immunization.patient"
assert inst.rest[0].resource[6].searchInclude[1] == "Immunization.performer"
assert inst.rest[0].resource[6].searchInclude[2] == "Immunization.requester"
assert inst.rest[0].resource[6].searchInclude[3] == "Immunization.manufacturer"
assert inst.rest[0].resource[6].searchInclude[4] == "Immunization.reaction.detail"
assert (
inst.rest[0].resource[6].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[0].name == "identifier"
assert inst.rest[0].resource[6].searchParam[0].type == "token"
assert inst.rest[0].resource[6].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[6].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[6].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[6].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[6].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[1].name == "patient"
assert inst.rest[0].resource[6].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[6].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[2].name == "date"
assert inst.rest[0].resource[6].searchParam[2].type == "date"
assert (
inst.rest[0].resource[6].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[3].name == "vaccine-type"
assert inst.rest[0].resource[6].searchParam[3].type == "token"
assert (
inst.rest[0].resource[6].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[4].name == "notgiven"
assert inst.rest[0].resource[6].searchParam[4].type == "token"
assert (
inst.rest[0].resource[6].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[5].name == "lot-number"
assert inst.rest[0].resource[6].searchParam[5].type == "string"
assert inst.rest[0].resource[6].searchParam[6].chain[0] == "requester.identifier"
assert inst.rest[0].resource[6].searchParam[6].chain[1] == "requester.name"
assert (
inst.rest[0].resource[6].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].searchParam[6].name == "requester"
assert inst.rest[0].resource[6].searchParam[6].type == "reference"
assert inst.rest[0].resource[6].type == "Immunization"
assert inst.rest[0].resource[7].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[7].interaction[0].documentation
== "Allows discovery of existing DAFResults resources using different search criteria"
)
assert (
inst.rest[0].resource[7].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].interaction[1].code == "read"
assert (
inst.rest[0].resource[7].interaction[1].documentation
== "Allows retrieval of a specific DAFResults by id"
)
assert (
inst.rest[0].resource[7].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[7].interaction[2].documentation
== "Allows review of changes to DAFResults instance over time"
)
assert (
inst.rest[0].resource[7].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].interaction[3].code == "vread"
assert (
inst.rest[0].resource[7].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFResults instance"
)
assert (
inst.rest[0].resource[7].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[7].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-resultobscode"
)
assert inst.rest[0].resource[7].searchInclude[0] == "Observation.encounter"
assert inst.rest[0].resource[7].searchInclude[1] == "Observation.subject"
assert (
inst.rest[0].resource[7].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[0].name == "identifier"
assert inst.rest[0].resource[7].searchParam[0].type == "token"
assert inst.rest[0].resource[7].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[7].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[7].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[7].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[7].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[1].name == "patient"
assert inst.rest[0].resource[7].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[7].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[2].name == "code"
assert inst.rest[0].resource[7].searchParam[2].type == "token"
assert (
inst.rest[0].resource[7].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[3].name == "value-concept"
assert inst.rest[0].resource[7].searchParam[3].type == "token"
assert (
inst.rest[0].resource[7].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[4].name == "code-value[x]"
assert inst.rest[0].resource[7].searchParam[4].type == "composite"
assert (
inst.rest[0].resource[7].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[5].name == "date"
assert inst.rest[0].resource[7].searchParam[5].type == "date"
assert inst.rest[0].resource[7].searchParam[6].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[7].searchParam[6].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[7].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].searchParam[6].name == "encounter"
assert inst.rest[0].resource[7].searchParam[6].type == "reference"
assert inst.rest[0].resource[7].type == "Observation"
assert inst.rest[0].resource[8].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[8].interaction[0].documentation
== "Allows discovery of existing DAFMedication resources using different search criteria"
)
assert (
inst.rest[0].resource[8].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].interaction[1].code == "read"
assert (
inst.rest[0].resource[8].interaction[1].documentation
== "Allows retrieval of a specific DAFMedication by id"
)
assert (
inst.rest[0].resource[8].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[8].interaction[2].documentation
== "Allows review of changes to DAFMedication instance over time"
)
assert (
inst.rest[0].resource[8].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].interaction[3].code == "vread"
assert (
inst.rest[0].resource[8].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFMedication instance"
)
assert (
inst.rest[0].resource[8].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[8].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medication"
)
assert inst.rest[0].resource[8].searchInclude[0] == "Medication.manufacturer"
assert (
inst.rest[0].resource[8].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].searchParam[0].name == "identifier"
assert inst.rest[0].resource[8].searchParam[0].type == "token"
assert (
inst.rest[0].resource[8].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].searchParam[1].name == "code"
assert inst.rest[0].resource[8].searchParam[1].type == "token"
assert (
inst.rest[0].resource[8].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].searchParam[2].name == "name"
assert inst.rest[0].resource[8].searchParam[2].type == "string"
assert (
inst.rest[0].resource[8].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].searchParam[3].name == "form"
assert inst.rest[0].resource[8].searchParam[3].type == "token"
assert (
inst.rest[0].resource[8].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].searchParam[4].name == "ingredient"
assert inst.rest[0].resource[8].searchParam[4].type == "reference"
assert inst.rest[0].resource[8].type == "Medication"
assert inst.rest[0].resource[9].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[9].interaction[0].documentation
== "Allows discovery of existing DAFMedicationStatement resources using different search criteria"
)
assert (
inst.rest[0].resource[9].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].interaction[1].code == "read"
assert (
inst.rest[0].resource[9].interaction[1].documentation
== "Allows retrieval of a specific DAFMedicationStatement by id"
)
assert (
inst.rest[0].resource[9].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[9].interaction[2].documentation
== "Allows review of changes to DAFMedicationStatement instance over time"
)
assert (
inst.rest[0].resource[9].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].interaction[3].code == "vread"
assert (
inst.rest[0].resource[9].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFMedicationStatement instance"
)
assert (
inst.rest[0].resource[9].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[9].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationstatement"
)
assert inst.rest[0].resource[9].searchInclude[0] == "MedicationStatement.patient"
assert inst.rest[0].resource[9].searchInclude[1] == "MedicationStatement.medication"
assert (
inst.rest[0].resource[9].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].searchParam[0].name == "identifier"
assert inst.rest[0].resource[9].searchParam[0].type == "token"
assert inst.rest[0].resource[9].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[9].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[9].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[9].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[9].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].searchParam[1].name == "patient"
assert inst.rest[0].resource[9].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].searchParam[2].name == "effectivedate"
assert inst.rest[0].resource[9].searchParam[2].type == "date"
assert inst.rest[0].resource[9].searchParam[3].chain[0] == "medication.code"
assert inst.rest[0].resource[9].searchParam[3].chain[1] == "medication.name"
assert (
inst.rest[0].resource[9].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].searchParam[3].name == "medication"
assert inst.rest[0].resource[9].searchParam[3].type == "reference"
assert inst.rest[0].resource[9].type == "MedicationStatement"
assert inst.rest[0].resource[10].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[10].interaction[0].documentation
== "Allows discovery of existing DAFMedicationAdministration resources using different search criteria"
)
assert (
inst.rest[0].resource[10].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].interaction[1].code == "read"
assert (
inst.rest[0].resource[10].interaction[1].documentation
== "Allows retrieval of a specific DAFMedicationAdministration by id"
)
assert (
inst.rest[0].resource[10].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[10].interaction[2].documentation
== "Allows review of changes to DAFMedicationAdministration instance over time"
)
assert (
inst.rest[0].resource[10].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].interaction[3].code == "vread"
assert (
inst.rest[0].resource[10].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFMedicationAdministration instance"
)
assert (
inst.rest[0].resource[10].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[10].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationadministration"
)
assert (
inst.rest[0].resource[10].searchInclude[0] == "MedicationAdministration.patient"
)
assert (
inst.rest[0].resource[10].searchInclude[1]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[10].searchInclude[2]
== "MedicationAdministration.encounter"
)
assert (
inst.rest[0].resource[10].searchInclude[3]
== "MedicationAdministration.prescription"
)
assert (
inst.rest[0].resource[10].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[0].name == "identifier"
assert inst.rest[0].resource[10].searchParam[0].type == "token"
assert inst.rest[0].resource[10].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[10].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[10].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[10].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[10].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[1].name == "patient"
assert inst.rest[0].resource[10].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[2].name == "effectivetime"
assert inst.rest[0].resource[10].searchParam[2].type == "date"
assert inst.rest[0].resource[10].searchParam[3].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[10].searchParam[3].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[10].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[3].name == "encounter"
assert inst.rest[0].resource[10].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[4].chain[0] == "practitioner.identifier"
)
assert inst.rest[0].resource[10].searchParam[4].chain[1] == "practitioner.name"
assert (
inst.rest[0].resource[10].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[4].name == "practitioner"
assert inst.rest[0].resource[10].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[5].chain[0] == "prescription.identifier"
)
assert (
inst.rest[0].resource[10].searchParam[5].chain[1] == "prescription.datewritten"
)
assert (
inst.rest[0].resource[10].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].searchParam[5].name == "prescription"
assert inst.rest[0].resource[10].searchParam[5].type == "reference"
assert inst.rest[0].resource[10].type == "MedicationAdministration"
assert inst.rest[0].resource[11].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[11].interaction[0].documentation
== "Allows discovery of existing DAFCondition resources using different search criteria"
)
assert (
inst.rest[0].resource[11].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].interaction[1].code == "read"
assert (
inst.rest[0].resource[11].interaction[1].documentation
== "Allows retrieval of a specific DAFCondition by id"
)
assert (
inst.rest[0].resource[11].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[11].interaction[2].documentation
== "Allows review of changes to DAFCondition instance over time"
)
assert (
inst.rest[0].resource[11].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].interaction[3].code == "vread"
assert (
inst.rest[0].resource[11].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFCondition instance"
)
assert (
inst.rest[0].resource[11].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[11].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-condition"
)
assert inst.rest[0].resource[11].searchInclude[0] == "Condition.patient"
assert inst.rest[0].resource[11].searchInclude[1] == "Condition.encounter"
assert inst.rest[0].resource[11].searchInclude[2] == "Condition.asserter"
assert (
inst.rest[0].resource[11].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[0].name == "identifier"
assert inst.rest[0].resource[11].searchParam[0].type == "token"
assert inst.rest[0].resource[11].searchParam[1].chain[0] == "patient.identifier"
assert inst.rest[0].resource[11].searchParam[1].chain[1] == "patient.name"
assert inst.rest[0].resource[11].searchParam[1].chain[2] == "patient.given"
assert inst.rest[0].resource[11].searchParam[1].chain[3] == "patient.family"
assert (
inst.rest[0].resource[11].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[1].name == "patient"
assert inst.rest[0].resource[11].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[11].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[2].name == "code"
assert inst.rest[0].resource[11].searchParam[2].type == "token"
assert (
inst.rest[0].resource[11].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[3].name == "date-asserted"
assert inst.rest[0].resource[11].searchParam[3].type == "date"
assert inst.rest[0].resource[11].searchParam[4].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[11].searchParam[4].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[11].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[4].name == "encounter"
assert inst.rest[0].resource[11].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[11].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[5].name == "onset"
assert inst.rest[0].resource[11].searchParam[5].type == "date"
assert (
inst.rest[0].resource[11].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].searchParam[6].name == "severity"
assert inst.rest[0].resource[11].searchParam[6].type == "token"
assert inst.rest[0].resource[11].type == "Condition"
assert inst.rest[0].resource[12].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[12].interaction[0].documentation
== "Allows discovery of existing DAFProcedure resources using different search criteria"
)
assert (
inst.rest[0].resource[12].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].interaction[1].code == "read"
assert (
inst.rest[0].resource[12].interaction[1].documentation
== "Allows retrieval of a specific DAFProcedure by id"
)
assert (
inst.rest[0].resource[12].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[12].interaction[2].documentation
== "Allows review of changes to DAFProcedure instance over time"
)
assert (
inst.rest[0].resource[12].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].interaction[3].code == "vread"
assert (
inst.rest[0].resource[12].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFProcedure instance"
)
assert (
inst.rest[0].resource[12].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[12].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-procedure"
)
assert inst.rest[0].resource[12].searchInclude[0] == "Procedure.patient"
assert inst.rest[0].resource[12].searchInclude[1] == "Procedure.encounter"
assert inst.rest[0].resource[12].searchInclude[2] == "Procedure.performer"
assert (
inst.rest[0].resource[12].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].searchParam[0].name == "identifier"
assert inst.rest[0].resource[12].searchParam[0].type == "token"
assert (
inst.rest[0].resource[12].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].searchParam[1].name == "type"
assert inst.rest[0].resource[12].searchParam[1].type == "token"
assert (
inst.rest[0].resource[12].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].searchParam[2].name == "date"
assert inst.rest[0].resource[12].searchParam[2].type == "date"
assert inst.rest[0].resource[12].searchParam[3].chain[0] == "patient.identifier"
assert inst.rest[0].resource[12].searchParam[3].chain[1] == "patient.name"
assert inst.rest[0].resource[12].searchParam[3].chain[2] == "patient.given"
assert inst.rest[0].resource[12].searchParam[3].chain[3] == "patient.family"
assert (
inst.rest[0].resource[12].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].searchParam[3].name == "patient"
assert inst.rest[0].resource[12].searchParam[3].type == "reference"
assert inst.rest[0].resource[12].searchParam[4].chain[0] == "encounter.identifier"
assert inst.rest[0].resource[12].searchParam[4].chain[1] == "encounter.type"
assert (
inst.rest[0].resource[12].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].searchParam[4].name == "encounter"
assert inst.rest[0].resource[12].searchParam[4].type == "reference"
assert inst.rest[0].resource[12].type == "Procedure"
assert inst.rest[0].resource[13].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[13].interaction[0].documentation
== "Allows discovery of existing DAFList resources using different search criteria"
)
assert (
inst.rest[0].resource[13].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].interaction[1].code == "read"
assert (
inst.rest[0].resource[13].interaction[1].documentation
== "Allows retrieval of a specific DAFList by id"
)
assert (
inst.rest[0].resource[13].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[13].interaction[2].documentation
== "Allows review of changes to DAFList instance over time"
)
assert (
inst.rest[0].resource[13].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].interaction[3].code == "vread"
assert (
inst.rest[0].resource[13].interaction[3].documentation
== "Allows retrieval of a historical version of a DAFList instance"
)
assert (
inst.rest[0].resource[13].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[13].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-problemlist"
)
assert inst.rest[0].resource[13].searchInclude[0] == "List.subject"
assert inst.rest[0].resource[13].searchInclude[1] == "List.item"
assert inst.rest[0].resource[13].searchParam[0].chain[0] == "patient.identifier"
assert inst.rest[0].resource[13].searchParam[0].chain[1] == "patient.name"
assert inst.rest[0].resource[13].searchParam[0].chain[2] == "patient.given"
assert inst.rest[0].resource[13].searchParam[0].chain[3] == "patient.family"
assert (
inst.rest[0].resource[13].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].searchParam[0].name == "patient"
assert inst.rest[0].resource[13].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].searchParam[1].name == "code"
assert inst.rest[0].resource[13].searchParam[1].type == "token"
assert (
inst.rest[0].resource[13].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].searchParam[2].name == "empty-reason"
assert inst.rest[0].resource[13].searchParam[2].type == "token"
assert inst.rest[0].resource[13].type == "List"
assert (
inst.rest[0].security.description
== "Implementations SHOULD meet the security requirements documented in the [[daf-security|DAF implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_4(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-daf-query-responder.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_4(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_4(inst2)
def impl_Conformance_4(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.healthit.gov/"
assert inst.date == parse_date("2015-04-02")
assert (
inst.description
== "This profile defines the expected capabilities of the DAF Responder actor when conforming to the DAF FHIR implementation guide."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-daf-query-responder"
assert inst.kind == "requirements"
assert inst.name == "DAF Responder"
assert (
inst.profile[0].reference
== "http://hl7.org/fhir/StructureDefinition/daf-patient"
)
assert (
inst.profile[1].reference
== "http://hl7.org/fhir/StructureDefinition/daf-allergyintolerance"
)
assert (
inst.profile[2].reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticorder"
)
assert (
inst.profile[3].reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticreport"
)
assert (
inst.profile[4].reference
== "http://hl7.org/fhir/StructureDefinition/daf-encounter"
)
assert (
inst.profile[5].reference
== "http://hl7.org/fhir/StructureDefinition/daf-familymemberhistory"
)
assert (
inst.profile[6].reference
== "http://hl7.org/fhir/StructureDefinition/daf-immunization"
)
assert (
inst.profile[7].reference
== "http://hl7.org/fhir/StructureDefinition/daf-resultobscode"
)
assert (
inst.profile[8].reference
== "http://hl7.org/fhir/StructureDefinition/daf-medication"
)
assert (
inst.profile[9].reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationstatement"
)
assert (
inst.profile[10].reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationadministration"
)
assert (
inst.profile[11].reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationorder"
)
assert (
inst.profile[12].reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationdispense"
)
assert (
inst.profile[13].reference
== "http://hl7.org/fhir/StructureDefinition/daf-condition"
)
assert (
inst.profile[14].reference
== "http://hl7.org/fhir/StructureDefinition/daf-procedure"
)
assert (
inst.profile[15].reference
== "http://hl7.org/fhir/StructureDefinition/observation-daf-smokingstatus-dafsmokingstatus"
)
assert (
inst.profile[16].reference
== "http://hl7.org/fhir/StructureDefinition/daf-vitalsigns"
)
assert (
inst.profile[17].reference
== "http://hl7.org/fhir/StructureDefinition/daf-problemlist"
)
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The DAF Responder SHALL support the DAFPatient resource profile. In addition to the DAF-Patient, the DAF Responder SHALL support at least one additional resource profile from the list of DAF profiles. The DAF Responder SHALL implement REST behavior according to the FHIR specification. The DAF Responder SHALL support both json and xml resource formats for all DAF interactions."
)
assert inst.rest[0].mode == "server"
assert (
inst.rest[0].operation[0].definition.reference
== "http://hl7.org/fhir/OperationDefinition/encounter-everything"
)
assert inst.rest[0].operation[0].name == "encounter-everything"
assert (
inst.rest[0].operation[1].definition.reference
== "http://hl7.org/fhir/OperationDefinition/patient-everything"
)
assert inst.rest[0].operation[1].name == "patient-everything"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows discovery of existing DAF-Patient resources using different search criteria"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific DAF-Patients by id"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows review of changes to DAF-Patient instance over time"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[3].code == "vread"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Patient instance"
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-patient"
)
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/Patient-name"
)
assert (
inst.rest[0].resource[0].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[0].name == "name"
assert inst.rest[0].resource[0].searchParam[0].type == "string"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/Patient-family"
)
assert (
inst.rest[0].resource[0].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[1].name == "family"
assert inst.rest[0].resource[0].searchParam[1].type == "string"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/Patient-given"
)
assert (
inst.rest[0].resource[0].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[2].name == "given"
assert inst.rest[0].resource[0].searchParam[2].type == "string"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/Patient-identifier"
)
assert (
inst.rest[0].resource[0].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[3].name == "identifier"
assert inst.rest[0].resource[0].searchParam[3].type == "token"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/Patient-language"
)
assert (
inst.rest[0].resource[0].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[4].name == "language"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/Patient-telecom"
)
assert (
inst.rest[0].resource[0].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[5].name == "telecom"
assert inst.rest[0].resource[0].searchParam[5].type == "string"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/Patient-gender"
)
assert (
inst.rest[0].resource[0].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[6].name == "gender"
assert inst.rest[0].resource[0].searchParam[6].type == "token"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/Patient-birthdate"
)
assert (
inst.rest[0].resource[0].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[7].name == "birthdate"
assert inst.rest[0].resource[0].searchParam[7].type == "date"
assert (
inst.rest[0].resource[0].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-city"
)
assert (
inst.rest[0].resource[0].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[8].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[8].name == "address-city"
assert inst.rest[0].resource[0].searchParam[8].type == "string"
assert (
inst.rest[0].resource[0].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-postalCode"
)
assert (
inst.rest[0].resource[0].searchParam[9].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[9].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[9].name == "address-postalCode"
assert inst.rest[0].resource[0].searchParam[9].type == "string"
assert (
inst.rest[0].resource[0].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-state"
)
assert (
inst.rest[0].resource[0].searchParam[10].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[10].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[10].name == "address-state"
assert inst.rest[0].resource[0].searchParam[10].type == "string"
assert (
inst.rest[0].resource[0].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-mothersMaidenName"
)
assert (
inst.rest[0].resource[0].searchParam[11].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[11].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[11].name == "mothersMaidenName"
assert inst.rest[0].resource[0].searchParam[11].type == "string"
assert (
inst.rest[0].resource[0].searchParam[12].definition
== "http://hl7.org/fhir/SearchParameter/patient-extensions-Patient-age"
)
assert (
inst.rest[0].resource[0].searchParam[12].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[12].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[12].name == "age"
assert inst.rest[0].resource[0].searchParam[12].type == "number"
assert (
inst.rest[0].resource[0].searchParam[13].definition
== "http://hl7.org/fhir/SearchParameter/us-core-Patient-race"
)
assert (
inst.rest[0].resource[0].searchParam[13].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[13].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[13].name == "race"
assert inst.rest[0].resource[0].searchParam[13].type == "token"
assert (
inst.rest[0].resource[0].searchParam[14].definition
== "http://hl7.org/fhir/SearchParameter/us-core-Patient-ethnicity"
)
assert (
inst.rest[0].resource[0].searchParam[14].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[14].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[14].name == "ethnicity"
assert inst.rest[0].resource[0].searchParam[14].type == "token"
assert inst.rest[0].resource[0].type == "Patient"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing DAF-AllergyIntolerance resources using different search criteria"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific DAF-AllergyIntolerance by id"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows review of changes to DAF-AllergyIntolerance instance over time"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[3].code == "vread"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-AllergyIntolerance instance"
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-allergyintolerance"
)
assert inst.rest[0].resource[1].searchInclude[0] == "AllergyIntolerance.patient"
assert (
inst.rest[0].resource[1].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[0].name == "identifier"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert inst.rest[0].resource[1].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[1].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[1].name == "patient"
assert inst.rest[0].resource[1].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[1].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[2].name == "category"
assert inst.rest[0].resource[1].searchParam[2].type == "token"
assert (
inst.rest[0].resource[1].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[3].name == "status"
assert inst.rest[0].resource[1].searchParam[3].type == "token"
assert (
inst.rest[0].resource[1].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[4].name == "substance"
assert inst.rest[0].resource[1].searchParam[4].type == "token"
assert (
inst.rest[0].resource[1].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[5].name == "manifestation"
assert inst.rest[0].resource[1].searchParam[5].type == "token"
assert (
inst.rest[0].resource[1].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[6].name == "severity"
assert inst.rest[0].resource[1].searchParam[6].type == "token"
assert (
inst.rest[0].resource[1].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[7].name == "onset"
assert inst.rest[0].resource[1].searchParam[7].type == "date"
assert inst.rest[0].resource[1].type == "AllergyIntolerance"
assert inst.rest[0].resource[2].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Allows discovery of existing DAF-DiagnosticOrder resources using different search criteria"
)
assert (
inst.rest[0].resource[2].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[1].code == "read"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Allows retrieval of a specific DAF-DiagnosticOrder by id"
)
assert (
inst.rest[0].resource[2].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Allows review of changes to DAF-DiagnosticOrder instance over time"
)
assert (
inst.rest[0].resource[2].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[3].code == "vread"
assert (
inst.rest[0].resource[2].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-DiagnosticOrder instance"
)
assert (
inst.rest[0].resource[2].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[2].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticorder"
)
assert inst.rest[0].resource[2].searchInclude[0] == "DiagnosticOrder.subject"
assert inst.rest[0].resource[2].searchInclude[1] == "DiagnosticOrder.orderer"
assert inst.rest[0].resource[2].searchInclude[2] == "DiagnosticOrder.encounter"
assert (
inst.rest[0].resource[2].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[0].name == "identifier"
assert inst.rest[0].resource[2].searchParam[0].type == "token"
assert inst.rest[0].resource[2].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[2].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[1].name == "patient"
assert inst.rest[0].resource[2].searchParam[1].type == "reference"
assert inst.rest[0].resource[2].searchParam[2].chain[0] == "orderer.identifier"
assert (
inst.rest[0].resource[2].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[2].name == "orderer"
assert inst.rest[0].resource[2].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[3].name == "code"
assert inst.rest[0].resource[2].searchParam[3].type == "token"
assert inst.rest[0].resource[2].searchParam[4].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[2].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[4].name == "encounter"
assert inst.rest[0].resource[2].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[2].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].searchParam[5].name == "item-date"
assert inst.rest[0].resource[2].searchParam[5].type == "date"
assert inst.rest[0].resource[2].type == "DiagnosticOrder"
assert inst.rest[0].resource[3].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[3].interaction[0].documentation
== "Allows discovery of existing DAF-DiagnosticReport resources using different search criteria"
)
assert (
inst.rest[0].resource[3].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].interaction[1].code == "read"
assert (
inst.rest[0].resource[3].interaction[1].documentation
== "Allows retrieval of a specific DAF-DiagnosticReport by id"
)
assert (
inst.rest[0].resource[3].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[3].interaction[2].documentation
== "Allows review of changes to DAF-DiagnosticReport instance over time"
)
assert (
inst.rest[0].resource[3].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].interaction[3].code == "vread"
assert (
inst.rest[0].resource[3].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-DiagnosticReport instance"
)
assert (
inst.rest[0].resource[3].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[3].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-diagnosticreport"
)
assert inst.rest[0].resource[3].searchInclude[0] == "DiagnosticReport.subject"
assert inst.rest[0].resource[3].searchInclude[1] == "DiagnosticReport.performer"
assert inst.rest[0].resource[3].searchInclude[2] == "DiagnosticReport.encounter"
assert inst.rest[0].resource[3].searchInclude[3] == "DiagnosticReport.result"
assert (
inst.rest[0].resource[3].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[0].name == "identifier"
assert inst.rest[0].resource[3].searchParam[0].type == "token"
assert inst.rest[0].resource[3].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[3].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[1].name == "patient"
assert inst.rest[0].resource[3].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[3].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[2].name == "date"
assert inst.rest[0].resource[3].searchParam[2].type == "date"
assert inst.rest[0].resource[3].searchParam[3].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[3].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[3].name == "encounter"
assert inst.rest[0].resource[3].searchParam[3].type == "reference"
assert inst.rest[0].resource[3].searchParam[4].chain[0] == "performer.identifier"
assert (
inst.rest[0].resource[3].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[4].name == "performer"
assert inst.rest[0].resource[3].searchParam[4].type == "reference"
assert inst.rest[0].resource[3].searchParam[5].chain[0] == "result.code"
assert (
inst.rest[0].resource[3].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[3].searchParam[5].name == "result"
assert inst.rest[0].resource[3].searchParam[5].type == "reference"
assert inst.rest[0].resource[3].type == "DiagnosticReport"
assert inst.rest[0].resource[4].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[4].interaction[0].documentation
== "Allows discovery of existing DAF-Encounter resources using different search criteria"
)
assert (
inst.rest[0].resource[4].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].interaction[1].code == "read"
assert (
inst.rest[0].resource[4].interaction[1].documentation
== "Allows retrieval of a specific DAF-Encounter by id"
)
assert (
inst.rest[0].resource[4].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[4].interaction[2].documentation
== "Allows review of changes to DAF-Encounter instance over time"
)
assert (
inst.rest[0].resource[4].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].interaction[3].code == "vread"
assert (
inst.rest[0].resource[4].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Encounter instance"
)
assert (
inst.rest[0].resource[4].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[4].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-encounter"
)
assert inst.rest[0].resource[4].searchInclude[0] == "Encounter.patient"
assert inst.rest[0].resource[4].searchInclude[1] == "Encounter.location"
assert (
inst.rest[0].resource[4].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[0].name == "identifier"
assert inst.rest[0].resource[4].searchParam[0].type == "token"
assert inst.rest[0].resource[4].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[4].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[1].name == "patient"
assert inst.rest[0].resource[4].searchParam[1].type == "reference"
assert inst.rest[0].resource[4].searchParam[2].chain[0] == "location.identifier"
assert (
inst.rest[0].resource[4].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[2].name == "location"
assert inst.rest[0].resource[4].searchParam[2].type == "reference"
assert (
inst.rest[0].resource[4].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[3].name == "type"
assert inst.rest[0].resource[4].searchParam[3].type == "token"
assert (
inst.rest[0].resource[4].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[4].name == "date"
assert inst.rest[0].resource[4].searchParam[4].type == "date"
assert (
inst.rest[0].resource[4].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[4].searchParam[5].name == "location-period"
assert inst.rest[0].resource[4].searchParam[5].type == "date"
assert inst.rest[0].resource[4].type == "Encounter"
assert inst.rest[0].resource[5].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[5].interaction[0].documentation
== "Allows discovery of existing DAF-FamilyMemberHistory resources using different search criteria"
)
assert (
inst.rest[0].resource[5].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].interaction[1].code == "read"
assert (
inst.rest[0].resource[5].interaction[1].documentation
== "Allows retrieval of a specific DAF-FamilyMemberHistory by id"
)
assert (
inst.rest[0].resource[5].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[5].interaction[2].documentation
== "Allows review of changes to DAF-FamilyMemberHistory instance over time"
)
assert (
inst.rest[0].resource[5].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[5].interaction[3].code == "vread"
assert (
inst.rest[0].resource[5].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-FamilyMemberHistory instance"
)
assert (
inst.rest[0].resource[5].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[5].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-familymemberhistory"
)
assert inst.rest[0].resource[5].searchInclude[0] == "FamilyMemberHistory.patient"
assert (
inst.rest[0].resource[5].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].searchParam[0].name == "identifier"
assert inst.rest[0].resource[5].searchParam[0].type == "token"
assert inst.rest[0].resource[5].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[5].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].searchParam[1].name == "patient"
assert inst.rest[0].resource[5].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[5].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].searchParam[2].name == "relationship"
assert inst.rest[0].resource[5].searchParam[2].type == "token"
assert (
inst.rest[0].resource[5].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[5].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[5].searchParam[3].name == "code"
assert inst.rest[0].resource[5].searchParam[3].type == "token"
assert inst.rest[0].resource[5].type == "FamilyMemberHistory"
assert inst.rest[0].resource[6].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[6].interaction[0].documentation
== "Allows discovery of existing DAF-Immunization resources using different search criteria"
)
assert (
inst.rest[0].resource[6].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].interaction[1].code == "read"
assert (
inst.rest[0].resource[6].interaction[1].documentation
== "Allows retrieval of a specific DAF-Immunization by id"
)
assert (
inst.rest[0].resource[6].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[6].interaction[2].documentation
== "Allows review of changes to DAF-Immunization instance over time"
)
assert (
inst.rest[0].resource[6].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[6].interaction[3].code == "vread"
assert (
inst.rest[0].resource[6].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Immunization instance"
)
assert (
inst.rest[0].resource[6].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[6].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-immunization"
)
assert inst.rest[0].resource[6].searchInclude[0] == "Immunization.patient"
assert inst.rest[0].resource[6].searchInclude[1] == "Immunization.performer"
assert inst.rest[0].resource[6].searchInclude[2] == "Immunization.requester"
assert inst.rest[0].resource[6].searchInclude[3] == "Immunization.manufacturer"
assert inst.rest[0].resource[6].searchInclude[4] == "Immunization.reaction.detail"
assert (
inst.rest[0].resource[6].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[0].name == "identifier"
assert inst.rest[0].resource[6].searchParam[0].type == "token"
assert inst.rest[0].resource[6].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[6].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[1].name == "patient"
assert inst.rest[0].resource[6].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[6].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[2].name == "date"
assert inst.rest[0].resource[6].searchParam[2].type == "date"
assert (
inst.rest[0].resource[6].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[3].name == "vaccine-code"
assert inst.rest[0].resource[6].searchParam[3].type == "token"
assert (
inst.rest[0].resource[6].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[4].name == "notgiven"
assert inst.rest[0].resource[6].searchParam[4].type == "token"
assert (
inst.rest[0].resource[6].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[5].name == "lot-number"
assert inst.rest[0].resource[6].searchParam[5].type == "string"
assert inst.rest[0].resource[6].searchParam[6].chain[0] == "requester.identifier"
assert (
inst.rest[0].resource[6].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[6].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[6].searchParam[6].name == "requester"
assert inst.rest[0].resource[6].searchParam[6].type == "reference"
assert inst.rest[0].resource[6].type == "Immunization"
assert inst.rest[0].resource[7].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[7].interaction[0].documentation
== "Allows discovery of existing DAF-Results resources using different search criteria"
)
assert (
inst.rest[0].resource[7].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].interaction[1].code == "read"
assert (
inst.rest[0].resource[7].interaction[1].documentation
== "Allows retrieval of a specific DAF-Results by id"
)
assert (
inst.rest[0].resource[7].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[7].interaction[2].documentation
== "Allows review of changes to DAF-Results instance over time"
)
assert (
inst.rest[0].resource[7].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[7].interaction[3].code == "vread"
assert (
inst.rest[0].resource[7].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Results instance"
)
assert (
inst.rest[0].resource[7].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[7].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-resultobs"
)
assert inst.rest[0].resource[7].searchInclude[0] == "Observation.encounter"
assert inst.rest[0].resource[7].searchInclude[1] == "Observation.subject"
assert inst.rest[0].resource[7].searchInclude[2] == "Observation.related"
assert (
inst.rest[0].resource[7].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[0].name == "identifier"
assert inst.rest[0].resource[7].searchParam[0].type == "token"
assert inst.rest[0].resource[7].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[7].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[1].name == "patient"
assert inst.rest[0].resource[7].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[7].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[2].name == "code"
assert inst.rest[0].resource[7].searchParam[2].type == "token"
assert (
inst.rest[0].resource[7].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[3].name == "value-concept"
assert inst.rest[0].resource[7].searchParam[3].type == "token"
assert (
inst.rest[0].resource[7].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[4].name == "value-quantity"
assert inst.rest[0].resource[7].searchParam[4].type == "quantity"
assert (
inst.rest[0].resource[7].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[5].name == "code-value[x]"
assert inst.rest[0].resource[7].searchParam[5].type == "composite"
assert (
inst.rest[0].resource[7].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[6].name == "date"
assert inst.rest[0].resource[7].searchParam[6].type == "date"
assert inst.rest[0].resource[7].searchParam[7].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[7].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[7].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[7].searchParam[7].name == "encounter"
assert inst.rest[0].resource[7].searchParam[7].type == "reference"
assert inst.rest[0].resource[7].searchRevInclude[0] == "Observation.component"
assert inst.rest[0].resource[7].type == "Observation"
assert inst.rest[0].resource[8].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[8].interaction[0].documentation
== "Allows discovery of existing DAF-Medication resources using different search criteria"
)
assert (
inst.rest[0].resource[8].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[8].interaction[1].code == "read"
assert (
inst.rest[0].resource[8].interaction[1].documentation
== "Allows retrieval of a specific DAF-Medication by id"
)
assert (
inst.rest[0].resource[8].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[8].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[8].interaction[2].documentation
== "Allows review of changes to DAF-Medication instance over time"
)
assert (
inst.rest[0].resource[8].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[8].interaction[3].code == "vread"
assert (
inst.rest[0].resource[8].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Medication instance"
)
assert (
inst.rest[0].resource[8].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[8].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medication"
)
assert inst.rest[0].resource[8].searchInclude[0] == "Medication.manufacturer"
assert (
inst.rest[0].resource[8].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[8].searchParam[0].name == "code"
assert inst.rest[0].resource[8].searchParam[0].type == "token"
assert (
inst.rest[0].resource[8].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[8].searchParam[1].name == "form"
assert inst.rest[0].resource[8].searchParam[1].type == "token"
assert (
inst.rest[0].resource[8].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[8].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[8].searchParam[2].name == "ingredient"
assert inst.rest[0].resource[8].searchParam[2].type == "reference"
assert inst.rest[0].resource[8].type == "Medication"
assert inst.rest[0].resource[9].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[9].interaction[0].documentation
== "Allows discovery of existing DAF-MedicationStatement resources using different search criteria"
)
assert (
inst.rest[0].resource[9].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].interaction[1].code == "read"
assert (
inst.rest[0].resource[9].interaction[1].documentation
== "Allows retrieval of a specific DAF-MedicationStatement by id"
)
assert (
inst.rest[0].resource[9].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[9].interaction[2].documentation
== "Allows review of changes to DAF-MedicationStatement instance over time"
)
assert (
inst.rest[0].resource[9].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[9].interaction[3].code == "vread"
assert (
inst.rest[0].resource[9].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-MedicationStatement instance"
)
assert (
inst.rest[0].resource[9].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[9].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationstatement"
)
assert inst.rest[0].resource[9].searchInclude[0] == "MedicationStatement.patient"
assert inst.rest[0].resource[9].searchInclude[1] == "MedicationStatement.medication"
assert (
inst.rest[0].resource[9].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].searchParam[0].name == "identifier"
assert inst.rest[0].resource[9].searchParam[0].type == "token"
assert inst.rest[0].resource[9].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[9].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].searchParam[1].name == "patient"
assert inst.rest[0].resource[9].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[9].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].searchParam[2].name == "effectivedate"
assert inst.rest[0].resource[9].searchParam[2].type == "date"
assert inst.rest[0].resource[9].searchParam[3].chain[0] == "medication.code"
assert (
inst.rest[0].resource[9].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[9].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[9].searchParam[3].name == "medication"
assert inst.rest[0].resource[9].searchParam[3].type == "reference"
assert inst.rest[0].resource[9].type == "MedicationStatement"
assert inst.rest[0].resource[10].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[10].interaction[0].documentation
== "Allows discovery of existing DAF-MedicationAdministration resources using different search criteria"
)
assert (
inst.rest[0].resource[10].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].interaction[1].code == "read"
assert (
inst.rest[0].resource[10].interaction[1].documentation
== "Allows retrieval of a specific DAF-MedicationAdministration by id"
)
assert (
inst.rest[0].resource[10].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[10].interaction[2].documentation
== "Allows review of changes to DAF-MedicationAdministration instance over time"
)
assert (
inst.rest[0].resource[10].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[10].interaction[3].code == "vread"
assert (
inst.rest[0].resource[10].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-MedicationAdministration instance"
)
assert (
inst.rest[0].resource[10].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[10].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationadministration"
)
assert (
inst.rest[0].resource[10].searchInclude[0] == "MedicationAdministration.patient"
)
assert (
inst.rest[0].resource[10].searchInclude[1]
== "MedicationAdministration.practitioner"
)
assert (
inst.rest[0].resource[10].searchInclude[2]
== "MedicationAdministration.encounter"
)
assert (
inst.rest[0].resource[10].searchInclude[3]
== "MedicationAdministration.prescription"
)
assert (
inst.rest[0].resource[10].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[0].name == "identifier"
assert inst.rest[0].resource[10].searchParam[0].type == "token"
assert inst.rest[0].resource[10].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[10].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[1].name == "patient"
assert inst.rest[0].resource[10].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[2].name == "effectivetime"
assert inst.rest[0].resource[10].searchParam[2].type == "date"
assert inst.rest[0].resource[10].searchParam[3].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[10].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[3].name == "encounter"
assert inst.rest[0].resource[10].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[4].chain[0] == "practitioner.identifier"
)
assert (
inst.rest[0].resource[10].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[4].name == "practitioner"
assert inst.rest[0].resource[10].searchParam[4].type == "reference"
assert (
inst.rest[0].resource[10].searchParam[5].chain[0] == "prescription.identifier"
)
assert (
inst.rest[0].resource[10].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[10].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[10].searchParam[5].name == "prescription"
assert inst.rest[0].resource[10].searchParam[5].type == "reference"
assert inst.rest[0].resource[10].type == "MedicationAdministration"
assert inst.rest[0].resource[11].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[11].interaction[0].documentation
== "Allows discovery of existing DAF-MedicationDispense resources using different search criteria"
)
assert (
inst.rest[0].resource[11].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].interaction[1].code == "read"
assert (
inst.rest[0].resource[11].interaction[1].documentation
== "Allows retrieval of a specific DAF-MedicationDispense by id"
)
assert (
inst.rest[0].resource[11].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[11].interaction[2].documentation
== "Allows review of changes to DAF-MedicationDispense instance over time"
)
assert (
inst.rest[0].resource[11].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[11].interaction[3].code == "vread"
assert (
inst.rest[0].resource[11].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-MedicationDispenseinstance"
)
assert (
inst.rest[0].resource[11].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[11].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationdispense"
)
assert inst.rest[0].resource[11].searchInclude[0] == "MedicationDispense.patient"
assert inst.rest[0].resource[11].searchInclude[1] == "MedicationDispense.medication"
assert (
inst.rest[0].resource[11].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].searchParam[0].name == "identifier"
assert inst.rest[0].resource[11].searchParam[0].type == "token"
assert inst.rest[0].resource[11].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[11].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].searchParam[1].name == "patient"
assert inst.rest[0].resource[11].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[11].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].searchParam[2].name == "code"
assert inst.rest[0].resource[11].searchParam[2].type == "token"
assert (
inst.rest[0].resource[11].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[11].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[11].searchParam[3].name == "medication"
assert inst.rest[0].resource[11].searchParam[3].type == "reference"
assert inst.rest[0].resource[11].type == "MedicationDispense"
assert inst.rest[0].resource[12].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[12].interaction[0].documentation
== "Allows discovery of existing DAF-MedicationOrder resources using different search criteria"
)
assert (
inst.rest[0].resource[12].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].interaction[1].code == "read"
assert (
inst.rest[0].resource[12].interaction[1].documentation
== "Allows retrieval of a specific DAF-MedicationOrder by id"
)
assert (
inst.rest[0].resource[12].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[12].interaction[2].documentation
== "Allows review of changes to DAF-MedicationOrder instance over time"
)
assert (
inst.rest[0].resource[12].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[12].interaction[3].code == "vread"
assert (
inst.rest[0].resource[12].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-MedicationOrder instances"
)
assert (
inst.rest[0].resource[12].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[12].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-medicationdispense"
)
assert inst.rest[0].resource[12].searchInclude[0] == "MedicationOrder.patient"
assert inst.rest[0].resource[12].searchInclude[1] == "MedicationOrder.medication"
assert inst.rest[0].resource[12].searchInclude[2] == "MedicationOrder.encounter"
assert (
inst.rest[0].resource[12].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].searchParam[0].name == "identifier"
assert inst.rest[0].resource[12].searchParam[0].type == "token"
assert inst.rest[0].resource[12].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[12].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].searchParam[1].name == "patient"
assert inst.rest[0].resource[12].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].searchParam[2].name == "code"
assert inst.rest[0].resource[12].searchParam[2].type == "token"
assert (
inst.rest[0].resource[12].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].searchParam[3].name == "medication"
assert inst.rest[0].resource[12].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[12].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[12].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[12].searchParam[4].name == "encounter"
assert inst.rest[0].resource[12].searchParam[4].type == "reference"
assert inst.rest[0].resource[12].type == "MedicationOrder"
assert inst.rest[0].resource[13].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[13].interaction[0].documentation
== "Allows discovery of existing DAF-Condition resources using different search criteria"
)
assert (
inst.rest[0].resource[13].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].interaction[1].code == "read"
assert (
inst.rest[0].resource[13].interaction[1].documentation
== "Allows retrieval of a specific DAF-Condition by id"
)
assert (
inst.rest[0].resource[13].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[13].interaction[2].documentation
== "Allows review of changes to DAF-Condition instance over time"
)
assert (
inst.rest[0].resource[13].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[13].interaction[3].code == "vread"
assert (
inst.rest[0].resource[13].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Condition instance"
)
assert (
inst.rest[0].resource[13].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[13].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-condition"
)
assert inst.rest[0].resource[13].searchInclude[0] == "Condition.patient"
assert inst.rest[0].resource[13].searchInclude[1] == "Condition.encounter"
assert inst.rest[0].resource[13].searchInclude[2] == "Condition.asserter"
assert (
inst.rest[0].resource[13].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[0].name == "identifier"
assert inst.rest[0].resource[13].searchParam[0].type == "token"
assert inst.rest[0].resource[13].searchParam[1].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[13].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[1].name == "patient"
assert inst.rest[0].resource[13].searchParam[1].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[2].name == "code"
assert inst.rest[0].resource[13].searchParam[2].type == "token"
assert inst.rest[0].resource[13].searchParam[3].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[13].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[3].name == "encounter"
assert inst.rest[0].resource[13].searchParam[3].type == "reference"
assert (
inst.rest[0].resource[13].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[4].name == "onset"
assert inst.rest[0].resource[13].searchParam[4].type == "date"
assert (
inst.rest[0].resource[13].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[13].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[13].searchParam[5].name == "severity"
assert inst.rest[0].resource[13].searchParam[5].type == "token"
assert inst.rest[0].resource[13].type == "Condition"
assert inst.rest[0].resource[14].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[14].interaction[0].documentation
== "Allows discovery of existing DAF-Procedure resources using different search criteria"
)
assert (
inst.rest[0].resource[14].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].interaction[1].code == "read"
assert (
inst.rest[0].resource[14].interaction[1].documentation
== "Allows retrieval of a specific DAF-Procedure by id"
)
assert (
inst.rest[0].resource[14].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[14].interaction[2].documentation
== "Allows review of changes to DAF-Procedure instance over time"
)
assert (
inst.rest[0].resource[14].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[14].interaction[3].code == "vread"
assert (
inst.rest[0].resource[14].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF-Procedure instance"
)
assert (
inst.rest[0].resource[14].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[14].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-procedure"
)
assert inst.rest[0].resource[14].searchInclude[0] == "Procedure.patient"
assert inst.rest[0].resource[14].searchInclude[1] == "Procedure.encounter"
assert inst.rest[0].resource[14].searchInclude[2] == "Procedure.performer"
assert (
inst.rest[0].resource[14].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].searchParam[0].name == "identifier"
assert inst.rest[0].resource[14].searchParam[0].type == "token"
assert (
inst.rest[0].resource[14].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].searchParam[1].name == "code"
assert inst.rest[0].resource[14].searchParam[1].type == "token"
assert (
inst.rest[0].resource[14].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].searchParam[2].name == "date"
assert inst.rest[0].resource[14].searchParam[2].type == "date"
assert inst.rest[0].resource[14].searchParam[3].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[14].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].searchParam[3].name == "patient"
assert inst.rest[0].resource[14].searchParam[3].type == "reference"
assert inst.rest[0].resource[14].searchParam[4].chain[0] == "encounter.identifier"
assert (
inst.rest[0].resource[14].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[14].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[14].searchParam[4].name == "encounter"
assert inst.rest[0].resource[14].searchParam[4].type == "reference"
assert inst.rest[0].resource[14].type == "Procedure"
assert inst.rest[0].resource[15].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[15].interaction[0].documentation
== "Allows discovery of existing DAF List resources using different search criteria"
)
assert (
inst.rest[0].resource[15].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].interaction[1].code == "read"
assert (
inst.rest[0].resource[15].interaction[1].documentation
== "Allows retrieval of a specific DAF List by id"
)
assert (
inst.rest[0].resource[15].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[15].interaction[2].documentation
== "Allows review of changes to DAF List instance over time"
)
assert (
inst.rest[0].resource[15].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[15].interaction[3].code == "vread"
assert (
inst.rest[0].resource[15].interaction[3].documentation
== "Allows retrieval of a historical version of a DAF List instance"
)
assert (
inst.rest[0].resource[15].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].interaction[3].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[15].profile.reference
== "http://hl7.org/fhir/StructureDefinition/daf-problemlist"
)
assert inst.rest[0].resource[15].searchInclude[0] == "List.subject"
assert inst.rest[0].resource[15].searchInclude[1] == "List.item"
assert inst.rest[0].resource[15].searchParam[0].chain[0] == "patient.identifier"
assert (
inst.rest[0].resource[15].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].searchParam[0].name == "patient"
assert inst.rest[0].resource[15].searchParam[0].type == "reference"
assert (
inst.rest[0].resource[15].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].searchParam[1].name == "code"
assert inst.rest[0].resource[15].searchParam[1].type == "token"
assert (
inst.rest[0].resource[15].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].searchParam[2].name == "empty-reason"
assert inst.rest[0].resource[15].searchParam[2].type == "token"
assert (
inst.rest[0].resource[15].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[15].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[15].searchParam[3].name == "date"
assert inst.rest[0].resource[15].searchParam[3].type == "date"
assert inst.rest[0].resource[15].type == "List"
assert (
inst.rest[0].security.description
== "DAF Responders SHALL implement the security requirements documented in the [[daf-security|DAF FHIR IG]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_5(base_settings):
filename = (
base_settings["unittest_data_dir"] / "conformance-ehrs-rle.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_5(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_5(inst2)
def impl_Conformance_5(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value == "http://hl7.org/special/committees/ehr.htm"
)
assert inst.date == parse_date("2014-12-06")
assert (
inst.description
== "This profile defines the expected capabilities of an ''Electronic Health Record System'' when conforming to the EHRS functional model's Record Lifecycle specification."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-ehrs-rle"
assert inst.kind == "requirements"
assert inst.name == "Record Lifecycle-conformant Electronic Health Record System"
assert (
inst.publisher
== "Health Level Seven, Int'l - Electronic Health Record work group"
)
assert (
inst.rest[0].documentation
== "Conformant systems must record [[Provenance]] records on all Create, Update and Delete actions on any resource other than Provenance or AuditEvent. Conformant systems must record [[AuditEvent]] records on all Create, Update and Delete actions as well as all GET operations (read, search, etc.)"
)
assert inst.rest[0].mode == "client"
assert inst.rest[0].resource[0].interaction[0].code == "create"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows defining a new data element. Repositories requiring curation of submitted data elements may require all new data elements to have a status of 'draft'."
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/provenance-ehr-rle"
)
assert inst.rest[0].resource[0].type == "Provenance"
assert inst.rest[0].resource[1].interaction[0].code == "create"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows defining a new data element. Repositories requiring curation of submitted data elements may require all new data elements to have a status of 'draft'."
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/auditevent-ehr-rle"
)
assert inst.rest[0].resource[1].type == "AuditEvent"
assert inst.rest[0].security.description == "Any security rules??"
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_6(base_settings):
filename = base_settings["unittest_data_dir"] / "conformance-example.canonical.json"
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_6(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_6(inst2)
def impl_Conformance_6(inst):
assert inst.acceptUnknown == "both"
assert inst.contact[0].name == "System Administrator"
assert inst.contact[0].telecom[0].system == "email"
assert inst.contact[0].telecom[0].value == "wile@acme.org"
assert inst.copyright == "Copyright © Acme Healthcare and GoodCorp EHR Systems"
assert inst.date == parse_date("2012-01-04")
assert (
inst.description
== "This is the FHIR conformance statement for the main EHR at ACME for the private interface - it does not describe the public interface"
)
assert (
inst.document[0].documentation
== "Basic rules for all documents in the EHR system"
)
assert inst.document[0].mode == "consumer"
assert (
inst.document[0].profile.reference
== "http://fhir.hl7.org/base/Profilebc054d23-75e1-4dc6-aca5-838b6b1ac81d/_history/b5fdd9fc-b021-4ea1-911a-721a60663796"
)
assert inst.experimental == True
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "example"
assert inst.implementation.description == "main EHR at ACME"
assert inst.implementation.url == "http://10.2.3.4/fhir"
assert inst.kind == "instance"
assert (
inst.messaging[0].documentation
== "ADT A08 equivalent for external system notifications"
)
assert inst.messaging[0].endpoint[0].address == "mllp:10.1.1.10:9234"
assert inst.messaging[0].endpoint[0].protocol.code == "mllp"
assert (
inst.messaging[0].endpoint[0].protocol.system
== "http://hl7.org/fhir/message-transport"
)
assert inst.messaging[0].event[0].category == "Consequence"
assert inst.messaging[0].event[0].code.code == "admin-notify"
assert inst.messaging[0].event[0].code.system == "http://hl7.org/fhir/message-type"
assert (
inst.messaging[0].event[0].documentation
== "Notification of an update to a patient resource. changing the links is not supported"
)
assert inst.messaging[0].event[0].focus == "Patient"
assert inst.messaging[0].event[0].mode == "receiver"
assert (
inst.messaging[0].event[0].request.reference
== "StructureDefinition/daf-patient"
)
assert (
inst.messaging[0].event[0].response.reference
== "StructureDefinition/MessageHeader"
)
assert inst.messaging[0].reliableCache == 30
assert inst.name == "ACME EHR Conformance statement"
assert inst.publisher == "ACME Corporation"
assert (
inst.requirements
== "Main EHR conformance statement, published for contracting and operational support"
)
assert inst.rest[0].compartment[0] == "http://hl7.org/fhir/compartment/Patient"
assert inst.rest[0].documentation == "Main FHIR endpoint for acem health"
assert inst.rest[0].interaction[0].code == "transaction"
assert inst.rest[0].interaction[1].code == "history-system"
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].conditionalCreate == True
assert inst.rest[0].resource[0].conditionalDelete == "not-supported"
assert inst.rest[0].resource[0].conditionalUpdate == False
assert inst.rest[0].resource[0].interaction[0].code == "read"
assert inst.rest[0].resource[0].interaction[1].code == "vread"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Only supported for patient records since 12-Dec 2012"
)
assert inst.rest[0].resource[0].interaction[2].code == "update"
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert inst.rest[0].resource[0].interaction[5].code == "history-type"
assert (
inst.rest[0].resource[0].profile.reference
== "http://fhir.hl7.org/base/Profile7896271d-57f6-4231-89dc-dcc91eab2416"
)
assert inst.rest[0].resource[0].readHistory == True
assert inst.rest[0].resource[0].searchInclude[0] == "Organization"
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/Patient-identifier"
)
assert (
inst.rest[0].resource[0].searchParam[0].documentation
== "Only supports search by institution MRN"
)
assert inst.rest[0].resource[0].searchParam[0].modifier[0] == "missing"
assert inst.rest[0].resource[0].searchParam[0].name == "identifier"
assert inst.rest[0].resource[0].searchParam[0].type == "token"
assert inst.rest[0].resource[0].searchParam[1].chain[0] == "name"
assert inst.rest[0].resource[0].searchParam[1].chain[1] == "identifier"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/Patient-careprovider"
)
assert inst.rest[0].resource[0].searchParam[1].modifier[0] == "missing"
assert inst.rest[0].resource[0].searchParam[1].name == "careprovider"
assert inst.rest[0].resource[0].searchParam[1].target[0] == "Organization"
assert inst.rest[0].resource[0].searchParam[1].type == "reference"
assert inst.rest[0].resource[0].searchRevInclude[0] == "Person"
assert inst.rest[0].resource[0].type == "Patient"
assert inst.rest[0].resource[0].updateCreate == False
assert inst.rest[0].resource[0].versioning == "versioned-update"
assert (
inst.rest[0].security.certificate[0].blob == b"IHRoaXMgYmxvYiBpcyBub3QgdmFsaWQ="
)
assert inst.rest[0].security.certificate[0].type == "application/jwt"
assert inst.rest[0].security.cors == True
assert inst.rest[0].security.description == "See Smart on FHIR documentation"
assert inst.rest[0].security.service[0].coding[0].code == "SMART-on-FHIR"
assert (
inst.rest[0].security.service[0].coding[0].system
== "http://hl7.org/fhir/restful-security-service"
)
assert inst.software.name == "EHR"
assert inst.software.releaseDate == parse_date("2012-01-04")
assert inst.software.version == "0.00.020.2134"
assert inst.status == "draft"
assert inst.text.status == "generated"
assert inst.url == "68D043B5-9ECF-4559-A57A-396E0D452311"
assert inst.version == "20130510"
def test_Conformance_7(base_settings):
filename = (
base_settings["unittest_data_dir"] / "conformance-phr-example.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_7(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_7(inst2)
def impl_Conformance_7(inst):
assert inst.acceptUnknown == "no"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://hl7.org/fhir"
assert inst.date == parse_date("2013-06-18")
assert (
inst.description
== "Prototype Conformance Statement for September 2013 Connectathon"
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "json"
assert inst.format[1] == "xml"
assert inst.id == "phr"
assert inst.kind == "capability"
assert inst.name == "PHR Template"
assert inst.publisher == "FHIR Project"
assert (
inst.rest[0].documentation
== "Protoype server conformance statement for September 2013 Connectathon"
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "read"
assert inst.rest[0].resource[0].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "When a client searches patients with no search criteria, they get a list of all patients they have access too. Servers may elect to offer additional search parameters, but this is not required"
)
assert inst.rest[0].resource[0].type == "Patient"
assert inst.rest[0].resource[1].interaction[0].code == "read"
assert inst.rest[0].resource[1].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[1].searchParam[0].documentation
== "_id parameter always supported. For the connectathon, servers may elect which search parameters are supported"
)
assert inst.rest[0].resource[1].searchParam[0].name == "_id"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert inst.rest[0].resource[1].type == "DocumentReference"
assert inst.rest[0].resource[2].interaction[0].code == "read"
assert inst.rest[0].resource[2].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[2].searchParam[0].documentation
== "Standard _id parameter"
)
assert inst.rest[0].resource[2].searchParam[0].name == "_id"
assert inst.rest[0].resource[2].searchParam[0].type == "token"
assert inst.rest[0].resource[2].type == "Condition"
assert inst.rest[0].resource[3].interaction[0].code == "read"
assert inst.rest[0].resource[3].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[3].searchParam[0].documentation
== "Standard _id parameter"
)
assert inst.rest[0].resource[3].searchParam[0].name == "_id"
assert inst.rest[0].resource[3].searchParam[0].type == "token"
assert (
inst.rest[0].resource[3].searchParam[1].documentation
== "which diagnostic discipline/department created the report"
)
assert inst.rest[0].resource[3].searchParam[1].name == "service"
assert inst.rest[0].resource[3].searchParam[1].type == "token"
assert inst.rest[0].resource[3].type == "DiagnosticReport"
assert (
inst.rest[0].security.description
== "We recommend that PHR servers use standard OAuth using a standard 3rd party provider. We are not testing the ability to provide an OAuth authentication/authorization service itself, and nor is providing any security required for the connectathon at all"
)
assert inst.rest[0].security.service[0].text == "OAuth"
assert inst.software.name == "ACME PHR Server"
assert inst.text.status == "generated"
def test_Conformance_8(base_settings):
filename = (
base_settings["unittest_data_dir"] / "conformance-sdc-de-curator.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_8(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_8(inst2)
def impl_Conformance_8(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Data Element Curator'' role when conforming to the S&I Framework's [[sdc|Structured Data Capture FHIR Data Element Exchange implementation guide]]. This role is responsible for defining and updating data elements stored in a repository."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-de-curator"
assert inst.kind == "requirements"
assert inst.name == "SDC Data Element Curator"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The primary focus of the curator is the definition and maintenance of [[DataElement]]s. However, [[ValueSet]]s must also be supported to allow definition of coded data elements. Some data elements will choose to maintain value sets as 'contained' resources, meaning the value set exists only in the context of the data element and cannot be referenced or maintained without also updating the data element. However, systems should support value set re-use across data elements. (Version-specific referencing can be used to avoid value sets from changing independent of the referencing [[Questionnaire]].)"
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing data elements"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known data element"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a data element"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a data element over time"
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new data element. Repositories requiring curation of submitted data elements may require all new data elements to have a status of 'draft'."
)
assert (
inst.rest[0].resource[0].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows maintaining data elements, such as adding additional mappings, display names, etc. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new data element (and potentially the retiring of the existing data element). Servers may also limit who can change particular data elements."
)
assert (
inst.rest[0].resource[0].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new data element or revision of an existing data element would be accepted based on validation and other business rules. Useful for some workflows"
)
assert (
inst.rest[0].resource[0].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[7].code == "delete"
assert (
inst.rest[0].resource[0].interaction[7].documentation
== "Allows removal of an existing data element. Servers may choose to not support deletions or may limit deletions to data elements meeting certain requirements. E.g. only elements with a status of draft or only elements that have been retired for at least two years, etc."
)
assert (
inst.rest[0].resource[0].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/dataelement-sdc-de"
)
assert inst.rest[0].resource[0].type == "DataElement"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing value sets for use in authoring data elements"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific value set referenced within a data element"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[2].code == "vread"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows retrieval of a historical version of a value set as referenced within a data element"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows review of changes to a value set over time"
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[4].code == "create"
assert (
inst.rest[0].resource[1].interaction[4].documentation
== "Allows definition of a new value set used by one or more data elements"
)
assert (
inst.rest[0].resource[1].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[5].code == "update"
assert (
inst.rest[0].resource[1].interaction[5].documentation
== "Allows existing value sets referenced by one or more data elements to be maintained"
)
assert (
inst.rest[0].resource[1].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[6].code == "validate"
assert (
inst.rest[0].resource[1].interaction[6].documentation
== "Allows verification that a value set is valid prior to submission - useful for some workflows."
)
assert (
inst.rest[0].resource[1].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[7].code == "delete"
assert (
inst.rest[0].resource[1].interaction[7].documentation
== "Not all servers will support deletion of value sets. Status change to 'retired' will be more typical, though deletion of draft value sets may keep repositories cleaner."
)
assert (
inst.rest[0].resource[1].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/valueset-sdc-de"
)
assert inst.rest[0].resource[1].type == "ValueSet"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_9(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-de-registry.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_9(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_9(inst2)
def impl_Conformance_9(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Data Element Manager'' role when conforming to the S&I Framework's [[sdc|Structured Data Capture FHIR implementation guide]]. This role is responsible for defining maintaining a repository of data elements used in designing forms, profiles and templates in support of SDC use-cases, including the pre-population and auto-population of forms."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-de-registry"
assert inst.kind == "requirements"
assert inst.name == "SDC Data Element Manager"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The primary focus of the repository is the definition of [[DataElement]]s. However, [[ValueSet]]s must also be supported to allow definition of coded data elements. Some data elements will choose to maintain value sets as 'contained' resources, meaning the value set exists only in the context of the data element and cannot be referenced or maintained without also updating the data element. However, systems should support value set re-use across data elements. (Version-specific referencing can be used to avoid value sets from changing independent of the referencing [[Questionnaire]].)"
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing data elements"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known data element"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a data element"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a data element over time"
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new data element. Repositories requiring curation of submitted data elements may require all new data elements to have a status of 'draft'."
)
assert (
inst.rest[0].resource[0].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows maintaining data elements while creating and editing forms. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new data element (and potentially the retiring of the existing data element). Servers may also limit who can change particular data elements."
)
assert (
inst.rest[0].resource[0].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new data element or revision of an existing data element would be accepted based on validation and other business rules. Useful for some workflows"
)
assert (
inst.rest[0].resource[0].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[7].code == "delete"
assert (
inst.rest[0].resource[0].interaction[7].documentation
== "Allows removal of an existing data element. Servers may choose to not support deletions or may limit deletions to data elements meeting certain requirements. E.g. only elements with a status of draft or only elements that have been retired for at least two years, etc."
)
assert (
inst.rest[0].resource[0].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/valueset-sdc"
)
assert inst.rest[0].resource[0].searchInclude[0] == "DataElement.binding.valueSet"
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#category"
)
assert (
inst.rest[0].resource[0].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[0].name == "category"
assert inst.rest[0].resource[0].searchParam[0].type == "token"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#code"
)
assert (
inst.rest[0].resource[0].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[1].name == "code"
assert inst.rest[0].resource[0].searchParam[1].type == "token"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#date"
)
assert (
inst.rest[0].resource[0].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[2].name == "date"
assert inst.rest[0].resource[0].searchParam[2].type == "date"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#description"
)
assert (
inst.rest[0].resource[0].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[3].name == "description"
assert inst.rest[0].resource[0].searchParam[3].type == "string"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#identifier"
)
assert (
inst.rest[0].resource[0].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[4].name == "identifier"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#name"
)
assert (
inst.rest[0].resource[0].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[5].name == "name"
assert inst.rest[0].resource[0].searchParam[5].type == "string"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#publisher"
)
assert (
inst.rest[0].resource[0].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[6].name == "publisher"
assert inst.rest[0].resource[0].searchParam[6].type == "string"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#status"
)
assert (
inst.rest[0].resource[0].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[7].name == "status"
assert inst.rest[0].resource[0].searchParam[7].type == "token"
assert (
inst.rest[0].resource[0].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/dataelement#version"
)
assert (
inst.rest[0].resource[0].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[8].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[8].name == "version"
assert inst.rest[0].resource[0].searchParam[8].type == "string"
assert (
inst.rest[0].resource[0].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/11179-meaning"
)
assert (
inst.rest[0].resource[0].searchParam[9].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[9].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[9].name == "meaning"
assert inst.rest[0].resource[0].searchParam[9].type == "token"
assert (
inst.rest[0].resource[0].searchParam[10].definition
== "http://hl7.org/fhir/SearchParameter/11179-objectClass"
)
assert (
inst.rest[0].resource[0].searchParam[10].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[10].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[10].name == "objectClass"
assert inst.rest[0].resource[0].searchParam[10].type == "token"
assert (
inst.rest[0].resource[0].searchParam[11].definition
== "http://hl7.org/fhir/SearchParameter/11179-property"
)
assert (
inst.rest[0].resource[0].searchParam[11].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[11].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[11].name == "property"
assert inst.rest[0].resource[0].searchParam[11].type == "token"
assert inst.rest[0].resource[0].type == "DataElement"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing value sets for use in authoring data elements"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific value set referenced within a data element"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[2].code == "vread"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows retrieval of a historical version of a value set as referenced within a data element"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows review of changes to a value set over time"
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[4].code == "create"
assert (
inst.rest[0].resource[1].interaction[4].documentation
== "Allows definition of a new value set used by one or more data elements"
)
assert (
inst.rest[0].resource[1].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[5].code == "update"
assert (
inst.rest[0].resource[1].interaction[5].documentation
== "Allows existing value sets referenced by one or more data elements to be maintained"
)
assert (
inst.rest[0].resource[1].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[6].code == "validate"
assert (
inst.rest[0].resource[1].interaction[6].documentation
== "Allows verification that a value set is valid prior to submission - useful for some workflows."
)
assert (
inst.rest[0].resource[1].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[7].code == "delete"
assert (
inst.rest[0].resource[1].interaction[7].documentation
== "Not all servers will support deletion of value sets. Status change to 'retired' will be more typical, though deletion of draft value sets may keep repositories cleaner."
)
assert (
inst.rest[0].resource[1].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/valueset-sdc"
)
assert inst.rest[0].resource[1].searchInclude[0] == "ValueSet.compose.import"
assert (
inst.rest[0].resource[1].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/valueset#code"
)
assert (
inst.rest[0].resource[1].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[0].name == "code"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert (
inst.rest[0].resource[1].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/valueset#date"
)
assert (
inst.rest[0].resource[1].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[1].name == "date"
assert inst.rest[0].resource[1].searchParam[1].type == "date"
assert (
inst.rest[0].resource[1].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/valueset#description"
)
assert (
inst.rest[0].resource[1].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[2].name == "description"
assert inst.rest[0].resource[1].searchParam[2].type == "string"
assert (
inst.rest[0].resource[1].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/valueset#identifier"
)
assert (
inst.rest[0].resource[1].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[3].name == "identifier"
assert inst.rest[0].resource[1].searchParam[3].type == "token"
assert (
inst.rest[0].resource[1].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/valueset#name"
)
assert (
inst.rest[0].resource[1].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[4].name == "name"
assert inst.rest[0].resource[1].searchParam[4].type == "string"
assert (
inst.rest[0].resource[1].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/valueset#publisher"
)
assert (
inst.rest[0].resource[1].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[5].name == "publisher"
assert inst.rest[0].resource[1].searchParam[5].type == "string"
assert (
inst.rest[0].resource[1].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/valueset#reference"
)
assert (
inst.rest[0].resource[1].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[6].name == "reference"
assert inst.rest[0].resource[1].searchParam[6].type == "string"
assert (
inst.rest[0].resource[1].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/valueset#status"
)
assert (
inst.rest[0].resource[1].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[7].name == "status"
assert inst.rest[0].resource[1].searchParam[7].type == "token"
assert (
inst.rest[0].resource[1].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/valueset#system"
)
assert (
inst.rest[0].resource[1].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[8].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[8].name == "system"
assert inst.rest[0].resource[1].searchParam[8].type == "string"
assert (
inst.rest[0].resource[1].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/valueset#version"
)
assert (
inst.rest[0].resource[1].searchParam[9].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[9].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[9].name == "version"
assert inst.rest[0].resource[1].searchParam[9].type == "string"
assert inst.rest[0].resource[1].type == "ValueSet"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_10(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-form-archiver.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_10(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_10(inst2)
def impl_Conformance_10(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2015-09-03")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Form Archiver'' role when conforming to the S&I Framework's [[sdc.html|Structured Data Capture FHIR implementation guide]]. This role is responsible for persisting (archiving) completed or partially completed forms ([[QuestionnaireResponse]] resource instances). These instances may be submitted individually or in a bundle together with [[Provenance]] information providing details about the completion of the questionnaire response. In some cases [[Binary]] or [[DocumentReference]] resources might also be submitted to convey source information used in the population of the questionnaire response.<br>The focus of this role is on consuming form instances. Examples might be applications accepting insurance coverage forms, research forms, etc. There is no expectation that submitted form data is subsequently made available for retrieval (at least not in the same format)."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-form-archiver"
assert inst.kind == "requirements"
assert inst.name == "SDC Form Archiver"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The [[QuestionnaireResponse]] may be sent as a single instance or as a FHIR [[Bundle]] also containing [[Provenance]] resources providing details on the sources of information. A Bundle submission might also include [[Binary]] and/or [[DocumentReference]] instances referring to the data used to populate the form. A Form Archiver must support persisting, searching and retrieving those resources."
)
assert inst.rest[0].interaction[0].code == "transaction"
assert (
inst.rest[0].interaction[0].documentation
== "Allows submission of a [[QuestionnaireResponse]] together with [[Provenance]] and other supporting resources as a single unit of work."
)
assert (
inst.rest[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].mode == "client"
assert inst.rest[0].resource[0].interaction[0].code == "create"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows archiving (storing) a completed or partially-completed form"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "update"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows updating a previously archived form. (Systems may place rules on who can update forms and under what circumstances)."
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[2].code == "delete"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows removal of an archived form from a repository. Note that the removal may be logical rather than physical. Some systems may have rules for who can remove a submitted response and under what circumstances."
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-response"
)
assert inst.rest[0].resource[0].type == "QuestionnaireResponse"
assert inst.rest[0].resource[1].interaction[0].code == "create"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows storage of a binary (generally containing information used in the completion of a [[QuestionnaireResponse]]). The data might be in a variety of forms."
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[1].code == "update"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows updating a previously submitted binary data. (Systems may place rules on who can update binary data and under what circumstances)."
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[1].interaction[2].code == "delete"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows removal of binary data from a repository. Note that the removal may be logical rather than physical. Some systems may have rules for who can remove binary data and under what circumstances."
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[1].type == "Binary"
assert inst.rest[0].resource[2].interaction[0].code == "create"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Allows storage of a document reference (generally containing information used in the completion of a [[QuestionnaireResponse]])."
)
assert (
inst.rest[0].resource[2].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[1].code == "update"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Allows updating a previously submitted document reference. (Systems may place rules on who can update document references and under what circumstances)."
)
assert (
inst.rest[0].resource[2].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[1].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[2].interaction[2].code == "delete"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Allows removal of document references from a repository. Note that the removal may be logical rather than physical. Some systems may have rules for who can remove document references and under what circumstances."
)
assert (
inst.rest[0].resource[2].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[2].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[2].type == "DocumentReference"
assert inst.rest[0].resource[3].interaction[0].code == "create"
assert (
inst.rest[0].resource[3].interaction[0].documentation
== "Allows submitting a Provenance record associated with a particular [[QuestionnaireResponse]]."
)
assert (
inst.rest[0].resource[3].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].type == "Provenance"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_11(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-form-designer.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_11(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_11(inst2)
def impl_Conformance_11(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Form Designer'' role when conforming to the S&I Framework's [[sdc|Structured Data Capture FHIR implementation guide]]. This role is responsible for defining forms ([[Questionnaire]] resource instances) that include references to [[DataElement]] resouces which define the meaning of particular questions and can be used to aid in pre-populating and auto-populating forms."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-form-designer"
assert inst.kind == "requirements"
assert inst.name == "SDC Form Designer"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The [[Questionnaire]] resource is used to create and maintain SDC-compliant forms. The [[DataElement]] resource is used to look-up existing data elements that can be referenced in forms. Optionally, [[DataElement]]s can also be created and maintained in conjunction with form editing. This is an optional feature as not all environments will provide support for data element definitions from form authors. The [[ValueSet]] resource is used to capture allowed values for questions that are to be answered from a pre-defined list of values. For some forms, some or all of the referenced value sets will be handled as 'contained' resources, meaning the value set exists only in the context of the [[Questionnaire]] and cannot be referenced or maintained without also updating the form. However, systems should support value set re-use across questionnaires. (Version-specific referencing can be used to avoid value sets from changing independent of the referencing [[Questionnaire]].)"
)
assert inst.rest[0].mode == "client"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows discovery of existing questionnaires for editing"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific questionnaire by id"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "create"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows submission of a new form design"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[3].code == "update"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows revision of an existing form design. Note that certain types of updates may necessitate retiring the existing form and defining a new one."
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows review of changes to questionnaire over time"
)
assert (
inst.rest[0].resource[0].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[5].code == "vread"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows retrieval of a historical version of a questionnaire"
)
assert (
inst.rest[0].resource[0].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[6].code == "delete"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Not all servers will support deletion of forms. Status change to 'retired' will be more typical, though deletion of draft profiles may keep repositories cleaner."
)
assert (
inst.rest[0].resource[0].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[6].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[0].interaction[7].code == "validate"
assert (
inst.rest[0].resource[0].interaction[7].documentation
== "Allows verification that form is valid prior to submission - useful for some workflows."
)
assert (
inst.rest[0].resource[0].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-questionnaire"
)
assert inst.rest[0].resource[0].type == "Questionnaire"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing value sets for use by questions in a form"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific value set by id"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[2].code == "create"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows definition of a new value set used by one or more questions"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[3].code == "update"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows existing value sets referenced by a form to be maintained. Note that certain types of updates may necessitate retiring the existing value set and defining a new one."
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[4].documentation
== "Allows review of changes to a value set over time"
)
assert (
inst.rest[0].resource[1].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[5].code == "vread"
assert (
inst.rest[0].resource[1].interaction[5].documentation
== "Allows retrieval of a historical version of a value set"
)
assert (
inst.rest[0].resource[1].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[6].code == "delete"
assert (
inst.rest[0].resource[1].interaction[6].documentation
== "Not all servers will support deletion of value sets. Status change to 'retired' will be more typical, though deletion of draft value sets may keep repositories cleaner."
)
assert (
inst.rest[0].resource[1].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[6].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[1].interaction[7].code == "validate"
assert (
inst.rest[0].resource[1].interaction[7].documentation
== "Allows verification that a value set is valid prior to submission - useful for some workflows."
)
assert (
inst.rest[0].resource[1].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-valueset"
)
assert inst.rest[0].resource[1].type == "ValueSet"
assert inst.rest[0].resource[2].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Allows a user to search for existing data elements for re-use in a form design"
)
assert (
inst.rest[0].resource[2].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[1].code == "read"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Allows retrieval of data elements referenced in an existing form design"
)
assert (
inst.rest[0].resource[2].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[2].code == "vread"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Allows viewing of specific versions of a data element if the form references a specific version"
)
assert (
inst.rest[0].resource[2].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[2].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[2].interaction[3].documentation
== "Allows review of changes to a data element over time"
)
assert (
inst.rest[0].resource[2].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[3].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[4].code == "create"
assert (
inst.rest[0].resource[2].interaction[4].documentation
== "Allows defining new data elements for subsequent re-use while creating and editing forms"
)
assert (
inst.rest[0].resource[2].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[4].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[2].interaction[5].code == "update"
assert (
inst.rest[0].resource[2].interaction[5].documentation
== "Allows maintaining data elements while creating and editing forms. Note that certain types of updates may necessitate retiring the existing data element and defining a new one."
)
assert (
inst.rest[0].resource[2].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[5].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[2].interaction[6].code == "delete"
assert (
inst.rest[0].resource[2].interaction[6].documentation
== "Allows maintaining data elements while creating and editing forms. Note that not all servers will support deleting data elements."
)
assert (
inst.rest[0].resource[2].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[6].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[2].interaction[7].code == "validate"
assert (
inst.rest[0].resource[2].interaction[7].documentation
== "Allows maintaining data elements while creating and editing forms - user can check that proposed data element is valid prior to submission"
)
assert (
inst.rest[0].resource[2].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[2].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-element"
)
assert inst.rest[0].resource[2].type == "DataElement"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_12(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-form-filler.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_12(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_12(inst2)
def impl_Conformance_12(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Form Filler'' role when conforming to the S&I Framework's [[sdc|Structured Data Capture FHIR implementation guide]]. This role is responsible for retrieving pre-defined forms, requesting pre-population of forms and/or auto-populating forms, guiding the user through verifying populated data and submitting completed or partially-completed forms.<br/>Note that Form Fillers may also take on the role of [[conformance-sdc-form-archiver|Form Archiver]] if they have a requirement to retain the completed version of a form (and potentially the source data that was used to complete it)."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-form-filler"
assert inst.kind == "requirements"
assert inst.name == "SDC Form Filler"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The [[Questionnaire]] and [[ValueSet]] resources are retrieved to allow the system to guide the user through the entry process. The [[Binary]] and [[DocumentReference]] resources allow the system to find existing clinical documents that can be within the pre-population process. (Support for retrieval operations on these resources is optional as the relevant CDA or FHIR structures may also be directly generated by the ''Form Filler'' itself.) Finally, the [[QuestionnaireResponse]] resource is used to record the populated form."
)
assert inst.rest[0].mode == "client"
assert inst.rest[0].operation[0].definition.display == "Populate Questionnaire"
assert (
inst.rest[0].operation[0].definition.reference
== "http://hl7.org/fhir/OperationDefinition#questionnaire-populate"
)
assert (
inst.rest[0].operation[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].operation[0].extension[0].valueCode == "MAY"
assert inst.rest[0].operation[0].name == "populate"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows discovery of existing questionnaires to be completed"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific questionnaire by id. Allows systems to maintain a 'favorites' list of forms and retrieve them by id."
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows review of changes made to a questionnaire over time. Of interest to some systems, but probably not most."
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[0].interaction[3].code == "vread"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows retrieval of a historical version of a questionnaire. Most systems will make use of the current version only."
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-questionnaire"
)
assert inst.rest[0].resource[0].type == "Questionnaire"
assert inst.rest[0].resource[1].interaction[0].code == "read"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows retrieval of a specific value set by id (as referenced in a Questionnaire)"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "vread"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific version of a value set (as referenced in a Questionnaire)"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[2].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows review of changes to a value set over time. Of interest to some systems, but probably not most."
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-valueset"
)
assert inst.rest[0].resource[1].type == "ValueSet"
assert inst.rest[0].resource[2].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[2].interaction[0].documentation
== "Allows a user to search for existing completed or partially-completed forms. Generally used to find partially-completed forms for update."
)
assert (
inst.rest[0].resource[2].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[1].code == "create"
assert (
inst.rest[0].resource[2].interaction[1].documentation
== "Allows recording a completed or partially-completed form"
)
assert (
inst.rest[0].resource[2].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[2].code == "update"
assert (
inst.rest[0].resource[2].interaction[2].documentation
== "Allows updating an existing completed or partially-completed form. (Systems may place rules on who can update forms and under what circumstances.)"
)
assert (
inst.rest[0].resource[2].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[3].code == "delete"
assert (
inst.rest[0].resource[2].interaction[3].documentation
== "Allows removal of a completed form from a repository. Note that the removal may be logical rather than physical. Some systems may have rules for who can remove a completed form and under what circumstances."
)
assert (
inst.rest[0].resource[2].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[2].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[2].interaction[4].documentation
== "Allows review of prior versions of an answer set - allows reversion to previously recorded versions"
)
assert (
inst.rest[0].resource[2].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[4].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[2].interaction[5].code == "validate"
assert (
inst.rest[0].resource[2].interaction[5].documentation
== "Allows checking an answer set for validity against submission rules without persisting any data"
)
assert (
inst.rest[0].resource[2].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[2].interaction[5].extension[0].valueCode == "SHOULD"
assert (
inst.rest[0].resource[2].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-element"
)
assert inst.rest[0].resource[2].type == "QuestionnaireResponse"
assert inst.rest[0].resource[3].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[3].interaction[0].documentation
== "Allows discovery of existing documents that may be included in a form pre-population request"
)
assert (
inst.rest[0].resource[3].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[3].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[3].type == "DocumentReference"
assert inst.rest[0].resource[4].interaction[0].code == "read"
assert (
inst.rest[0].resource[4].interaction[0].documentation
== "Allows retrieval of a specific binary (as pointed to by a DocumentReference)"
)
assert (
inst.rest[0].resource[4].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[0].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[4].interaction[1].code == "vread"
assert (
inst.rest[0].resource[4].interaction[1].documentation
== "Allows retrieval of a historical version of a binary. In general, the most recent version would be appropriate, but some may prefer to use the specific version referenced by a DocumentReference."
)
assert (
inst.rest[0].resource[4].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[4].interaction[1].extension[0].valueCode == "MAY"
assert inst.rest[0].resource[4].type == "Binary"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_13(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-form-manager.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_13(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_13(inst2)
def impl_Conformance_13(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Form Manager'' role when conforming to the S&I Framework's [[sdc.html|Structured Data Capture FHIR implementation guide]]. This role is responsible for maintaining a repository of form definitions and also of performing pre-population of form data."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-form-manager"
assert inst.kind == "requirements"
assert inst.name == "SDC Form Manager"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert (
inst.rest[0].documentation
== "The primary focus of the repository is the definition of [[Questionnaires]]. However, [[ValueSet]]s must also be supported to allow definition of coded data elements. Some data elements will choose to maintain value sets as 'contained' resources, meaning the value set exists only in the context of the data element and cannot be referenced or maintained without also updating the data element. However, systems should support value set re-use across data elements. (Version-specific referencing can be used to avoid value sets from changing independent of the referencing [[Questionnaire]].)"
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].operation[0].definition.display == "Populate Questionnaire"
assert (
inst.rest[0].operation[0].definition.reference
== "http://hl7.org/fhir/OperationDefinition#questionnaire-populate"
)
assert (
inst.rest[0].operation[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].operation[0].extension[0].valueCode == "MAY"
assert inst.rest[0].operation[0].name == "populate"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing forms"
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known form"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a form"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a form over time"
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new form. Repositories requiring curation of submitted forms may require all new data elements to have a status of 'draft'."
)
assert (
inst.rest[0].resource[0].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows an existing form to be updated. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new questionnaire (and potentially the retiring of the existing questionnaire). Servers may also limit who can change particular forms."
)
assert (
inst.rest[0].resource[0].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "SHOULD. Allows a client to verify whether a particular new form or revision of an existing form would be accepted based on validation and other business rules. Useful for some workflows"
)
assert (
inst.rest[0].resource[0].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].interaction[7].code == "delete"
assert (
inst.rest[0].resource[0].interaction[7].documentation
== "Allows removal of an existing form. Servers may choose to not support deletions and instead require that the form's status be changed to 'retired'. Other systems support deletions but limit them to forms meeting certain requirements. E.g. only forms with a status of draft or only forms that have been retired for at least two years, etc."
)
assert (
inst.rest[0].resource[0].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-questionnaire"
)
assert (
inst.rest[0].resource[0].searchInclude[0]
== "Questionnaire.group.question.options"
)
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#code"
)
assert (
inst.rest[0].resource[0].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[0].name == "code"
assert inst.rest[0].resource[0].searchParam[0].type == "token"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#date"
)
assert (
inst.rest[0].resource[0].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[1].name == "date"
assert inst.rest[0].resource[0].searchParam[1].type == "date"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#identifier"
)
assert (
inst.rest[0].resource[0].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[2].name == "identifier"
assert inst.rest[0].resource[0].searchParam[2].type == "token"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#publisher"
)
assert (
inst.rest[0].resource[0].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[3].name == "publisher"
assert inst.rest[0].resource[0].searchParam[3].type == "string"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#status"
)
assert (
inst.rest[0].resource[0].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[4].name == "status"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#title"
)
assert (
inst.rest[0].resource[0].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[5].name == "title"
assert inst.rest[0].resource[0].searchParam[5].type == "string"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire#version"
)
assert (
inst.rest[0].resource[0].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[6].name == "version"
assert inst.rest[0].resource[0].searchParam[6].type == "string"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/questionnaire-deReference"
)
assert (
inst.rest[0].resource[0].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[7].name == "deReference"
assert inst.rest[0].resource[0].searchParam[7].type == "token"
assert inst.rest[0].resource[0].type == "Questionnaire"
assert inst.rest[0].resource[1].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Allows discovery of existing value sets for use in authoring questionnaires"
)
assert (
inst.rest[0].resource[1].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[1].code == "read"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Allows retrieval of a specific value set referenced within a questionnaire"
)
assert (
inst.rest[0].resource[1].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[2].code == "vread"
assert (
inst.rest[0].resource[1].interaction[2].documentation
== "Allows retrieval of a historical version of a value set as referenced within a questionnaire"
)
assert (
inst.rest[0].resource[1].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[1].interaction[3].documentation
== "Allows review of changes to a value set over time"
)
assert (
inst.rest[0].resource[1].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[4].code == "create"
assert (
inst.rest[0].resource[1].interaction[4].documentation
== "Allows definition of a new value set used by one or more questionnaires"
)
assert (
inst.rest[0].resource[1].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[5].code == "update"
assert (
inst.rest[0].resource[1].interaction[5].documentation
== "Allows existing value sets referenced by one or more questionnaires to be maintained"
)
assert (
inst.rest[0].resource[1].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].interaction[6].code == "validate"
assert (
inst.rest[0].resource[1].interaction[6].documentation
== "Allows verification that a value set is valid prior to submission - useful for some workflows."
)
assert (
inst.rest[0].resource[1].interaction[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[6].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[1].interaction[7].code == "delete"
assert (
inst.rest[0].resource[1].interaction[7].documentation
== "Not all servers will support deletion of value sets. Status change to 'retired' will be more typical, though deletion of draft value sets may keep repositories cleaner."
)
assert (
inst.rest[0].resource[1].interaction[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].interaction[7].extension[0].valueCode == "MAY"
assert (
inst.rest[0].resource[1].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-valueset"
)
assert inst.rest[0].resource[1].searchInclude[0] == "ValueSet.compose.import"
assert (
inst.rest[0].resource[1].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/valueset#code"
)
assert (
inst.rest[0].resource[1].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[0].name == "code"
assert inst.rest[0].resource[1].searchParam[0].type == "token"
assert (
inst.rest[0].resource[1].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/valueset#date"
)
assert (
inst.rest[0].resource[1].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[1].name == "date"
assert inst.rest[0].resource[1].searchParam[1].type == "date"
assert (
inst.rest[0].resource[1].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/valueset#description"
)
assert (
inst.rest[0].resource[1].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[2].name == "description"
assert inst.rest[0].resource[1].searchParam[2].type == "string"
assert (
inst.rest[0].resource[1].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/valueset#identifier"
)
assert (
inst.rest[0].resource[1].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[3].name == "identifier"
assert inst.rest[0].resource[1].searchParam[3].type == "token"
assert (
inst.rest[0].resource[1].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/valueset#name"
)
assert (
inst.rest[0].resource[1].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[4].name == "name"
assert inst.rest[0].resource[1].searchParam[4].type == "string"
assert (
inst.rest[0].resource[1].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/valueset#publisher"
)
assert (
inst.rest[0].resource[1].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[5].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[5].name == "publisher"
assert inst.rest[0].resource[1].searchParam[5].type == "string"
assert (
inst.rest[0].resource[1].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/valueset#reference"
)
assert (
inst.rest[0].resource[1].searchParam[6].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[6].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[6].name == "reference"
assert inst.rest[0].resource[1].searchParam[6].type == "string"
assert (
inst.rest[0].resource[1].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/valueset#status"
)
assert (
inst.rest[0].resource[1].searchParam[7].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[7].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[7].name == "status"
assert inst.rest[0].resource[1].searchParam[7].type == "token"
assert (
inst.rest[0].resource[1].searchParam[8].definition
== "http://hl7.org/fhir/SearchParameter/valueset#system"
)
assert (
inst.rest[0].resource[1].searchParam[8].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[8].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[8].name == "system"
assert inst.rest[0].resource[1].searchParam[8].type == "string"
assert (
inst.rest[0].resource[1].searchParam[9].definition
== "http://hl7.org/fhir/SearchParameter/valueset#version"
)
assert (
inst.rest[0].resource[1].searchParam[9].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[1].searchParam[9].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[1].searchParam[9].name == "version"
assert inst.rest[0].resource[1].searchParam[9].type == "string"
assert inst.rest[0].resource[1].type == "ValueSet"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_14(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-sdc-form-receiver.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_14(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_14(inst2)
def impl_Conformance_14(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert (
inst.contact[0].telecom[0].value
== "http://wiki.siframework.org/Structured+Data+Capture+Initiative"
)
assert inst.date == parse_date("2014-07-06")
assert (
inst.description
== "This profile defines the expected capabilities of the ''SDC Form Receiver'' role when conforming to the S&I Framework's [[sdc|Structured Data Capture FHIR implementation guide]]. This role is responsible for storing and returning completed and partially-completed forms."
)
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-sdc-form-receiver"
assert inst.kind == "requirements"
assert inst.name == "SDC Form Receiver"
assert inst.publisher == "U.S. Office of the National Coordinator (ONC)"
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing completed or partially-completed forms. Generally used to find partially-completed forms for update."
)
assert (
inst.rest[0].resource[0].interaction[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[1].code == "create"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows recording a completed or partially-completed form"
)
assert (
inst.rest[0].resource[0].interaction[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[2].code == "update"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows updating an existing completed or partially-completed form. (Systems may place rules on who can update forms and under what circumstances.)"
)
assert (
inst.rest[0].resource[0].interaction[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[3].code == "delete"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows removal of a completed form from a repository. Note that the removal may be logical rather than physical. Some systems may have rules for who can remove a completed form and under what circumstances."
)
assert (
inst.rest[0].resource[0].interaction[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[4].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows review of prior versions of an answer set - allows reversion to previously recorded versions"
)
assert (
inst.rest[0].resource[0].interaction[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].interaction[5].code == "validate"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows checking an answer set for validity against submission rules without persisting any data"
)
assert (
inst.rest[0].resource[0].interaction[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].interaction[5].extension[0].valueCode == "SHALL"
assert (
inst.rest[0].resource[0].profile.reference
== "http://hl7.org/fhir/StructureDefinition/sdc-element"
)
assert (
inst.rest[0].resource[0].searchInclude[0]
== "QuestionnaireResponse.questionnaire"
)
assert (
inst.rest[0].resource[0].searchInclude[1]
== "Questionnaire.group.question.options"
)
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#author"
)
assert (
inst.rest[0].resource[0].searchParam[0].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[0].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[0].name == "author"
assert inst.rest[0].resource[0].searchParam[0].type == "token"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#authored"
)
assert (
inst.rest[0].resource[0].searchParam[1].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[1].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[1].name == "authored"
assert inst.rest[0].resource[0].searchParam[1].type == "date"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#questionnaire"
)
assert (
inst.rest[0].resource[0].searchParam[2].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[2].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[2].name == "questionnaire"
assert inst.rest[0].resource[0].searchParam[2].type == "token"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#status"
)
assert (
inst.rest[0].resource[0].searchParam[3].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[3].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[3].name == "status"
assert inst.rest[0].resource[0].searchParam[3].type == "token"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#subject"
)
assert (
inst.rest[0].resource[0].searchParam[4].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[4].extension[0].valueCode == "SHALL"
assert inst.rest[0].resource[0].searchParam[4].name == "subject"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/questionnaireresponse#encounter"
)
assert (
inst.rest[0].resource[0].searchParam[5].extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-expectation"
)
assert inst.rest[0].resource[0].searchParam[5].extension[0].valueCode == "SHOULD"
assert inst.rest[0].resource[0].searchParam[5].name == "encounter"
assert inst.rest[0].resource[0].searchParam[5].type == "token"
assert inst.rest[0].resource[0].type == "QuestionnaireResponse"
assert (
inst.rest[0].security.description
== "Implementations must meet the general security requirements documented in the [[sdc-security|SDC implementation guide]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_15(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-terminology-server.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_15(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_15(inst2)
def impl_Conformance_15(inst):
assert inst.acceptUnknown == "both"
assert inst.contact[0].name == "FHIR Project"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://hl7.org/fhir"
assert inst.date == parse_date("2015-07-05")
assert (
inst.description
== "Basic conformance statement for a Terminology Server. A server can support more fucntionality than defined here, but this is the minimum amount"
)
assert (
inst.extension[0].url
== "http://hl7.org/fhir/StructureDefinition/conformance-supported-system"
)
assert inst.extension[0].valueUri == "http://loinc.org"
assert inst.fhirVersion == "1.0.2"
assert inst.format[0] == "json"
assert inst.format[1] == "xml"
assert inst.id == "conformance-terminology-server"
assert inst.kind == "capability"
assert inst.name == "Terminology Service Conformance Statement"
assert inst.publisher == "HL7, Inc"
assert inst.rest[0].documentation == "RESTful Terminology Server"
assert inst.rest[0].mode == "server"
assert (
inst.rest[0].operation[0].definition.reference
== "OperationDefinition/ValueSet-expand"
)
assert inst.rest[0].operation[0].name == "expand"
assert (
inst.rest[0].operation[1].definition.reference
== "OperationDefinition/ValueSet-lookup"
)
assert inst.rest[0].operation[1].name == "lookup"
assert (
inst.rest[0].operation[2].definition.reference
== "OperationDefinition/ValueSet-validate-code"
)
assert inst.rest[0].operation[2].name == "validate-code"
assert (
inst.rest[0].operation[3].definition.reference
== "OperationDefinition/ConceptMap-translate"
)
assert inst.rest[0].operation[3].name == "translate"
assert (
inst.rest[0].operation[4].definition.reference
== "OperationDefinition/ConceptMap-closure"
)
assert inst.rest[0].operation[4].name == "closure"
assert inst.rest[0].resource[0].interaction[0].code == "read"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Read allows clients to get the logical definitions of the value sets"
)
assert inst.rest[0].resource[0].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Search allows clients to find value sets on the server"
)
assert inst.rest[0].resource[0].profile.reference == "StructureDefinition/ValueSet"
assert (
inst.rest[0].resource[0].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-code"
)
assert inst.rest[0].resource[0].searchParam[0].name == "code"
assert inst.rest[0].resource[0].searchParam[0].type == "token"
assert (
inst.rest[0].resource[0].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-date"
)
assert inst.rest[0].resource[0].searchParam[1].name == "date"
assert inst.rest[0].resource[0].searchParam[1].type == "date"
assert (
inst.rest[0].resource[0].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-name"
)
assert inst.rest[0].resource[0].searchParam[2].name == "name"
assert inst.rest[0].resource[0].searchParam[2].type == "string"
assert (
inst.rest[0].resource[0].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-reference"
)
assert inst.rest[0].resource[0].searchParam[3].name == "reference"
assert inst.rest[0].resource[0].searchParam[3].type == "token"
assert (
inst.rest[0].resource[0].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-status"
)
assert inst.rest[0].resource[0].searchParam[4].name == "status"
assert inst.rest[0].resource[0].searchParam[4].type == "token"
assert (
inst.rest[0].resource[0].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-system"
)
assert inst.rest[0].resource[0].searchParam[5].name == "system"
assert inst.rest[0].resource[0].searchParam[5].type == "uri"
assert (
inst.rest[0].resource[0].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-url"
)
assert inst.rest[0].resource[0].searchParam[6].name == "url"
assert inst.rest[0].resource[0].searchParam[6].type == "uri"
assert (
inst.rest[0].resource[0].searchParam[7].definition
== "http://hl7.org/fhir/SearchParameter/ValueSet-version"
)
assert inst.rest[0].resource[0].searchParam[7].name == "version"
assert inst.rest[0].resource[0].searchParam[7].type == "token"
assert inst.rest[0].resource[0].type == "ValueSet"
assert inst.rest[0].resource[1].interaction[0].code == "read"
assert (
inst.rest[0].resource[1].interaction[0].documentation
== "Read allows clients to get the logical definitions of the concept maps"
)
assert inst.rest[0].resource[1].interaction[1].code == "search-type"
assert (
inst.rest[0].resource[1].interaction[1].documentation
== "Search allows clients to find concept maps on the server"
)
assert (
inst.rest[0].resource[1].profile.reference == "StructureDefinition/ConceptMap"
)
assert (
inst.rest[0].resource[1].searchParam[0].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-date"
)
assert inst.rest[0].resource[1].searchParam[0].name == "date"
assert inst.rest[0].resource[1].searchParam[0].type == "date"
assert (
inst.rest[0].resource[1].searchParam[1].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-name"
)
assert inst.rest[0].resource[1].searchParam[1].name == "name"
assert inst.rest[0].resource[1].searchParam[1].type == "string"
assert (
inst.rest[0].resource[1].searchParam[2].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-status"
)
assert inst.rest[0].resource[1].searchParam[2].name == "status"
assert inst.rest[0].resource[1].searchParam[2].type == "token"
assert (
inst.rest[0].resource[1].searchParam[3].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-source"
)
assert inst.rest[0].resource[1].searchParam[3].name == "source"
assert inst.rest[0].resource[1].searchParam[3].type == "uri"
assert (
inst.rest[0].resource[1].searchParam[4].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-target"
)
assert inst.rest[0].resource[1].searchParam[4].name == "target"
assert inst.rest[0].resource[1].searchParam[4].type == "uri"
assert (
inst.rest[0].resource[1].searchParam[5].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-url"
)
assert inst.rest[0].resource[1].searchParam[5].name == "url"
assert inst.rest[0].resource[1].searchParam[5].type == "uri"
assert (
inst.rest[0].resource[1].searchParam[6].definition
== "http://hl7.org/fhir/SearchParameter/ConceptMap-version"
)
assert inst.rest[0].resource[1].searchParam[6].name == "version"
assert inst.rest[0].resource[1].searchParam[6].type == "token"
assert inst.rest[0].resource[1].type == "ConceptMap"
assert inst.rest[0].security.cors == True
assert inst.rest[0].security.service[0].coding[0].code == "Certificates"
assert (
inst.rest[0].security.service[0].coding[0].system
== "http://hl7.org/fhir/restful-security-service"
)
assert inst.software.name == "ACME Terminology Server"
assert inst.status == "draft"
assert inst.text.status == "generated"
assert inst.url == "http://hl7.org/fhir/terminology-server"
def test_Conformance_16(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-uslaborder-orderer.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_16(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_16(inst2)
def impl_Conformance_16(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.hl7.org/"
assert inst.date == parse_date("2014-12-02")
assert (
inst.description
== "This profile defines the expected capabilities of the USLabOrder Orderer actor when conforming to the [[uslaborder.html|The US Laboratory Order Implementation (USLabOrder)]]. This actor is the originator of a laboratory test order request to the laboratory (order filler) and declares conformance to RESTful FHIR and FHIR profiles defined in this guide. The order reference one or more FHIR resources conforming to profiles outlined in the USLabOrder guide."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-uslaborder-orderer"
assert inst.kind == "requirements"
assert inst.name == "USLabOrder Orderer"
assert (
inst.publisher
== "Published by: HL7 Orders and Observation Workgroup. Primary Author: Eric Haas Health eData Inc"
)
assert (
inst.rest[0].documentation
== "This conformance resource assumes the USLabOrder Orderer is the server, in other words, operating in 'Pull' or 'Push/Pull' RESTful interface. The USLabOrder Orderer MUST support querying one or more resources outlined by the [[uslaborder|USLabOrder Guide]]. The USLabOrder Orderer MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabOrder. The USLabOrder Orderer MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticOrder over time"
)
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticOrder. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticOrder (and potentially the retiring of the existing DiagnosticOrder). Servers may also limit who can change particular DiagnosticOrder."
)
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticOrder or revision of an existing DiagnosticOrder would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[0].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[0].resource[0].searchInclude[0]
== "DiagnosticOrder.subject, DiagnosticOrder.orderer, DiagnosticOrder.supportingInformation, DiagnosticOrder.specimen, DiagnosticOrder.uslabcc"
)
assert inst.rest[0].resource[0].type == "DiagnosticOrder"
assert (
inst.rest[0].security.description
== "Implementations must meet the security requirements documented in the [[uslaborder|USLabOrder Guide assumptions]]."
)
assert (
inst.rest[1].documentation
== "The following conformance rules assumes the USLabOrder Orderer is the client, in other words, operating in 'Push' RESTful interface. The USLabOrder Orderer MUST support querying one or more resources outlined by the [[uslaborder|USLabOrder Guide]]. The USLabOrder Orderer MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabOrder. The USLabOrder Orderer MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[1].mode == "client"
assert inst.rest[1].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[1].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[1].code == "read"
assert (
inst.rest[1].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[2].code == "vread"
assert (
inst.rest[1].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[1].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticOrder over time"
)
assert inst.rest[1].resource[0].interaction[4].code == "create"
assert (
inst.rest[1].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[5].code == "update"
assert (
inst.rest[1].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticOrder. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticOrder (and potentially the retiring of the existing DiagnosticOrder). Servers may also limit who can change particular DiagnosticOrder."
)
assert inst.rest[1].resource[0].interaction[6].code == "validate"
assert (
inst.rest[1].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticOrder or revision of an existing DiagnosticOrder would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[1].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[1].resource[0].searchInclude[0]
== "DiagnosticOrder.subject, DiagnosticOrder.orderer, DiagnosticOrder.supportingInformation, DiagnosticOrder.specimen, DiagnosticOrder.uslabcc"
)
assert inst.rest[1].resource[0].type == "DiagnosticOrder"
assert (
inst.rest[1].security.description
== "Implementations must meet the security requirements documented in the [[uslaborder|USLabOrder Guide assumptions]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_17(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-uslaborder-receiver.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_17(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_17(inst2)
def impl_Conformance_17(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.hl7.org/"
assert inst.date == parse_date("2014-12-02")
assert (
inst.description
== "This profile defines the expected capabilities of the USLabOrder Receiver actor when conforming to the [[uslaborder.html|The US Receiver Order Implementation (USLabOrder)]]. This actor is the recipient/filler of a laboratory test order request and declares conformance to RESTful FHIR and FHIR profiles defined in this guide. The order reference one or more FHIR resources conforming to profiles outlined in the USLabOrder guide."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-uslaborder-receiver"
assert inst.kind == "requirements"
assert inst.name == "USLabOrder Receiver"
assert (
inst.publisher
== "Published by: HL7 Orders and Observation Workgroup. Primary Author: Eric Haas Health eData Inc"
)
assert (
inst.rest[0].documentation
== "This conformance resource assumes the USLabOrder Receiver is the server, in other words, operating in 'Pull' or 'Push/Pull' RESTful interface. The USLabOrder Receiver MUST support querying one or more resources outlined by the [[uslaborder|USLabOrder Guide]]. The USLabOrder Receiver MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabOrder. The USLabOrder Receiver MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticOrder over time"
)
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticOrder"
)
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticOrder. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticOrder (and potentially the retiring of the existing DiagnosticOrder). Servers may also limit who can change particular DiagnosticOrder."
)
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticOrder or revision of an existing DiagnosticOrder would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[0].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[0].resource[0].searchInclude[0]
== "DiagnosticOrder.subject, DiagnosticOrder.orderer, DiagnosticOrder.supportingInformation, DiagnosticOrder.specimen, DiagnosticOrder.uslabcc"
)
assert inst.rest[0].resource[0].type == "DiagnosticOrder"
assert (
inst.rest[0].security.description
== "Implementations must meet the security requirements documented in the [[uslaborder|USLabOrder Guide assumptions]]."
)
assert (
inst.rest[1].documentation
== "The following conformance rules assumes the USLabOrder Receiver is the client, in other words, operating in 'Push' RESTful interface. The USLabOrder Receiver MUST support querying one or more resources outlined by the [[uslaborder|USLabOrder Guide]]. The USLabOrder Receiver MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabOrder. The USLabOrder Receiver MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[1].mode == "client"
assert inst.rest[1].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[1].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[1].code == "read"
assert (
inst.rest[1].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[2].code == "vread"
assert (
inst.rest[1].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[1].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticOrder over time"
)
assert inst.rest[1].resource[0].interaction[4].code == "create"
assert (
inst.rest[1].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticOrder"
)
assert inst.rest[1].resource[0].interaction[5].code == "update"
assert (
inst.rest[1].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticOrder. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticOrder (and potentially the retiring of the existing DiagnosticOrder). Servers may also limit who can change particular DiagnosticOrder."
)
assert inst.rest[1].resource[0].interaction[6].code == "validate"
assert (
inst.rest[1].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticOrder or revision of an existing DiagnosticOrder would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[1].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[1].resource[0].searchInclude[0]
== "DiagnosticOrder.subject, DiagnosticOrder.orderer, DiagnosticOrder.supportingInformation, DiagnosticOrder.specimen, DiagnosticOrder.uslabcc"
)
assert inst.rest[1].resource[0].type == "DiagnosticOrder"
assert (
inst.rest[1].security.description
== "Implementations must meet the security requirements documented in the [[uslaborder|USLabOrder Guide assumptions]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_18(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-uslabreport-receiver.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_18(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_18(inst2)
def impl_Conformance_18(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.hl7.org/"
assert inst.date == parse_date("2014-12-02")
assert (
inst.description
== "This profile defines the expected capabilities of the USLabReport Receiver actor when conforming to the [[uslabreport.html|The US Receiver Report Implementation (USLabReport)]]. This actor is the receiver of a laboratory test report and declares conformance to RESTful FHIR and FHIR profiles defined in this guide. The order reference one or more FHIR resources conforming to profiles outlined in the USLabReport guide."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-uslabreport-receiver"
assert inst.kind == "requirements"
assert inst.name == "USLabReport Receiver"
assert (
inst.publisher
== "Published by: HL7 Orders and Observation Workgroup. Primary Author: Eric Haas Health eData Inc"
)
assert (
inst.rest[0].documentation
== "This conformance resource assumes the USLabReport Receiver is the server, in other words, operating in 'Pull' or 'Push/Pull' RESTful interface. The USLabReport Receiver MUST support querying one or more resources outlined by the [[uslabreport|USLabReport Guide]]. The USLabReport Receiver MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabReport. The USLabReport Receiver MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticReport over time"
)
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticReport. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticReport (and potentially the retiring of the existing DiagnosticReport). Servers may also limit who can change particular DiagnosticReport."
)
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticReport or revision of an existing DiagnosticReport would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[0].resource[0].profile.reference == "dr-uslab"
assert (
inst.rest[0].resource[0].searchInclude[0]
== "DiagnosticReport.subject, DiagnosticReport.performer, DiagnosticReport.request, DiagnosticReport.specimen, DiagnosticReport.report"
)
assert inst.rest[0].resource[0].type == "DiagnosticReport"
assert (
inst.rest[0].security.description
== "Implementations must meet the security requirements documented in the [[uslabreport|USLabReport Guide assumptions]]."
)
assert (
inst.rest[1].documentation
== "The following conformance rules assumes the USLabReport Receiver is the client, in other words, operating in 'Push' RESTful interface. The USLabReport Receiver MUST support querying one or more resources outlined by the [[uslabreport|USLabReport Guide]]. The USLabReport Receiver MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabReport. The USLabReport Receiver MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[1].mode == "client"
assert inst.rest[1].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[1].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[1].code == "read"
assert (
inst.rest[1].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[2].code == "vread"
assert (
inst.rest[1].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[1].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticReport over time"
)
assert inst.rest[1].resource[0].interaction[4].code == "create"
assert (
inst.rest[1].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[5].code == "update"
assert (
inst.rest[1].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticReport. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticReport (and potentially the retiring of the existing DiagnosticReport). Servers may also limit who can change particular DiagnosticReport."
)
assert inst.rest[1].resource[0].interaction[6].code == "validate"
assert (
inst.rest[1].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticReport or revision of an existing DiagnosticReport would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[1].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[1].resource[0].searchInclude[0]
== "DiagnosticReport.subject, DiagnosticReport.performer, DiagnosticReport.request, DiagnosticReport.specimen, DiagnosticReport.report"
)
assert inst.rest[1].resource[0].type == "DiagnosticReport"
assert (
inst.rest[1].security.description
== "Implementations must meet the security requirements documented in the [[uslabreport|USLabReport Guide assumptions]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
def test_Conformance_19(base_settings):
filename = (
base_settings["unittest_data_dir"]
/ "conformance-uslabreport-sender.canonical.json"
)
inst = conformance.Conformance.parse_file(
filename, content_type="application/json", encoding="utf-8"
)
assert "Conformance" == inst.resource_type
impl_Conformance_19(inst)
# testing reverse by generating data from itself and create again.
data = inst.dict()
assert "Conformance" == data["resourceType"]
inst2 = conformance.Conformance(**data)
impl_Conformance_19(inst2)
def impl_Conformance_19(inst):
assert inst.acceptUnknown == "extensions"
assert inst.contact[0].telecom[0].system == "other"
assert inst.contact[0].telecom[0].value == "http://www.hl7.org/"
assert inst.date == parse_date("2014-12-02")
assert (
inst.description
== "This profile defines the expected capabilities of the USLabReport Sender actor when conforming to the [[uslabreport.html|The US Sender Report Implementation (USLabReport)]]. This actor is the source of a laboratory test order report and declares conformance to RESTful FHIR and FHIR profiles defined in this guide. The order reference one or more FHIR resources conforming to profiles outlined in the USLabReport guide."
)
assert inst.fhirVersion == "1.0.0"
assert inst.format[0] == "xml"
assert inst.format[1] == "json"
assert inst.id == "conformance-uslabreport-sender"
assert inst.kind == "requirements"
assert inst.name == "USLabReport Sender"
assert (
inst.publisher
== "Published by: HL7 Orders and Observation Workgroup. Primary Author: Eric Haas Health eData Inc"
)
assert (
inst.rest[0].documentation
== "This conformance resource assumes the USLabReport Sender is the server, in other words, operating in 'Pull' or 'Push/Pull' RESTful interface. The USLabReport Sender MUST support querying one or more resources outlined by the [[uslabreport|USLabReport Guide]]. The USLabReport Sender MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabReport. The USLabReport Sender MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[0].mode == "server"
assert inst.rest[0].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[0].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[1].code == "read"
assert (
inst.rest[0].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[2].code == "vread"
assert (
inst.rest[0].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[0].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticReport over time"
)
assert inst.rest[0].resource[0].interaction[4].code == "create"
assert (
inst.rest[0].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticReport"
)
assert inst.rest[0].resource[0].interaction[5].code == "update"
assert (
inst.rest[0].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticReport. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticReport (and potentially the retiring of the existing DiagnosticReport). Servers may also limit who can change particular DiagnosticReport."
)
assert inst.rest[0].resource[0].interaction[6].code == "validate"
assert (
inst.rest[0].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticReport or revision of an existing DiagnosticReport would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[0].resource[0].profile.reference == "dr-uslab"
assert (
inst.rest[0].resource[0].searchInclude[0]
== "DiagnosticReport.subject, DiagnosticReport.performer, DiagnosticReport.request, DiagnosticReport.specimen, DiagnosticReport.report"
)
assert inst.rest[0].resource[0].type == "DiagnosticReport"
assert (
inst.rest[0].security.description
== "Implementations must meet the security requirements documented in the [[uslabreport|USLabReport Guide assumptions]]."
)
assert (
inst.rest[1].documentation
== "The following conformance rules assumes the USLabReport Sender is the client, in other words, operating in 'Push' RESTful interface. The USLabReport Sender MUST support querying one or more resources outlined by the [[uslabreport|USLabReport Guide]]. The USLabReport Sender MUST use all the vocabularies and value set constraints defined by the individual resource profiles used by USLabReport. The USLabReport Sender MUST implement REST behavior according to the [[http|FHIR specification]] and MUST be able to handle errors gracefully from Query Responders who may not support the submitted query."
)
assert inst.rest[1].mode == "client"
assert inst.rest[1].resource[0].interaction[0].code == "search-type"
assert (
inst.rest[1].resource[0].interaction[0].documentation
== "Allows a user to search for existing DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[1].code == "read"
assert (
inst.rest[1].resource[0].interaction[1].documentation
== "Allows retrieval of a specific known DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[2].code == "vread"
assert (
inst.rest[1].resource[0].interaction[2].documentation
== "Allows retrieval of a specific version of a DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[3].code == "history-instance"
assert (
inst.rest[1].resource[0].interaction[3].documentation
== "Allows review of changes to a DiagnosticReport over time"
)
assert inst.rest[1].resource[0].interaction[4].code == "create"
assert (
inst.rest[1].resource[0].interaction[4].documentation
== "Allows defining a new DiagnosticReport"
)
assert inst.rest[1].resource[0].interaction[5].code == "update"
assert (
inst.rest[1].resource[0].interaction[5].documentation
== "Allows editing of an existing DiagnosticReport. Servers may choose to prohibit certain types of edits, instead requiring the creation of a new DiagnosticReport (and potentially the retiring of the existing DiagnosticReport). Servers may also limit who can change particular DiagnosticReport."
)
assert inst.rest[1].resource[0].interaction[6].code == "validate"
assert (
inst.rest[1].resource[0].interaction[6].documentation
== "Allows a client to verify whether a particular new DiagnosticReport or revision of an existing DiagnosticReport would be accepted based on validation and other business rules. Useful for some workflows"
)
assert inst.rest[1].resource[0].profile.reference == "do-uslab"
assert (
inst.rest[1].resource[0].searchInclude[0]
== "DiagnosticReport.subject, DiagnosticReport.performer, DiagnosticReport.request, DiagnosticReport.specimen, DiagnosticReport.report"
)
assert inst.rest[1].resource[0].type == "DiagnosticReport"
assert (
inst.rest[1].security.description
== "Implementations must meet the security requirements documented in the [[uslabreport|USLabReport Guide assumptions]]."
)
assert inst.status == "draft"
assert inst.text.status == "generated"
| 47.374392
| 1,001
| 0.666168
| 123,268
| 1,002,679
| 5.416085
| 0.012996
| 0.140871
| 0.190426
| 0.20223
| 0.951391
| 0.947407
| 0.936902
| 0.874311
| 0.747104
| 0.514978
| 0
| 0.045306
| 0.178301
| 1,002,679
| 21,164
| 1,002
| 47.37663
| 0.765021
| 0.001264
| 0
| 0.384915
| 0
| 0.005516
| 0.28781
| 0.01922
| 0
| 0
| 0
| 0
| 0.449211
| 1
| 0.001807
| false
| 0
| 0.000333
| 0
| 0.00214
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
bf0ad733045536d8bfac571680bd5adf1392e1ee
| 31
|
py
|
Python
|
test/index2.py
|
ChenWei-python13/python13_001
|
8a9f9bba12044998a2ccb88e194c7c70827643c0
|
[
"MIT"
] | null | null | null |
test/index2.py
|
ChenWei-python13/python13_001
|
8a9f9bba12044998a2ccb88e194c7c70827643c0
|
[
"MIT"
] | null | null | null |
test/index2.py
|
ChenWei-python13/python13_001
|
8a9f9bba12044998a2ccb88e194c7c70827643c0
|
[
"MIT"
] | null | null | null |
def index2():
return "index3"
| 10.333333
| 16
| 0.677419
| 4
| 31
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0.16129
| 31
| 2
| 17
| 15.5
| 0.730769
| 0
| 0
| 0
| 0
| 0
| 0.193548
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0.5
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
bf1486068fe6f0a68be7d4d19c07464af9805a72
| 179
|
py
|
Python
|
scripts/conv_exp_hospital_section.py
|
wecacuee/modern-occupancy-grid
|
c1405847dd715aec25ba416667fa4999d99d5b72
|
[
"Apache-2.0"
] | 21
|
2015-03-14T16:24:38.000Z
|
2021-08-17T05:39:06.000Z
|
scripts/conv_exp_hospital_section.py
|
wecacuee/modern-occupancy-grid
|
c1405847dd715aec25ba416667fa4999d99d5b72
|
[
"Apache-2.0"
] | null | null | null |
scripts/conv_exp_hospital_section.py
|
wecacuee/modern-occupancy-grid
|
c1405847dd715aec25ba416667fa4999d99d5b72
|
[
"Apache-2.0"
] | 5
|
2015-08-10T02:02:14.000Z
|
2020-03-20T12:20:29.000Z
|
import convergence_experiment
def executables():
return convergence_experiment.executables("Data/hospital_section_player/",
2000)
| 35.8
| 78
| 0.625698
| 14
| 179
| 7.714286
| 0.785714
| 0.388889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03252
| 0.312849
| 179
| 4
| 79
| 44.75
| 0.845528
| 0
| 0
| 0
| 0
| 0
| 0.162011
| 0.162011
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 7
|
175549d716a4a0e717e7b91538930a8533d9aa0c
| 131
|
py
|
Python
|
tests/test_security.py
|
jaraco/jaraco.windows
|
e858172b4d5ee91233a8cc5319de99f17848f090
|
[
"MIT"
] | 21
|
2016-01-31T00:58:59.000Z
|
2021-05-06T22:30:56.000Z
|
tests/test_security.py
|
jaraco/jaraco.windows
|
e858172b4d5ee91233a8cc5319de99f17848f090
|
[
"MIT"
] | 14
|
2016-07-21T12:02:08.000Z
|
2021-08-06T03:07:54.000Z
|
tests/test_security.py
|
jaraco/jaraco.windows
|
e858172b4d5ee91233a8cc5319de99f17848f090
|
[
"MIT"
] | 5
|
2016-06-14T04:57:04.000Z
|
2021-05-06T22:30:57.000Z
|
from jaraco.windows import security
def test_get_security_attributes_for_user():
security.get_security_attributes_for_user()
| 21.833333
| 47
| 0.847328
| 18
| 131
| 5.666667
| 0.611111
| 0.215686
| 0.411765
| 0.470588
| 0.54902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099237
| 131
| 5
| 48
| 26.2
| 0.864407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 9
|
178b46a777718cdedb242223e3e034e792443a7a
| 284
|
py
|
Python
|
STEP 2: INPUT ANALYSIS/rd_parser.py
|
amalshehu/super-slang
|
611f785656aecbacf75ee34549b7053069e29cad
|
[
"MIT"
] | null | null | null |
STEP 2: INPUT ANALYSIS/rd_parser.py
|
amalshehu/super-slang
|
611f785656aecbacf75ee34549b7053069e29cad
|
[
"MIT"
] | null | null | null |
STEP 2: INPUT ANALYSIS/rd_parser.py
|
amalshehu/super-slang
|
611f785656aecbacf75ee34549b7053069e29cad
|
[
"MIT"
] | null | null | null |
from abstract_syntax_tree import Operator
from abstract_syntax_tree import Expression
from abstract_syntax_tree import NumericConstant
from abstract_syntax_tree import BinaryExpression
from abstract_syntax_tree import UnaryExpression
from lexer import Lexer
from lexer import Token
| 28.4
| 49
| 0.894366
| 38
| 284
| 6.421053
| 0.315789
| 0.245902
| 0.368852
| 0.45082
| 0.57377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105634
| 284
| 9
| 50
| 31.555556
| 0.96063
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
178bbf8b78c8d9136343ca56bfe0aadce8b9db47
| 4,340
|
py
|
Python
|
private_training/src/models.py
|
xiyueyiwan/private-ml-for-health
|
c77181d0628b3a04c411a01f7e402fccb4d34e09
|
[
"MIT"
] | 28
|
2020-11-01T09:19:37.000Z
|
2022-03-31T07:23:42.000Z
|
private_training/src/models.py
|
HongleGuo/private-ml-for-health
|
98b66920c659422bc963d70964f780b76fa67a48
|
[
"MIT"
] | 2
|
2021-03-19T11:39:04.000Z
|
2021-04-21T12:48:52.000Z
|
private_training/src/models.py
|
HongleGuo/private-ml-for-health
|
98b66920c659422bc963d70964f780b76fa67a48
|
[
"MIT"
] | 11
|
2021-03-17T02:28:08.000Z
|
2022-03-31T07:23:48.000Z
|
import torch
from torch import nn
import torch.nn.functional as F
class CNNMnistRelu(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 16, 8, 2, padding=3)
self.conv2 = nn.Conv2d(16, 32, 4, 2)
self.fc1 = nn.Linear(32 * 4 * 4, 32)
self.fc2 = nn.Linear(32, 10)
def forward(self, x):
# x of shape [B, 1, 28, 28]
x = F.relu(self.conv1(x)) # -> [B, 16, 14, 14]
x = F.max_pool2d(x, 2, 1) # -> [B, 16, 13, 13]
x = F.relu(self.conv2(x)) # -> [B, 32, 5, 5]
x = F.max_pool2d(x, 2, 1) # -> [B, 32, 4, 4]
x = x.view(-1, 32 * 4 * 4) # -> [B, 512]
x = F.relu(self.fc1(x)) # -> [B, 32]
x = self.fc2(x) # -> [B, 10]
return x
def name(self):
return "SampleConvNet"
class CNNMnistTanh(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 16, 8, 2, padding=3)
self.conv2 = nn.Conv2d(16, 32, 4, 2)
self.fc1 = nn.Linear(32 * 4 * 4, 32)
self.fc2 = nn.Linear(32, 10)
def forward(self, x):
# x of shape [B, 1, 28, 28]
x = torch.tanh(self.conv1(x)) # -> [B, 16, 14, 14]
x = F.max_pool2d(x, 2, 1) # -> [B, 16, 13, 13]
x = torch.tanh(self.conv2(x)) # -> [B, 32, 5, 5]
x = F.max_pool2d(x, 2, 1) # -> [B, 32, 4, 4]
x = x.view(-1, 32 * 4 * 4) # -> [B, 512]
x = torch.tanh(self.fc1(x)) # -> [B, 32]
x = self.fc2(x) # -> [B, 10]
return x
def name(self):
return "SampleConvNet"
class CNNFashion_MnistRelu(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 16, 8, 2, padding=3)
self.conv2 = nn.Conv2d(16, 32, 4, 2)
self.fc1 = nn.Linear(32 * 4 * 4, 32)
self.fc2 = nn.Linear(32, 10)
def forward(self, x):
# x of shape [B, 1, 28, 28]
x = F.relu(self.conv1(x)) # -> [B, 16, 14, 14]
x = F.max_pool2d(x, 2, 1) # -> [B, 16, 13, 13]
x = F.relu(self.conv2(x)) # -> [B, 32, 5, 5]
x = F.max_pool2d(x, 2, 1) # -> [B, 32, 4, 4]
x = x.view(-1, 32 * 4 * 4) # -> [B, 512]
x = F.relu(self.fc1(x)) # -> [B, 32]
x = self.fc2(x) # -> [B, 10]
return x
def name(self):
return "SampleConvNet"
class CNNFashion_MnistTanh(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(1, 16, 8, 2, padding=3)
self.conv2 = nn.Conv2d(16, 32, 4, 2)
self.fc1 = nn.Linear(32 * 4 * 4, 32)
self.fc2 = nn.Linear(32, 10)
def forward(self, x):
# x of shape [B, 1, 28, 28]
x = torch.tanh(self.conv1(x)) # -> [B, 16, 14, 14]
x = F.max_pool2d(x, 2, 1) # -> [B, 16, 13, 13]
x = torch.tanh(self.conv2(x)) # -> [B, 32, 5, 5]
x = F.max_pool2d(x, 2, 1) # -> [B, 32, 4, 4]
x = x.view(-1, 32 * 4 * 4) # -> [B, 512]
x = torch.tanh(self.fc1(x)) # -> [B, 32]
x = self.fc2(x) # -> [B, 10]
return x
def name(self):
return "SampleConvNet"
class CNNCifar10Relu(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 32, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(32, 32, 5)
self.fc1 = nn.Linear(32 * 5 * 5, 120)
self.fc2 = nn.Linear(120, 84)
self.fc3 = nn.Linear(84, 10)
def forward(self, x):
x = self.pool(F.relu(self.conv1(x)))
x = self.pool(F.relu(self.conv2(x)))
x = x.view(-1, 32 * 5 * 5)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x)
return F.log_softmax(x, dim=1)
class CNNCifar10Tanh(nn.Module):
def __init__(self):
super().__init__()
self.conv1 = nn.Conv2d(3, 32, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(32, 32, 5)
self.fc1 = nn.Linear(32 * 5 * 5, 120)
self.fc2 = nn.Linear(120, 84)
self.fc3 = nn.Linear(84, 10)
def forward(self, x):
x = self.pool(torch.tanh(self.conv1(x)))
x = self.pool(torch.tanh(self.conv2(x)))
x = x.view(-1, 32 * 5 * 5)
x = torch.tanh(self.fc1(x))
x = torch.tanh(self.fc2(x))
x = self.fc3(x)
return F.log_softmax(x, dim=1)
| 33.384615
| 59
| 0.485253
| 708
| 4,340
| 2.889831
| 0.086158
| 0.01955
| 0.02346
| 0.039101
| 0.926686
| 0.926686
| 0.907136
| 0.879765
| 0.879765
| 0.879765
| 0
| 0.134786
| 0.323041
| 4,340
| 130
| 60
| 33.384615
| 0.561607
| 0.121429
| 0
| 0.862385
| 0
| 0
| 0.013753
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.146789
| false
| 0
| 0.027523
| 0.036697
| 0.321101
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
179916d1ee778798660a5434898073478e3144df
| 123
|
py
|
Python
|
authz/controller/apiv1/__init__.py
|
nimatbt/Auth-Microservice
|
449fd7c3210822d6c59940f817c978fd1715a876
|
[
"Apache-2.0"
] | null | null | null |
authz/controller/apiv1/__init__.py
|
nimatbt/Auth-Microservice
|
449fd7c3210822d6c59940f817c978fd1715a876
|
[
"Apache-2.0"
] | null | null | null |
authz/controller/apiv1/__init__.py
|
nimatbt/Auth-Microservice
|
449fd7c3210822d6c59940f817c978fd1715a876
|
[
"Apache-2.0"
] | null | null | null |
from authz.controller.apiv1.user import UserController
from authz.controller.apiv1.auth import AuthController # 20-1 : 52'
| 41
| 67
| 0.821138
| 17
| 123
| 5.941176
| 0.705882
| 0.178218
| 0.376238
| 0.475248
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063063
| 0.097561
| 123
| 2
| 68
| 61.5
| 0.846847
| 0.081301
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
179df0b611d070b6af4a5c58a0153d93178e9b24
| 130
|
py
|
Python
|
integration/tests_failed/assert_invalid_predicate_type.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
integration/tests_failed/assert_invalid_predicate_type.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
integration/tests_failed/assert_invalid_predicate_type.py
|
jleverenz/hurl
|
b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3
|
[
"Apache-2.0"
] | null | null | null |
from app import app
@app.route("/error-assert-invalid-predicate-type")
def error_assert_invalid_predicate_type():
return ""
| 18.571429
| 50
| 0.761538
| 18
| 130
| 5.277778
| 0.611111
| 0.231579
| 0.378947
| 0.568421
| 0.652632
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 130
| 6
| 51
| 21.666667
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0.276923
| 0.276923
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.25
| true
| 0
| 0.25
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 10
|
bdd3392c9805ea00b623d3dcd51e99821c9113f2
| 16,366
|
py
|
Python
|
RobotFramework/inventories/production/connectivity_check_v2.py
|
dmmar/netascode
|
1d15e717b600d38bd33a65fa110e1c129d72e5df
|
[
"MIT"
] | 36
|
2019-07-17T17:00:32.000Z
|
2022-03-26T09:34:40.000Z
|
RobotFramework/inventories/test/connectivity_check_v2.py
|
dmmar/netascode
|
1d15e717b600d38bd33a65fa110e1c129d72e5df
|
[
"MIT"
] | 4
|
2021-03-31T19:16:53.000Z
|
2021-12-13T20:01:57.000Z
|
RobotFramework/inventories/development/connectivity_check_v2.py
|
dmmar/netascode
|
1d15e717b600d38bd33a65fa110e1c129d72e5df
|
[
"MIT"
] | 10
|
2019-07-31T07:58:03.000Z
|
2021-10-13T04:45:45.000Z
|
# Example
# -------
#
# connectivity_check_v2.py
from pyats import aetest
import re
import logging
# get your logger for your script
logger = logging.getLogger(__name__)
class CommonSetup(aetest.CommonSetup):
# CommonSetup-SubSec1
@aetest.subsection
def check_topology(
self,
testbed,
HQ_C1_name = 'HQ-C1',
HQ_C2_name = 'HQ-C2',
HQ_C3_name = 'HQ-C3',
HQ_C4_name = 'HQ-C4',
BR1_C1_name = 'BR1-C1',
BR2_C1_name = 'BR2-C1'):
HQ_C1 = testbed.devices[HQ_C1_name]
HQ_C2 = testbed.devices[HQ_C2_name]
HQ_C3 = testbed.devices[HQ_C3_name]
HQ_C4 = testbed.devices[HQ_C4_name]
BR1_C1 = testbed.devices[BR1_C1_name]
BR2_C1 = testbed.devices[BR2_C1_name]
# add them to testscript parameters
self.parent.parameters.update(
HQ_C1 = HQ_C1,
HQ_C2 = HQ_C2,
HQ_C3 = HQ_C3,
HQ_C4 = HQ_C4,
BR1_C1 = BR1_C1,
BR2_C1 = BR2_C1)
# CommonSetup-SubSec
@aetest.subsection
def establish_connections(self, steps, HQ_C1, HQ_C2, HQ_C3, HQ_C4, BR1_C1, BR2_C1):
with steps.start('Connecting to %s' % HQ_C1.name):
HQ_C1.connect()
with steps.start('Connecting to %s' % HQ_C2.name):
HQ_C2.connect()
with steps.start('Connecting to %s' % HQ_C3.name):
HQ_C3.connect()
with steps.start('Connecting to %s' % HQ_C4.name):
HQ_C4.connect()
with steps.start('Connecting to %s' % BR1_C1.name):
BR1_C1.connect()
with steps.start('Connecting to %s' % BR2_C1.name):
BR2_C1.connect()
@aetest.subsection
def setup_ip_addresses(self, steps, HQ_C1, HQ_C2, HQ_C3, HQ_C4, BR1_C1, BR2_C1):
with steps.start('Setup static IPv4 to %s' % HQ_C1.name):
HQ_C1.execute('ip 10.255.100.10/27 10.255.100.1')
with steps.start('Setup static IPv4 to %s' % HQ_C2.name):
HQ_C2.execute('ip 10.255.100.40/27 10.255.100.33')
with steps.start('Setup static IPv4 to %s' % HQ_C3.name):
HQ_C3.execute('ip 10.255.100.70/27 10.255.100.65')
with steps.start('Setup static IPv4 to %s' % HQ_C4.name):
HQ_C4.execute('ip 10.255.100.100/27 10.255.100.97')
with steps.start('Setup static IPv4 to %s' % BR1_C1.name):
BR1_C1.execute('ip 10.1.100.10/27 10.1.100.1')
with steps.start('Setup static IPv4 to %s' % BR2_C1.name):
BR2_C1.execute('ip 10.2.100.10/27 10.2.100.1')
# TestCases
class TESTCASE_1_PING_FROM_HQ_CLIENTS_TO_ISP(aetest.Testcase):
@aetest.test
def T1_PING_FROM_HQ_C1_TO_ISP(self, HQ_C1):
try:
result = HQ_C1.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T2_PING_FROM_HQ_C2_TO_ISP(self, HQ_C2):
try:
result = HQ_C2.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T3_PING_FROM_HQ_C3_TO_ISP(self, HQ_C3):
try:
result = HQ_C3.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto=['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T4_PING_FROM_HQ_C4_TO_ISP(self, HQ_C4):
try:
result = HQ_C4.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto=['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_2_PING_FROM_BR1_CLIENTS_TO_ISP(aetest.Testcase):
@aetest.test
def T1_PING_FROM_BR1_C1_TO_ISP(self, BR1_C1):
try:
result = BR1_C1.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_3_PING_FROM_BR2_CLIENTS_TO_ISP(aetest.Testcase):
@aetest.test
def T1_PING_FROM_BR2_C1_TO_ISP(self, BR2_C1):
try:
result = BR2_C1.execute('ping 8.8.8.8 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_4_PING_FROM_HQ_CLIENTS_TO_HQ_S1(aetest.Testcase):
@aetest.test
def T1_PING_FROM_HQ_C1_TO_HQ_S1(self, HQ_C1):
try:
result = HQ_C1.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T2_PING_FROM_HQ_C2_TO_HQ_S1(self, HQ_C2):
try:
result = HQ_C2.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T3_PING_FROM_HQ_C3_TO_HQ_S1(self, HQ_C3):
try:
result = HQ_C3.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto=['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T4_PING_FROM_HQ_C4_TO_HQ_S1(self, HQ_C4):
try:
result = HQ_C4.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto=['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_5_PING_FROM_BR1_CLIENTS_TO_HQ_S1(aetest.Testcase):
@aetest.test
def T1_PING_FROM_BR1_C1_TO_HQ_S1(self, BR1_C1):
try:
result = BR1_C1.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_6_PING_FROM_BR2_CLIENTS_TO_HQ_S1(aetest.Testcase):
@aetest.test
def T1_PING_FROM_BR2_C1_TO_HQ_S1(self, BR2_C1):
try:
result = BR2_C1.execute('ping 10.255.255.2 -c 5')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('timeout', result) or re.search('not reachable|unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
class TESTCASE_7_TRACEROUTE_FROM_HQ_CLIENTS_TO_ISP(aetest.Testcase):
@aetest.test
def T1_TRACE_FROM_HQ_C1_TO_ISP(self, HQ_C1):
try:
result = HQ_C1.execute('trace 8.8.8.8 -P 6')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('\* \* \*', result) or re.search('Destination host unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T2_TRACE_FROM_HQ_C2_TO_ISP(self, HQ_C2):
try:
result = HQ_C2.execute('trace 8.8.8.8 -P 6')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('\* \* \*', result) or re.search('Destination host unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T3_TRACE_FROM_HQ_C3_TO_ISP(self, HQ_C3):
try:
result = HQ_C3.execute('trace 8.8.8.8 -P 6')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('\* \* \*', result) or re.search('Destination host unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
@aetest.test
def T4_TRACE_FROM_HQ_C4_TO_ISP(self, HQ_C4):
try:
result = HQ_C4.execute('trace 8.8.8.8 -P 6')
except Exception as e:
self.failed('Something go wrong'.format(str(e)), goto = ['exit'])
else:
match = re.search('\* \* \*', result) or re.search('Destination host unreachable', result)
print('################')
print('Result is =>', result)
print('Math is =>', match)
print('################')
if match:
print('Math is => FIND', match)
print('################')
self.failed()
else:
print('Math is => NOT FIND')
print('################')
# CommonCleanup
class CommonCleanup(aetest.CommonCleanup):
@aetest.subsection
def disconnect(self, steps, HQ_C1, HQ_C2, HQ_C3, HQ_C4, BR1_C1, BR2_C1):
with steps.start('Disconnecting from %s' % HQ_C1.name):
HQ_C1.disconnect()
with steps.start('Disconnecting from %s' % HQ_C2.name):
HQ_C2.disconnect()
with steps.start('Disconnecting from %s' % HQ_C3.name):
HQ_C3.disconnect()
with steps.start('Disconnecting from %s' % HQ_C4.name):
HQ_C4.disconnect()
with steps.start('Disconnecting from %s' % BR1_C1.name):
BR1_C1.disconnect()
with steps.start('Disconnecting from %s' % BR2_C1.name):
BR2_C1.disconnect()
if __name__ == '__main__':
import argparse
from pyats.topology import loader
parser = argparse.ArgumentParser()
parser.add_argument('--testbed', dest = 'testbed',
type = loader.load)
args, unknown = parser.parse_known_args()
aetest.main(**vars(args))
| 35.811816
| 102
| 0.47782
| 1,872
| 16,366
| 4.015491
| 0.071581
| 0.05747
| 0.070241
| 0.038313
| 0.8675
| 0.835041
| 0.826527
| 0.7942
| 0.74684
| 0.712784
| 0
| 0.041858
| 0.334352
| 16,366
| 457
| 103
| 35.811816
| 0.648155
| 0.010448
| 0
| 0.707692
| 0
| 0
| 0.229225
| 0.01557
| 0
| 0
| 0
| 0
| 0
| 1
| 0.051282
| false
| 0
| 0.012821
| 0
| 0.087179
| 0.328205
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
bdfc585a059ae1427fc0724070b7abaac59657eb
| 11,205
|
py
|
Python
|
build/lib/agent/mapping.py
|
SAEONData/textfile-harvester
|
e166d4680d12e5fc9bbf1aeba375eefa9a8d34f4
|
[
"MIT"
] | null | null | null |
build/lib/agent/mapping.py
|
SAEONData/textfile-harvester
|
e166d4680d12e5fc9bbf1aeba375eefa9a8d34f4
|
[
"MIT"
] | null | null | null |
build/lib/agent/mapping.py
|
SAEONData/textfile-harvester
|
e166d4680d12e5fc9bbf1aeba375eefa9a8d34f4
|
[
"MIT"
] | null | null | null |
mapping = {
"ORIGIN": {"key": "XXXXX", "default": "ZZZZZ"},
"REQUEST_ID": {"key": "XXXXX", "default": "ZZZZZ"},
"LANDSAT_SCENE_ID": {"key": "XXXXX", "default": "ZZZZZ"},
"COLLECTION_NUMBER": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_DATE": {"key": "publicationYear", "default": "2018", 'slice': (0, 4)},
"STATION_ID": {"key": "XXXXX", "default": "ZZZZZ"},
"PROCESSING_SOFTWARE_VERSION": {"key": "XXXXX", "default": "ZZZZZ"},
"DATA_TYPE": {"key": "XXXXX", "default": "ZZZZZ"},
"COLLECTION_CATEGORY": {"key": "XXXXX", "default": "ZZZZZ"},
"ELEVATION_SOURCE": {"key": "XXXXX", "default": "ZZZZZ"},
"OUTPUT_FORMAT": {"key": "XXXXX", "default": "ZZZZZ"},
"SPACECRAFT_ID": {"key": "XXXXX", "default": "ZZZZZ"},
"SENSOR_ID": {"key": "XXXXX", "default": "ZZZZZ"},
"WRS_PATH": {"key": "XXXXX", "default": "ZZZZZ"},
"WRS_ROW": {"key": "XXXXX", "default": "ZZZZZ"},
"NADIR_OFFNADIR": {"key": "XXXXX", "default": "ZZZZZ"},
"TARGET_WRS_PATH": {"key": "XXXXX", "default": "ZZZZZ"},
"TARGET_WRS_ROW": {"key": "XXXXX", "default": "ZZZZZ"},
"DATE_ACQUIRED": {"key": "XXXXX", "default": "ZZZZZ"},
"SCENE_CENTER_TIME": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UL_LAT_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UL_LON_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UR_LAT_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UR_LON_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LL_LAT_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LL_LON_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LR_LAT_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LR_LON_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UL_PROJECTION_X_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UL_PROJECTION_Y_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UR_PROJECTION_X_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_UR_PROJECTION_Y_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LL_PROJECTION_X_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LL_PROJECTION_Y_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LR_PROJECTION_X_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"CORNER_LR_PROJECTION_Y_PRODUCT": {"key": "XXXXX", "default": "ZZZZZ"},
"PANCHROMATIC_LINES": {"key": "XXXXX", "default": "ZZZZZ"},
"PANCHROMATIC_SAMPLES": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTIVE_LINES": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTIVE_SAMPLES": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"FILE_NAME_BAND_QUALITY": {"key": "XXXXX", "default": "ZZZZZ"},
"METADATA_FILE_NAME": {"key": "XXXXX", "default": "ZZZZZ"},
"CPF_NAME": {"key": "XXXXX", "default": "ZZZZZ"},
"BPF_NAME_OLI": {"key": "XXXXX", "default": "ZZZZZ"},
"RLUT_FILE_NAME": {"key": "XXXXX", "default": "ZZZZZ"},
"CLOUD_COVER": {"key": "XXXXX", "default": "ZZZZZ"},
"CLOUD_COVER_LAND": {"key": "XXXXX", "default": "ZZZZZ"},
"IMAGE_QUALITY_OLI": {"key": "XXXXX", "default": "ZZZZZ"},
"ROLL_ANGLE": {"key": "XXXXX", "default": "ZZZZZ"},
"SUN_AZIMUTH": {"key": "XXXXX", "default": "ZZZZZ"},
"SUN_ELEVATION": {"key": "XXXXX", "default": "ZZZZZ"},
"EARTH_SUN_DISTANCE": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"SATURATION_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"TRUNCATION_OLI": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MAXIMUM_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MINIMUM_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MAXIMUM_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MINIMUM_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MAX_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"QUANTIZE_CAL_MIN_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_MULT_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"RADIANCE_ADD_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_MULT_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_1": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_2": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_3": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_4": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_5": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_6": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_7": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_8": {"key": "XXXXX", "default": "ZZZZZ"},
"REFLECTANCE_ADD_BAND_9": {"key": "XXXXX", "default": "ZZZZZ"},
"MAP_PROJECTION": {"key": "XXXXX", "default": "ZZZZZ"},
"DATUM": {"key": "XXXXX", "default": "ZZZZZ"},
"ELLIPSOID": {"key": "XXXXX", "default": "ZZZZZ"},
"UTM_ZONE": {"key": "XXXXX", "default": "ZZZZZ"},
"GRID_CELL_SIZE_PANCHROMATIC": {"key": "XXXXX", "default": "ZZZZZ"},
"GRID_CELL_SIZE_REFLECTIVE": {"key": "XXXXX", "default": "ZZZZZ"},
"ORIENTATION": {"key": "XXXXX", "default": "ZZZZZ"},
"RESAMPLING_OPTION": {"key": "XXXXX", "default": "ZZZZZ"},
}
| 65.145349
| 80
| 0.606336
| 1,296
| 11,205
| 4.897377
| 0.081019
| 0.211754
| 0.397038
| 0.529384
| 0.891602
| 0.825272
| 0.729794
| 0.169056
| 0
| 0
| 0
| 0.011781
| 0.136368
| 11,205
| 171
| 81
| 65.526316
| 0.644105
| 0
| 0
| 0
| 0
| 0
| 0.605533
| 0.197233
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
da1d3e26dcbffac081df77e68fb73f56543c180d
| 10,374
|
py
|
Python
|
testing/distributions/gamma_test.py
|
jnkm/MXFusion
|
cfe90d22b8359dbbdac23714c06fda150eb8851e
|
[
"Apache-2.0"
] | null | null | null |
testing/distributions/gamma_test.py
|
jnkm/MXFusion
|
cfe90d22b8359dbbdac23714c06fda150eb8851e
|
[
"Apache-2.0"
] | null | null | null |
testing/distributions/gamma_test.py
|
jnkm/MXFusion
|
cfe90d22b8359dbbdac23714c06fda150eb8851e
|
[
"Apache-2.0"
] | null | null | null |
import pytest
import mxnet as mx
import numpy as np
from mxfusion.components.variables.runtime_variable import add_sample_dimension, is_sampled_array, get_num_samples
from mxfusion.components.distributions import Gamma, GammaMeanVariance
from mxfusion.util.testutils import numpy_array_reshape
from mxfusion.util.testutils import MockMXNetRandomGenerator
@pytest.mark.usefixtures("set_seed")
class TestGammaDistribution(object):
@pytest.mark.parametrize("dtype, mean, mean_isSamples, variance, variance_isSamples, rv, rv_isSamples, num_samples", [
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(5,3,2)), True, 5),
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(3,2)), False, 5),
(np.float64, np.random.uniform(0,10,size=(2)), False, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(3,2)), False, 5),
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(5,3,2)), True, np.random.uniform(1,10,size=(5,3,2)), True, 5),
(np.float32, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(5,3,2)), True, 5),
])
def test_log_pdf_mean_variance(self, dtype, mean, mean_isSamples, variance, variance_isSamples,
rv, rv_isSamples, num_samples):
import scipy as sp
isSamples_any = any([mean_isSamples, variance_isSamples, rv_isSamples])
rv_shape = rv.shape[1:] if rv_isSamples else rv.shape
n_dim = 1 + len(rv.shape) if isSamples_any and not rv_isSamples else len(rv.shape)
mean_np = numpy_array_reshape(mean, mean_isSamples, n_dim)
variance_np = numpy_array_reshape(variance, variance_isSamples, n_dim)
rv_np = numpy_array_reshape(rv, rv_isSamples, n_dim)
beta_np = mean_np / variance_np
alpha_np = mean_np * beta_np
log_pdf_np = sp.stats.gamma.logpdf(rv_np, a=alpha_np, loc=0, scale=1./beta_np)
mean_mx = mx.nd.array(mean, dtype=dtype)
if not mean_isSamples:
mean_mx = add_sample_dimension(mx.nd, mean_mx)
variance_mx = mx.nd.array(variance, dtype=dtype)
if not variance_isSamples:
variance_mx = add_sample_dimension(mx.nd, variance_mx)
rv_mx = mx.nd.array(rv, dtype=dtype)
if not rv_isSamples:
rv_mx = add_sample_dimension(mx.nd, rv_mx)
gamma = GammaMeanVariance.define_variable(mean=mean_mx, variance=variance_mx, shape=rv_shape, dtype=dtype).factor
variables = {gamma.mean.uuid: mean_mx, gamma.variance.uuid: variance_mx, gamma.random_variable.uuid: rv_mx}
log_pdf_rt = gamma.log_pdf(F=mx.nd, variables=variables)
assert np.issubdtype(log_pdf_rt.dtype, dtype)
assert is_sampled_array(mx.nd, log_pdf_rt) == isSamples_any
if isSamples_any:
assert get_num_samples(mx.nd, log_pdf_rt) == num_samples
if np.issubdtype(dtype, np.float64):
rtol, atol = 1e-7, 1e-10
else:
rtol, atol = 1e-4, 1e-5
assert np.allclose(log_pdf_np, log_pdf_rt.asnumpy(), rtol=rtol, atol=atol)
@pytest.mark.parametrize(
"dtype, mean, mean_isSamples, variance, variance_isSamples, rv_shape, num_samples",[
(np.float64, np.random.rand(5,2), True, np.random.rand(2)+0.1, False, (3,2), 5),
(np.float64, np.random.rand(2), False, np.random.rand(5,2)+0.1, True, (3,2), 5),
(np.float64, np.random.rand(2), False, np.random.rand(2)+0.1, False, (3,2), 5),
(np.float64, np.random.rand(5,2), True, np.random.rand(5,3,2)+0.1, True, (3,2), 5),
(np.float32, np.random.rand(5,2), True, np.random.rand(2)+0.1, False, (3,2), 5),
])
def test_draw_samples_mean_variance(self, dtype, mean, mean_isSamples, variance,
variance_isSamples, rv_shape, num_samples):
n_dim = 1 + len(rv_shape)
out_shape = (num_samples,) + rv_shape
mean_np = mx.nd.array(np.broadcast_to(numpy_array_reshape(mean, mean_isSamples, n_dim), shape=out_shape), dtype=dtype)
variance_np = mx.nd.array(np.broadcast_to(numpy_array_reshape(variance, variance_isSamples, n_dim), shape=out_shape), dtype=dtype)
gamma = GammaMeanVariance.define_variable(shape=rv_shape, dtype=dtype).factor
mean_mx = mx.nd.array(mean, dtype=dtype)
if not mean_isSamples:
mean_mx = add_sample_dimension(mx.nd, mean_mx)
variance_mx = mx.nd.array(variance, dtype=dtype)
if not variance_isSamples:
variance_mx = add_sample_dimension(mx.nd, variance_mx)
variables = {gamma.mean.uuid: mean_mx, gamma.variance.uuid: variance_mx}
mx.random.seed(0)
rv_samples_rt = gamma.draw_samples(
F=mx.nd, variables=variables, num_samples=num_samples)
mx.random.seed(0)
beta_np = mean_np / variance_np
alpha_np = mean_np * beta_np
rv_samples_mx = mx.nd.random.gamma(alpha=alpha_np, beta=beta_np, dtype=dtype)
assert np.issubdtype(rv_samples_rt.dtype, dtype)
assert is_sampled_array(mx.nd, rv_samples_rt)
assert get_num_samples(mx.nd, rv_samples_rt) == num_samples
if np.issubdtype(dtype, np.float64):
rtol, atol = 1e-7, 1e-10
else:
rtol, atol = 1e-4, 1e-5
assert np.allclose(rv_samples_mx.asnumpy(), rv_samples_rt.asnumpy(), rtol=rtol, atol=atol)
@pytest.mark.parametrize("dtype, alpha, alpha_isSamples, beta, beta_isSamples, rv, rv_isSamples, num_samples", [
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(5,3,2)), True, 5),
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(3,2)), False, 5),
(np.float64, np.random.uniform(0,10,size=(2)), False, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(3,2)), False, 5),
(np.float64, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(5,3,2)), True, np.random.uniform(1,10,size=(5,3,2)), True, 5),
(np.float32, np.random.uniform(0,10,size=(5,2)), True, np.random.uniform(1,10,size=(2)), False, np.random.uniform(1,10,size=(5,3,2)), True, 5),
])
def test_log_pdf(self, dtype, alpha, alpha_isSamples, beta, beta_isSamples,
rv, rv_isSamples, num_samples):
import scipy as sp
isSamples_any = any([alpha_isSamples, beta_isSamples, rv_isSamples])
rv_shape = rv.shape[1:] if rv_isSamples else rv.shape
n_dim = 1 + len(rv.shape) if isSamples_any and not rv_isSamples else len(rv.shape)
alpha_np = numpy_array_reshape(alpha, alpha_isSamples, n_dim)
beta_np = numpy_array_reshape(beta, beta_isSamples, n_dim)
rv_np = numpy_array_reshape(rv, rv_isSamples, n_dim)
log_pdf_np = sp.stats.gamma.logpdf(rv_np, a=alpha_np, loc=0, scale=1./beta_np)
gamma = Gamma.define_variable(shape=rv_shape, dtype=dtype).factor
alpha_mx = mx.nd.array(alpha, dtype=dtype)
if not alpha_isSamples:
alpha_mx = add_sample_dimension(mx.nd, alpha_mx)
beta_mx = mx.nd.array(beta, dtype=dtype)
if not beta_isSamples:
beta_mx = add_sample_dimension(mx.nd, beta_mx)
rv_mx = mx.nd.array(rv, dtype=dtype)
if not rv_isSamples:
rv_mx = add_sample_dimension(mx.nd, rv_mx)
variables = {gamma.alpha.uuid: alpha_mx, gamma.beta.uuid: beta_mx, gamma.random_variable.uuid: rv_mx}
log_pdf_rt = gamma.log_pdf(F=mx.nd, variables=variables)
assert np.issubdtype(log_pdf_rt.dtype, dtype)
assert is_sampled_array(mx.nd, log_pdf_rt) == isSamples_any
if isSamples_any:
assert get_num_samples(mx.nd, log_pdf_rt) == num_samples
if np.issubdtype(dtype, np.float64):
rtol, atol = 1e-7, 1e-10
else:
rtol, atol = 1e-4, 1e-5
assert np.allclose(log_pdf_np, log_pdf_rt.asnumpy(), rtol=rtol, atol=atol)
@pytest.mark.parametrize(
"dtype, alpha, alpha_isSamples, beta, beta_isSamples, rv_shape, num_samples",[
(np.float64, np.random.rand(5,2), True, np.random.rand(2)+0.1, False, (3,2), 5),
(np.float64, np.random.rand(2), False, np.random.rand(5,2)+0.1, True, (3,2), 5),
(np.float64, np.random.rand(2), False, np.random.rand(2)+0.1, False, (3,2), 5),
(np.float64, np.random.rand(5,2), True, np.random.rand(5,3,2)+0.1, True, (3,2), 5),
(np.float32, np.random.rand(5,2), True, np.random.rand(2)+0.1, False, (3,2), 5),
])
def test_draw_samples(self, dtype, alpha, alpha_isSamples, beta,
beta_isSamples, rv_shape, num_samples):
n_dim = 1 + len(rv_shape)
out_shape = (num_samples,) + rv_shape
alpha_np = mx.nd.array(np.broadcast_to(numpy_array_reshape(alpha, alpha_isSamples, n_dim), shape=out_shape), dtype=dtype)
beta_np = mx.nd.array(np.broadcast_to(numpy_array_reshape(beta, beta_isSamples, n_dim), shape=out_shape), dtype=dtype)
gamma = Gamma.define_variable(shape=rv_shape, dtype=dtype).factor
alpha_mx = mx.nd.array(alpha, dtype=dtype)
if not alpha_isSamples:
alpha_mx = add_sample_dimension(mx.nd, alpha_mx)
beta_mx = mx.nd.array(beta, dtype=dtype)
if not beta_isSamples:
beta_mx = add_sample_dimension(mx.nd, beta_mx)
variables = {gamma.alpha.uuid: alpha_mx, gamma.beta.uuid: beta_mx}
mx.random.seed(0)
rv_samples_rt = gamma.draw_samples(
F=mx.nd, variables=variables, num_samples=num_samples)
mx.random.seed(0)
rv_samples_mx = mx.nd.random.gamma(alpha=alpha_np, beta=beta_np, dtype=dtype)
assert np.issubdtype(rv_samples_rt.dtype, dtype)
assert is_sampled_array(mx.nd, rv_samples_rt)
assert get_num_samples(mx.nd, rv_samples_rt) == num_samples
if np.issubdtype(dtype, np.float64):
rtol, atol = 1e-7, 1e-10
else:
rtol, atol = 1e-4, 1e-5
assert np.allclose(rv_samples_mx.asnumpy(), rv_samples_rt.asnumpy(), rtol=rtol, atol=atol)
| 55.774194
| 154
| 0.659726
| 1,639
| 10,374
| 3.973154
| 0.059793
| 0.061425
| 0.069103
| 0.04914
| 0.928286
| 0.917844
| 0.913544
| 0.913544
| 0.868704
| 0.855651
| 0
| 0.040792
| 0.201272
| 10,374
| 185
| 155
| 56.075676
| 0.745112
| 0
| 0
| 0.779874
| 0
| 0
| 0.032003
| 0
| 0
| 0
| 0
| 0
| 0.100629
| 1
| 0.025157
| false
| 0
| 0.056604
| 0
| 0.08805
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
da3c052d827df4f221b850a63a37fdfd5d5de8a3
| 124
|
py
|
Python
|
icevision/models/rcnn/mask_rcnn/fastai/__init__.py
|
lee00286/icevision
|
e696481fc01bd1b9411bcb7ea1853d9e47bb4d04
|
[
"Apache-2.0"
] | null | null | null |
icevision/models/rcnn/mask_rcnn/fastai/__init__.py
|
lee00286/icevision
|
e696481fc01bd1b9411bcb7ea1853d9e47bb4d04
|
[
"Apache-2.0"
] | null | null | null |
icevision/models/rcnn/mask_rcnn/fastai/__init__.py
|
lee00286/icevision
|
e696481fc01bd1b9411bcb7ea1853d9e47bb4d04
|
[
"Apache-2.0"
] | null | null | null |
from icevision.models.rcnn.mask_rcnn.fastai.callbacks import *
from icevision.models.rcnn.mask_rcnn.fastai.learner import *
| 41.333333
| 62
| 0.83871
| 18
| 124
| 5.666667
| 0.5
| 0.254902
| 0.372549
| 0.45098
| 0.72549
| 0.72549
| 0.72549
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 124
| 2
| 63
| 62
| 0.87931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 10
|
da4477c537ff7b8e857a6f5f890b92eb61efe7f8
| 4,486
|
py
|
Python
|
AML/HW3/utils/utils.py
|
ZRZ-Unknow/20fall-CourseNote
|
e20735fd1ca0949eaa1c50d5cd84f147ec714404
|
[
"MIT"
] | null | null | null |
AML/HW3/utils/utils.py
|
ZRZ-Unknow/20fall-CourseNote
|
e20735fd1ca0949eaa1c50d5cd84f147ec714404
|
[
"MIT"
] | null | null | null |
AML/HW3/utils/utils.py
|
ZRZ-Unknow/20fall-CourseNote
|
e20735fd1ca0949eaa1c50d5cd84f147ec714404
|
[
"MIT"
] | null | null | null |
import numpy as np
import os
from bidict import bidict
def load_data(shared_nums):
""" Return:
data: list, each of it is a numpy array of shape (k,321)
label: list, each of it is a numpy array of shape (k,)
"""
train_path, test_path = './Dataset/train/', './Dataset/test/'
train_data, train_data_label = [], []
test_data, test_data_label = [], []
label_dict = bidict()
label_num = 0
for file in os.listdir(train_path):
with open(train_path+file,'r') as f:
p = f.read().split('\n')
if '' in p:
p.remove('')
label_string = p[0]
tmp_x, tmp_y = [], []
for i in range(1,len(p)):
label = label_string[i-1]
if label not in label_dict.keys():
label_dict[label] = label_num
label_num += 1
tmp_y.append(label_dict[label])
nums = [int(j) for j in p[i].split()]
nums = nums[1:]
nums_ = []
for i in range(0, len(nums), shared_nums):
nums_.append( sum(nums[i:i+shared_nums]))
tmp_x.append(nums_)
train_data.append(np.array(tmp_x,dtype=int))
train_data_label.append(np.array(tmp_y,dtype=int))
for file in os.listdir(test_path):
with open(test_path+file,'r') as f:
p = f.read().split('\n')
if '' in p:
p.remove('')
assert len(p[0])==len(p)-1
label_string = p[0]
tmp_x, tmp_y = [], []
for i in range(1,len(p)):
label = label_string[i-1]
tmp_y.append(label_dict[label])
nums = [int(j) for j in p[i].split()]
nums = nums[1:]
nums_ = []
for i in range(0, len(nums), shared_nums):
nums_.append( sum(nums[i:i+shared_nums]))
tmp_x.append(nums_)
test_data.append(np.array(tmp_x,dtype=int))
test_data_label.append(np.array(tmp_y,dtype=int))
return train_data, train_data_label, test_data, test_data_label, label_dict
def load_data_c(shared_nums):
train_path, test_path = './Dataset/train/', './Dataset/test/'
train_data, train_data_label = [], []
test_data, test_data_label = [], []
label_dict = bidict()
label_num = 0
for file in os.listdir(train_path):
with open(train_path+file,'r') as f:
p = f.read().split('\n')
if '' in p:
p.remove('')
label_string = p[0]
tmp_x, tmp_y = [], []
for i in range(1,len(p)):
label = label_string[i-1]
if label not in label_dict.keys():
label_dict[label] = label_num
label_num += 1
tmp_y.append(label_dict[label])
nums = [int(j) for j in p[i].split()]
nums = nums[1:]
nums_ = []
for i in range(0, len(nums), shared_nums):
nums_.append( sum(nums[i:i+shared_nums]))
nums = nums_
add = np.zeros(10)
add[label_dict[label]] = 1
nums = np.hstack([nums,add])
tmp_x.append(nums)
train_data.append(np.array(tmp_x,dtype=int))
train_data_label.append(np.array(tmp_y,dtype=int))
for file in os.listdir(test_path):
with open(test_path+file,'r') as f:
p = f.read().split('\n')
if '' in p:
p.remove('')
assert len(p[0])==len(p)-1
label_string = p[0]
tmp_x, tmp_y = [], []
for i in range(1,len(p)):
label = label_string[i-1]
tmp_y.append(label_dict[label])
nums = [int(j) for j in p[i].split()]
nums = nums[1:]
nums_ = []
for i in range(0, len(nums), shared_nums):
nums_.append( sum(nums[i:i+shared_nums]))
nums = nums_
add = np.zeros(10)
add[label_dict[label]] = 1
nums = np.hstack([nums,add])
tmp_x.append(nums)
test_data.append(np.array(tmp_x,dtype=int))
test_data_label.append(np.array(tmp_y,dtype=int))
return train_data, train_data_label, test_data, test_data_label, label_dict
| 40.414414
| 79
| 0.494204
| 613
| 4,486
| 3.412724
| 0.107667
| 0.060229
| 0.022945
| 0.042065
| 0.949331
| 0.949331
| 0.949331
| 0.949331
| 0.949331
| 0.949331
| 0
| 0.013177
| 0.374053
| 4,486
| 111
| 80
| 40.414414
| 0.731838
| 0.026527
| 0
| 0.952381
| 0
| 0
| 0.017019
| 0
| 0
| 0
| 0
| 0
| 0.019048
| 1
| 0.019048
| false
| 0
| 0.028571
| 0
| 0.066667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
e57a53c6f5696d5a33e7d839ff2a9cb22bdedfb4
| 37,607
|
py
|
Python
|
signatureanalyzer/plotting/_muts.py
|
getzlab/getzlab-SignatureAnalyzer
|
19a00a73195ba011913eefb818997d98e8d7485e
|
[
"MIT"
] | 5
|
2021-11-23T16:19:22.000Z
|
2022-01-30T01:36:41.000Z
|
signatureanalyzer/plotting/_muts.py
|
getzlab/SignatureAnalyzer
|
19a00a73195ba011913eefb818997d98e8d7485e
|
[
"MIT"
] | 10
|
2021-11-06T16:49:58.000Z
|
2022-02-08T09:52:43.000Z
|
signatureanalyzer/plotting/_muts.py
|
getzlab/SignatureAnalyzer
|
19a00a73195ba011913eefb818997d98e8d7485e
|
[
"MIT"
] | 6
|
2021-11-09T04:34:15.000Z
|
2022-03-23T19:43:52.000Z
|
import itertools
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import seaborn as sns
import pandas as pd
from typing import Union
import numpy as np
import re
import sys
from ..utils import compl, sbs_annotation_converter
from ..context import context96, context78, context83, context1536, context_composite, signature_composite, signature_cosmic, signature_DBS, signature_ID, context_polymerase96
def stacked_bar(H: pd.DataFrame, ref_type: str, figsize: tuple = (8,8)):
"""
Plot stacked barchart & normalized stacked barchart.
--------------------------------------
Args:
* H: matrix output from NMF
* figsize: size of figure (int,int)
Returns:
* figure
Example usage:
plot_bar(H)
"""
H = H.iloc[:,:-3].copy()
# Map signature etiology
if ref_type in ['pcawg_COMPOSITE', 'pcawg_COMPOSITE96', 'pcawg_SBS', 'pcawg_SBS96_ID', 'pcawg_SBS_ID']:
H.columns = H.columns.map(lambda x: x[x.index('SBS') : x.index('_')]).map(signature_composite)
elif ref_type in ['cosmic3', 'cosmic3_exome']:
H.columns = H.columns.map(lambda x: x[x.index('SBS'):]).map(signature_cosmic)
elif ref_type == 'cosmic3_DBS':
H.columns = H.columns.map(lambda x: x[x.index('DBS'):]).map(signature_DBS)
elif ref_type == 'cosmic3_ID':
H.columns = H.columns.map(lambda x: x[x.index('ID'):]).map(signature_ID)
# Sort H matrix by mutation burden for relevant mutation type
H['sum'] = H.sum(1)
H = H.sort_values('sum', ascending=False)
fig,axes = plt.subplots(2,1,figsize=figsize, sharex=True)
H.iloc[:,:-1].plot(
kind='bar',
stacked=True,
ax=axes[0],
width=1.0,
rasterized=True
)
axes[0].set_xticklabels([])
axes[0].set_xticks([])
axes[0].set_ylabel('Counts', fontsize=20)
H_norm = H.iloc[:,:-1].div(H['sum'].values,axis=0)
H_norm.plot(
kind='bar',
stacked=True,
ax=axes[1],
width=1.0,
rasterized=True
)
axes[1].set_xticklabels([])
axes[1].set_xticks([])
axes[1].set_xlabel('Samples', fontsize=16)
axes[1].set_ylabel('Fractions', fontsize=20)
axes[1].get_legend().remove()
axes[1].set_ylim([0,1])
return fig
def _map_sbs_sigs_back(df: pd.DataFrame) -> pd.Series:
"""
Map Back Single-Base Substitution Signatures.
-----------------------
Args:
* df: pandas.core.frame.DataFrame with index to be mapped
Returns:
* pandas.core.series.Series with matching indices to context96
"""
def _check_to_flip(x, ref):
if x in ref:
return x
else:
return compl(x)
if df.index.name is None: df.index.name = 'index'
df_idx = df.index.name
if ">" in df.index[0]:
# Already in arrow format
context_s = df.reset_index()[df_idx].apply(sbs_annotation_converter)
else:
# Already in word format
context_s = df.reset_index()[df_idx]
return context_s.apply(lambda x: _check_to_flip(x, context96.keys()))
def _map_id_sigs_back(df: pd.DataFrame) -> pd.Series:
"""
Map Back Insertion-Deletion Signatures.
-----------------------
Args:
* df: pandas.core.frame.DataFrame with index to be mapped
Returns:
* pandas.core.series.Series with matching indices to context83
"""
if df.index.name is None: df.index.name = 'index'
df_idx = df.index.name
context_s = df.reset_index()[df_idx]
def _convert_from_cosmic(x):
if x in context83:
return x
i1, i2, i3, i4 = x.split('_')
pre = i2 if i3 == '1' else i3
main = i1.lower() + ('m' if i2 == 'MH' else '')
if main == 'del':
post = str(int(i4[0]) + 1) + i4[1:]
else:
post = i4
return pre + main + post
return context_s.apply(_convert_from_cosmic)
def signature_barplot(W: pd.DataFrame, contributions: Union[int, pd.Series] = 1):
"""
Plots signatures from W-matrix for Single-Base Substitutions
--------------------------------------
Args:
* W: W-matrix
* contributions: Series of total contributions, np.sum(H), from each
signature if W is normalized; else, 1
Returns:
* fig
Example usage:
signature_barplot(W, np.sum(H))
"""
W = W.copy()
W.index = _map_sbs_sigs_back(W)
# Fill in any missing contexts
for c in context96:
if c not in W.index:
W.loc[c] = 0
# Sort contexts
W.sort_index(inplace=True)
# Extract columns corresponding to signatures
sig_columns = [c for c in W if c.startswith('S')]
# Calculate total number of mutations at each context for every signature
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
# Determine number of signatures
n_sigs = len(sig_columns)
# Initialize SBS C>N and T>N mutations and their contexts
# For each context, iterate through C>N and T>N mutations, and take reverse complement
# of context for A>N mutations
context_label = []
change_map = {'CA': [], 'CG': [], 'CT': [], 'TA': [], 'TC': [], 'TG': []}
for p in itertools.product('ACGT', 'ACGT'):
context = ''.join(p)
# Reverse complement of context
compl_context = compl(context, reverse=True)
context_label.append('-'.join(context))
for key in change_map:
if key.startswith('C'):
change_map[key].append(key + context)
else:
# Complement of mutation + reverse complement of context
change_map[key].append(compl(key) + compl_context)
color_map = {'CA': 'cyan', 'CG': 'red', 'CT': 'yellow', 'TA': 'purple', 'TC': 'green', 'TG': 'blue'}
# Plot contributions
x_coords = range(16)
fig, axes = plt.subplots(nrows=n_sigs, ncols=6, figsize=(20, 2.5 * n_sigs), sharex='col', sharey='row')
for row, sig in enumerate(sig_columns):
for col, chg in enumerate(['CA', 'CG', 'CT', 'TA', 'TC', 'TG']):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row, col]
bar_heights = W[sig].loc[change_map[chg]]
ax.bar(x_coords, bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map[chg], rasterized=True)
ax.set_xlim(-.55, 15.55)
if row == 0:
ax.set_title('>'.join(chg), fontsize=18)
if col == 0:
ax.text(51.2 / 16, 1.3, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
ax.set_xticks(x_coords)
ax.set_xticklabels(context_label, fontfamily='monospace', rotation='vertical')
if col == 0:
ax.text(51.2 / 16, -.4, 'Motifs', transform=ax.transAxes, horizontalalignment='center', fontsize=20,
fontweight='bold')
if col > 0:
ax.tick_params(axis='y', length=0)
if col == 5:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment='center')
plt.subplots_adjust(wspace=.08, hspace=.15)
fig.text(.08, .5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
def signature_barplot_DBS(W, contributions):
"""
Plots signatures from W-matrix for Doublet-Base Substitutions
--------------------------------------
Args:
* W: W-matrix
* contributions: Series of total contributions, np.sum(H), from each
signature if W is normalized; else, 1
Returns:
* fig
Example usage:
signature_barplot_DBS(W, np.sum(H))
"""
W = W.copy()
for c in context78:
if c not in W.index:
W.loc[c] = 0
W.sort_index(inplace=True)
sig_columns = [c for c in W if c.startswith('S')]
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
n_sigs = len(sig_columns)
ref_map = {'AC': [], 'AT': [], 'CC': [], 'CG': [], 'CT': [], 'GC': [], 'TA': [], 'TC': [], 'TG': [], 'TT': []}
for x in W.index:
ref_map[x[:2]].append(x)
x_coords = {ref: range(len(sigs)) for ref, sigs in ref_map.items()}
color_map = {'AC': '#99CCFF', 'AT': '#0000FF', 'CC': '#CCFF99', 'CG': '#00FF00', 'CT': '#FF99CC',
'GC': '#FF0000', 'TA': '#FFCC99', 'TC': '#FF8000', 'TG': '#CC99FF', 'TT': '#8000FF'}
fig, axes = plt.subplots(nrows=n_sigs, ncols=10, figsize=(20, 2.5 * n_sigs), sharex='col',
sharey='row', gridspec_kw={'width_ratios': (3, 2, 3, 2, 3, 2, 2, 3, 3, 3)})
for row, sig in enumerate(sig_columns):
for col, ref in enumerate(ref_map):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row, col]
bar_heights = W[sig].loc[ref_map[ref]]
ax.bar(x_coords[ref], bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map[ref],
rasterized=True)
ax.set_xlim(-.55, x_coords[ref][-1] + .55)
if row == 0:
ax.set_title(ref)
if col == 0:
ax.text(44.5 / 6, 1.2, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = [x[3:] for x in ref_map[ref]]
ax.set_xticks(x_coords[ref])
ax.set_xticklabels(xlabels, fontfamily='monospace', rotation='vertical')
if col == 0:
ax.text(44.5 / 6, -.3, 'Motifs', transform=ax.transAxes, horizontalalignment='center', fontsize=20,
fontweight='bold')
if col > 0:
ax.tick_params(axis='y', length=0)
if col == 9:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment='center')
plt.subplots_adjust(wspace=.08, hspace=.15)
fig.text(.08, .5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
def signature_barplot_ID(W, contributions):
"""
Plots signatures from W-matrix for Insertions-Deletions
--------------------------------------
Args:
* W: W-matrix
* contributions: Series of total contributions, np.sum(H), from each
signature if W is normalized; else, 1
Returns:
* fig
Example usage:
signature_barplot_ID(W, np.sum(H))
"""
W = W.copy()
W.index = _map_id_sigs_back(W)
for c in context83:
if c not in W.index:
W.loc[c] = 0
W = W.loc[context83]
sig_columns = [c for c in W if c.startswith('S')]
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
n_sigs = len(sig_columns)
group_map = {'Cdel': [], 'Tdel': [], 'Cins': [], 'Tins': [],
'2del': [], '3del': [], '4del': [], '5+del': [],
'2ins': [], '3ins': [], '4ins': [], '5+ins': [],
'2delm': [], '3delm': [], '4delm': [], '5+delm': []}
for x in W.index:
group = re.search('.+?(?=[\d])', x).group(0)
group_map[group].append(x)
x_coords = {group: range(len(sigs)) for group, sigs in group_map.items()}
color_map = {'Cdel': '#FFCC99', 'Tdel': '#FF8000', 'Cins': '#00FF00', 'Tins': '#00BB00',
'2del': '#FF99CC', '3del': '#FF3377', '4del': '#FF0000', '5+del': '#880000',
'2ins': '#99CCFF', '3ins': '#3377FF', '4ins': '#0000FF', '5+ins': '#000088',
'2delm': '#CC99FF', '3delm': '#9966FF', '4delm': '#8000FF', '5+delm': '#6000AA'}
fig, axes = plt.subplots(nrows=n_sigs, ncols=16, figsize=(20, 2.5 * n_sigs), sharex='col',
sharey='row', gridspec_kw={'width_ratios': (6,) * 12 + (1, 2, 3, 5)})
for row, sig in enumerate(sig_columns):
for col, group in enumerate(group_map):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row, col]
bar_heights = W[sig].loc[group_map[group]]
ax.bar(x_coords[group], bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map[group],
rasterized=True)
ax.set_xlim(-.55, x_coords[group][-1] + .55)
if row == 0:
ax.set_title(re.search('[\d+CT]+', group).group(0), color=color_map[group])
if col == 0:
ax.text(44.5 / 6, 1.3, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if group == 'Tdel':
ax.text(-.02, 1.16, '1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map[group])
if group == 'Tins':
ax.text(-.02, 1.16, '1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map[group])
if group == '4del':
ax.text(-.02, 1.16, '>1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map[group])
if group == '4ins':
ax.text(-.02, 1.16, '>1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map[group])
if group == '4delm':
ax.text(.8, 1.16, '>1bp deletions with microhomology', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map[group])
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = [re.search('[\d+]+$', x).group(0) for x in group_map[group]]
ax.set_xticks(x_coords[group])
ax.set_xticklabels(xlabels, fontfamily='monospace')
if col == 0:
ax.text(44.5 / 6, -.3, 'Motifs', transform=ax.transAxes, horizontalalignment='center', fontsize=20,
fontweight='bold')
if col > 0:
ax.tick_params(axis='y', length=0)
if col == 15:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment='center')
plt.subplots_adjust(wspace=.08, hspace=.15)
fig.text(.08, .5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
def signature_barplot_composite(W: pd.DataFrame, contributions: Union[int, pd.Series] = 1):
"""
Plot signatures from W-matrix for SBS, DBS, and IDs from composite W matrix
--------------------------------------
Args:
* W: W-matrix
* contributions: Series of total contributions, np.sum(H), from each
signature if W is normalized; else, 1
Returns:
* fig
Example usage:
signature_barplot(W, np.sum(H))
"""
W = W.copy()
# Fill in missing features
composite_index = list(context96)+list(context78)+list(context83)
for c in composite_index:
if c not in list(W.index):
W.loc[c] = 0
W = W.reindex(composite_index)
# Get signature labels
sig_columns = [c for c in W if c.startswith('S')]
n_sigs = len(sig_columns)
# Evaluate contributions
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
#### x coordinates for SBS contributions
context_label = []
change_map = {'CA': [], 'CG': [], 'CT': [], 'TA': [], 'TC': [], 'TG': []}
for p in itertools.product('ACGT', 'ACGT'):
context = ''.join(p)
compl_context = compl(context, reverse=True)
context_label.append('-'.join(context))
for key in change_map:
if key.startswith('C'):
change_map[key].append(key + context)
else:
change_map[key].append(compl(key) + compl_context)
color_map_sbs = {'CA': 'cyan', 'CG': 'red', 'CT': 'yellow', 'TA': 'purple', 'TC': 'green', 'TG': 'blue'}
x_coords_sbs = range(16)
##### x coordinates for DBS contributions
ref_map = {'AC': [], 'AT': [], 'CC': [], 'CG': [], 'CT': [], 'GC': [], 'TA': [], 'TC': [], 'TG': [], 'TT': []}
for x in context78:
ref_map[x[:2]].append(x)
x_coords_dbs = {ref: range(len(sigs)) for ref, sigs in ref_map.items()}
color_map_dbs = {'AC': '#99CCFF', 'AT': '#0000FF', 'CC': '#CCFF99', 'CG': '#00FF00', 'CT': '#FF99CC',
'GC': '#FF0000', 'TA': '#FFCC99', 'TC': '#FF8000', 'TG': '#CC99FF', 'TT': '#8000FF'}
##### x coordinates for ID contributions
group_map = {'Cdel': [], 'Tdel': [], 'Cins': [], 'Tins': [],
'2del': [], '3del': [], '4del': [], '5+del': [],
'2ins': [], '3ins': [], '4ins': [], '5+ins': [],
'2delm': [], '3delm': [], '4delm': [], '5+delm': []}
for x in context83:
group = re.search('.+?(?=[\d])', x).group(0)
group_map[group].append(x)
x_coords_id = {group: range(len(sigs)) for group, sigs in group_map.items()}
color_map_id = {'Cdel': '#FFCC99', 'Tdel': '#FF8000', 'Cins': '#00FF00', 'Tins': '#00BB00',
'2del': '#FF99CC', '3del': '#FF3377', '4del': '#FF0000', '5+del': '#880000',
'2ins': '#99CCFF', '3ins': '#3377FF', '4ins': '#0000FF', '5+ins': '#000088',
'2delm': '#CC99FF', '3delm': '#9966FF', '4delm': '#8000FF', '5+delm': '#6000AA'}
# Include spaces to separate feature types
all_columns = ['CA', 'CG', 'CT', 'TA', 'TC', 'TG'] + ['space'] + list(ref_map) + ['space'] + list(group_map)
fig, axes = plt.subplots(nrows=n_sigs, ncols=34, figsize=(60,2.5*n_sigs), sharex='col',
gridspec_kw={'width_ratios': (16,)*6 + (1,)+ (9,6,9,6,9,6,6,9,9,9) + (1,) + (6,)*12+(1,2,3,5)})
max_height = 0 # Maximum height for scaling y-axis per feature type per signature
# Iterate through signatures, such that each row plots mutational landscape for a signature
for row, sig in enumerate(sig_columns):
for col, ref in enumerate(all_columns):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row,col]
if col in [6,17]: # Space between feature types...Remove ax and move to next feature (column)
ax.remove()
continue
# For SBS portion, iterate through 6 SNV types (C>A, C>T, C>G, T>A...)
if col < 6:
bar_heights = W[sig].loc[change_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_sbs, bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_sbs[ref], rasterized=True)
ax.set_xlim(-.55, 15.55)
if row == 0:
ax.set_title('>'.join(ref), fontsize=18)
if col == 0:
ax.text(8.1, 1.3, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0, labelbottom=False)
else:
ax.set_xticks(x_coords_sbs)
ax.set_xticklabels(context_label, fontfamily='monospace', rotation='vertical')
if col == 0:
ax.text(8.1, -.4, 'Motifs', transform = ax.transAxes, horizontalalignment='center', fontsize=20)
if col == 5:
if n_sigs == 1:
for axis in axes[:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
# For DBS portion
elif col < 17:
bar_heights = W[sig].loc[ref_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_dbs[ref], bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_dbs[ref],
rasterized=True)
ax.set_xlim(-.55, x_coords_dbs[ref][-1] + .55)
if row == 0:
ax.set_title(ref)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = [x[3:] for x in ref_map[ref]]
ax.set_xticks(x_coords_dbs[ref])
ax.set_xticklabels(xlabels, fontfamily='monospace', rotation='vertical')
if col == 15:
if n_sigs == 1:
for axis in axes[6:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,6:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
# For ID portion
else:
bar_heights = W[sig].loc[group_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_id[ref], bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_id[ref],
rasterized=True)
ax.set_xlim(-.55, x_coords_id[ref][-1] + .55)
if row == 0:
ax.set_title(re.search('[\d+CT]+', ref).group(0), color=color_map_id[ref])
if ref == 'Tdel':
ax.text(-.02, 1.16, '1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == 'Tins':
ax.text(-.02, 1.16, '1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4del':
ax.text(-.02, 1.16, '>1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4ins':
ax.text(-.02, 1.16, '>1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4delm':
ax.text(.8, 1.16, '>1bp deletions with microhomology', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = [re.search('[\d+]+$', x).group(0) for x in group_map[ref]]
ax.set_xticks(x_coords_id[ref])
ax.set_xticklabels(xlabels, fontfamily='monospace')
if col == 33:
if n_sigs == 1:
for axis in axes[16:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,16:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
if col not in [0,7,18]:
ax.tick_params(axis='y', which='both',length=0, labelleft=False)
if col == 33:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment='center')
# Set titles and organize plot
plt.subplots_adjust(wspace=.12, hspace=.15)
fig.text(.105, .5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
def signature_barplot_sbs_id(W: pd.DataFrame, contributions: Union[int, pd.Series] = 1):
"""
Plot signatures from W-matrix for SBS, DBS, and IDs from composite W matrix
--------------------------------------
Args:
* W: W-matrix
* contributions: Series of total contributions, np.sum(H), from each
signature if W is normalized; else, 1
Returns:
* fig
Example usage:
signature_barplot(W, np.sum(H))
"""
W = W.copy()
# Fill in missing features and sort
composite_index = list(context96)+list(context83)
for c in composite_index:
if c not in list(W.index):
W.loc[c] = 0
W = W.reindex(composite_index)
# Get signature labels
sig_columns = [c for c in W if c.startswith('S')]
n_sigs = len(sig_columns)
# Evaluate contributions
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
#### x coordinates for SBS contributions
context_label = []
change_map = {'CA': [], 'CG': [], 'CT': [], 'TA': [], 'TC': [], 'TG': []}
for p in itertools.product('ACGT', 'ACGT'):
context = ''.join(p)
compl_context = compl(context, reverse=True)
context_label.append('-'.join(context))
for key in change_map:
if key.startswith('C'):
change_map[key].append(key + context)
else:
change_map[key].append(compl(key) + compl_context)
color_map_sbs = {'CA': 'cyan', 'CG': 'red', 'CT': 'yellow', 'TA': 'purple', 'TC': 'green', 'TG': 'blue'}
x_coords_sbs = range(16)
##### x coordinates for ID contributions
group_map = {'Cdel': [], 'Tdel': [], 'Cins': [], 'Tins': [],
'2del': [], '3del': [], '4del': [], '5+del': [],
'2ins': [], '3ins': [], '4ins': [], '5+ins': [],
'2delm': [], '3delm': [], '4delm': [], '5+delm': []}
for x in context83:
group = re.search('.+?(?=[\d])', x).group(0)
group_map[group].append(x)
x_coords_id = {group: range(len(sigs)) for group, sigs in group_map.items()}
color_map_id = {'Cdel': '#FFCC99', 'Tdel': '#FF8000', 'Cins': '#00FF00', 'Tins': '#00BB00',
'2del': '#FF99CC', '3del': '#FF3377', '4del': '#FF0000', '5+del': '#880000',
'2ins': '#99CCFF', '3ins': '#3377FF', '4ins': '#0000FF', '5+ins': '#000088',
'2delm': '#CC99FF', '3delm': '#9966FF', '4delm': '#8000FF', '5+delm': '#6000AA'}
all_columns = ['CA', 'CG', 'CT', 'TA', 'TC', 'TG'] + ['space'] + list(group_map)
fig, axes = plt.subplots(nrows=n_sigs, ncols=23, figsize=(60,2.5*n_sigs), sharex='col',
gridspec_kw={'width_ratios': (16,)*6 + (1,) + (6,)*12+(1,2,3,5)})
max_height = 0
for row, sig in enumerate(sig_columns):
for col, ref in enumerate(all_columns):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row,col]
if col == 6:
ax.remove()
continue
# For SBS portion
if col < 6:
bar_heights = W[sig].loc[change_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_sbs, bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_sbs[ref], rasterized=True)
ax.set_xlim(-.55, 15.55)
if row == 0:
ax.set_title('>'.join(ref), fontsize=18)
if col == 0:
ax.text(5.5, 1.3, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0, labelbottom=False)
else:
ax.set_xticks(x_coords_sbs)
ax.set_xticklabels(context_label, fontfamily='monospace', rotation='vertical')
if col == 0:
ax.text(5.5, -.4, 'Motifs', transform = ax.transAxes, horizontalalignment='center', fontsize=20)
if col == 5:
if n_sigs == 1:
for axis in axes[:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
# For ID portion
else:
bar_heights = W[sig].loc[group_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_id[ref], bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_id[ref],
rasterized=True)
ax.set_xlim(-.55, x_coords_id[ref][-1] + .55)
if row == 0:
ax.set_title(re.search('[\d+CT]+', ref).group(0), color=color_map_id[ref])
if ref == 'Tdel':
ax.text(-.02, 1.16, '1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == 'Tins':
ax.text(-.02, 1.16, '1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4del':
ax.text(-.02, 1.16, '>1bp deletions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4ins':
ax.text(-.02, 1.16, '>1bp insertions at repeats', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if ref == '4delm':
ax.text(.8, 1.16, '>1bp deletions with microhomology', fontsize=10, transform=ax.transAxes,
horizontalalignment='center', color=color_map_id[ref])
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = [re.search('[\d+]+$', x).group(0) for x in group_map[ref]]
ax.set_xticks(x_coords_id[ref])
ax.set_xticklabels(xlabels, fontfamily='monospace')
if col == 22:
if n_sigs == 1:
for axis in axes[6:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,6:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
if col not in [0,7]:
ax.tick_params(axis='y', which='both',length=0, labelleft=False)
if col == 22:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment='center')
# Set titles and organize plot
plt.subplots_adjust(wspace=.12, hspace=.15)
fig.text(.105, .5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
def signature_barplot_polymerase(W: pd.DataFrame, contributions: Union[int, pd.Series] = 1):
W = W.copy()
# Fill in missing features
for c in context_polymerase96:
if c not in list(W.index):
W.loc[c] = 0
W = W.reindex(context_polymerase96)
# Get signature labels
sig_columns = [c for c in W if c.startswith('S')]
n_sigs = len(sig_columns)
# Evaluate contributions
if isinstance(contributions, pd.Series):
W = W[sig_columns] * contributions[sig_columns]
else:
W = W[sig_columns] * contributions
#### X coordinates for SBS contributions
context_label = []
change_map = {'CA': [], 'CG': [], 'CT': [], 'TA': [], 'TC': [], 'TG': []}
for p in itertools.product('ACGT','ACGT'):
context = ''.join(p)
compl_context = compl(context, reverse=True)
context_label.append('-'.join(context))
for key in change_map:
if key.startswith('C'):
change_map[key].append(key + context)
else:
change_map[key].append(compl(key) + compl_context)
color_map_sbs = {'CA': 'cyan', 'CG': 'red', 'CT': 'yellow', 'TA': 'purple', 'TC': 'green', 'TG': 'blue'}
x_coords_sbs = range(16)
#### X coordinates for ID contributions
group_map = {'INS': ['INS' + str(i+1) for i in range(4)], 'DEL': ['DEL' + str(i+1) for i in range(4)]}
color_map_id = {'INS':'#FFCC99', 'DEL':'#FF8000'}
x_coords_id = {'INS':range(0,4), 'DEL':range(0,4)}
all_columns = [x for x in change_map.keys()] + ['space', 'INS', 'DEL']
fig, axes = plt.subplots(nrows=n_sigs, ncols=9, figsize=(60,2.5*n_sigs), sharex='col',
gridspec_kw={'width_ratios': (16,)*6 + (1,) + (4,)*2})
max_height = 0
# Iterate through signatures
for row, sig in enumerate(sig_columns):
# iterate through columns
for col, ref in enumerate(all_columns):
if n_sigs == 1:
ax = axes[col]
else:
ax = axes[row,col]
if col == 6:
ax.remove()
continue
# For SBS portion
if col < 6:
bar_heights = W[sig].loc[change_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_sbs, bar_heights, width=.95, linewidth=1.5, edgecolor='gray', color=color_map_sbs[ref], rasterized=True)
ax.set_xlim(-.55, 15.55)
if row == 0:
ax.set_title('>'.join(ref), fontsize=18)
if col == 0:
ax.text(4, 1.3, 'Mutational Signatures', transform=ax.transAxes,
horizontalalignment='center', fontsize=24)
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0, labelbottom=False)
else:
ax.set_xticks(x_coords_sbs)
ax.set_xticklabels(context_label, fontfamily='monospace', rotation='vertical')
if col == 0:
ax.text(4, -.4, 'Motifs', transform = ax.transAxes, horizontalalignment='center', fontsize=20)
if col == 5:
if n_sigs == 1:
for axis in axes[:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
else:
for axis in axes[row,:col+1]:
axis.set_ylim(0,max_height + 0.1*max_height+1)
max_height = 0
# For ID portion
else:
bar_heights = W[sig].loc[group_map[ref]]
for height in bar_heights:
if height > max_height: max_height = height
ax.bar(x_coords_id[ref], bar_heights, width=0.95, linewidth=1.5, edgecolor='gray', color=color_map_id[ref],
rasterized=True)
ax.set_xlim(-.55, x_coords_id[ref][-1] + 0.55)
# Set column titles
if row == 0:
ax.set_title(ref, color=color_map_id[ref])
if row < n_sigs - 1:
ax.tick_params(axis='x', length=0)
else:
xlabels = ['1','2','3','4+']
ax.set_xticks(x_coords_id[ref])
ax.set_xticklabels(xlabels, fontfamily='monospace')
if col == 8:
ax.text(1.05, .5, sig, fontsize=14, rotation=270, transform=ax.transAxes, verticalalignment="center")
# Set titles and organize plot
plt.subplots_adjust(wspace=.12, hspace=0.15)
fig.text(0.105, 0.5, 'Contributions', rotation='vertical', verticalalignment='center', fontsize=20, fontweight='bold')
return fig
| 45.038323
| 175
| 0.521525
| 4,642
| 37,607
| 4.105773
| 0.079922
| 0.022194
| 0.034629
| 0.055249
| 0.850097
| 0.841125
| 0.833412
| 0.820662
| 0.794165
| 0.776851
| 0
| 0.0456
| 0.325312
| 37,607
| 834
| 176
| 45.092326
| 0.705553
| 0.103757
| 0
| 0.7589
| 0
| 0
| 0.087473
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017799
| false
| 0
| 0.017799
| 0
| 0.056634
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
e58356b46f2ead7e587f1c609f397d4868a64a3d
| 1,468
|
py
|
Python
|
lib/models/__init__.py
|
simonwey/DecoupleNet
|
3e9e09d512230cb0d95e9db98c5838ca9ff799da
|
[
"Apache-2.0"
] | null | null | null |
lib/models/__init__.py
|
simonwey/DecoupleNet
|
3e9e09d512230cb0d95e9db98c5838ca9ff799da
|
[
"Apache-2.0"
] | null | null | null |
lib/models/__init__.py
|
simonwey/DecoupleNet
|
3e9e09d512230cb0d95e9db98c5838ca9ff799da
|
[
"Apache-2.0"
] | null | null | null |
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import lib.models.pose_resnet
import lib.models.pose_hrnet
import lib.models.pose_hrnet_se
import lib.models.pose_hrnet_se_lambda
import lib.models.pose_hrnet_se_lambda_visualize
import lib.models.pose_hrnet_multi_task_lambda
import lib.models.pose_resnet_se
import lib.models.pose_resnet_se_lambda
import lib.models.pose_hrnet_SEIgn_lambda
import lib.models.pose_hrnet_ss_lambda
import lib.models.pose_hrnet_decouple_gcn
import lib.models.pose_hrnet_IgnSE12_lambda
import lib.models.pose_hrnet_decouple_cnn
import lib.models.pose_hrnet_decouple_naive
import lib.models.pose_hrnet_decouple_naive_withdp
import lib.models.pose_hrnet_decouple_stupid
import lib.models.pose_hrnet_decouple_ia
import lib.models.pose_hrnet_dcp_skt
import lib.models.pose_hrnet_decomp_align
import lib.models.pose_hrnet_four_arm
import lib.models.pose_hrnet_twohead
import lib.models.pose_cnn_two_arm
import lib.models.pose_hrnet_ori
import lib.models.pose_two_two
import lib.models.pose_two_catt
| 33.363636
| 80
| 0.782016
| 212
| 1,468
| 4.962264
| 0.235849
| 0.213878
| 0.356464
| 0.451521
| 0.814639
| 0.606464
| 0.391635
| 0.157795
| 0.157795
| 0.157795
| 0
| 0.001463
| 0.068801
| 1,468
| 44
| 81
| 33.363636
| 0.768105
| 0.175749
| 0
| 0.193548
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.064516
| 0
| 0
| 0
| null | 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
f91a6e0bb839f94d245991ac0a6930fd11de218e
| 1,753
|
py
|
Python
|
tests/unit/test_cname_validator.py
|
cloud-gov/domain-broker
|
d1161cecd971202cb10449a29fedb83ef3cd83b0
|
[
"CC0-1.0"
] | 5
|
2020-04-28T01:40:43.000Z
|
2021-03-27T21:34:14.000Z
|
tests/unit/test_cname_validator.py
|
cloud-gov/external-domain-broker
|
7136ac0c10f5950315b77eddca60512129d4078d
|
[
"CC0-1.0"
] | 124
|
2020-04-23T20:24:15.000Z
|
2022-02-28T16:59:34.000Z
|
tests/unit/test_cname_validator.py
|
cloud-gov/domain-broker
|
d1161cecd971202cb10449a29fedb83ef3cd83b0
|
[
"CC0-1.0"
] | 1
|
2020-06-10T02:43:21.000Z
|
2020-06-10T02:43:21.000Z
|
import openbrokerapi
import pytest
from broker.validators import CNAME
def test_one_layer_of_cnames(dns):
dns.add_cname("_acme-challenge.foo.example.gov")
# we're just making sure we don't raise an exception here
CNAME(["foo.example.gov"]).validate()
def test_two_layers_of_cnames(dns):
dns.add_cname(
"_acme-challenge.foo.example.gov", target="_acme-challenge.bar.example.gov"
)
dns.add_cname(
"_acme-challenge.bar.example.gov",
target="_acme-challenge.foo.example.gov.domains.cloud.test",
)
# we're just making sure we don't raise an exception here
CNAME(["foo.example.gov"]).validate()
def test_three_layers_of_cnames(dns):
dns.add_cname(
"_acme-challenge.foo.example.gov", target="_acme-challenge.bar.example.gov"
)
dns.add_cname(
"_acme-challenge.bar.example.gov", target="_acme-challenge.baz.example.gov"
)
dns.add_cname(
"_acme-challenge.baz.example.gov",
target="_acme-challenge.foo.example.gov.domains.cloud.test",
)
# we're just making sure we don't raise an exception here
CNAME(["foo.example.gov"]).validate()
def test_detects_looping_cnames(dns):
dns.add_cname(
"_acme-challenge.foo.example.gov", target="_acme-challenge.bar.example.gov"
)
dns.add_cname(
"_acme-challenge.bar.example.gov", target="_acme-challenge.foo.example.gov"
)
# we're just making sure we don't raise an exception here
with pytest.raises(
openbrokerapi.errors.ErrBadRequest,
match=r"_acme-challenge.foo.example.gov points to itself. Resolution chain: \['_acme-challenge.foo.example.gov', '_acme-challenge.bar.example.gov'\]",
):
CNAME(["foo.example.gov"]).validate()
| 33.075472
| 158
| 0.689104
| 244
| 1,753
| 4.782787
| 0.217213
| 0.188518
| 0.144816
| 0.177378
| 0.844045
| 0.749786
| 0.749786
| 0.720651
| 0.720651
| 0.720651
| 0
| 0
| 0.174558
| 1,753
| 52
| 159
| 33.711538
| 0.806496
| 0.127211
| 0
| 0.410256
| 0
| 0.025641
| 0.460984
| 0.396721
| 0
| 0
| 0
| 0
| 0
| 1
| 0.102564
| false
| 0
| 0.076923
| 0
| 0.179487
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
f9249922359bc54dc90ea1e068b745309bf9091a
| 17,694
|
py
|
Python
|
tests/functional/modules/ims_catalog/test_catalog_managed_acbs.py
|
thedoubl3j/ibm_zos_ims
|
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
|
[
"Apache-2.0"
] | 7
|
2020-05-13T15:57:44.000Z
|
2022-01-15T00:30:10.000Z
|
tests/functional/modules/ims_catalog/test_catalog_managed_acbs.py
|
thedoubl3j/ibm_zos_ims
|
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
|
[
"Apache-2.0"
] | 64
|
2020-04-24T09:40:10.000Z
|
2022-03-21T08:51:58.000Z
|
tests/functional/modules/ims_catalog/test_catalog_managed_acbs.py
|
thedoubl3j/ibm_zos_ims
|
89ca4e80e4b6592807b96f8b329a10d149e0c4a3
|
[
"Apache-2.0"
] | 7
|
2020-05-19T02:32:40.000Z
|
2021-04-07T07:37:30.000Z
|
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
import pytest
import re
from math import ceil
from pprint import pprint
from ibm_zos_ims.tests.functional.module_utils.ims_test_catalog_utils import CatalogInputParameters as cp # pylint: disable=import-error
from ibm_zos_ims.tests.functional.module_utils.ims_test_catalog_utils import load_catalog, purge_catalog # pylint: disable=import-error
__metaclass__ = type
BYTES_PER_TRK = 56664
BYTES_PER_CYL = BYTES_PER_TRK * 15
BYTES_PER_KB = 1024
BYTES_PER_MB = 1048576
# Scenario 2: Load mode, managed_acbs - setup=True
def test_catalog_load_managed_acbs(ansible_zos_module):
hosts = ansible_zos_module
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4533I",
control_statements={'managed_acbs': {"setup": True}})
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Scenario 3: Update mode, managed_acbs - stage options(save_acb=UNCOND and clean_staging_dataset=True)
# and update option(replace_acb=UNCOND)
def test_catalog_update_managed_acbs_stage_and_update(ansible_zos_module):
hosts = ansible_zos_module
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.UPDATEMODE,
validation_msg="DFS4536I",
control_statements={
'managed_acbs': {
'stage': {
'save_acb': "UNCOND",
'clean_staging_dataset': True
}
}
})
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.UPDATEMODE,
validation_msg="DFS4534I",
control_statements={'managed_acbs': {'update': {'replace_acb': "UNCOND"}}})
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Setup the Catalog while defining the bootstrap dataset.
def test_catalog_define_bootstrap(ansible_zos_module):
hosts = ansible_zos_module
# Delete the bootstrap dataset first
response = hosts.all.zos_data_set(name=cp.BSDS, state="absent")
for result in response.contacted.values():
assert result['message'] == ''
if result['changed'] is False:
response = hosts.all.zos_data_set(name=cp.BSDS, state="absent", volume="SCR03")
# Load catalog while defining the bootstrap dataset
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4533I",
bootstrap_dataset={
'dataset_name': cp.BSDS,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 350,
'volumes': ['222222']
},
control_statements={'managed_acbs': {"setup": True}})
# Verify the bootstrap dataset was created with the specified parameters
estimated_size_in_bytes = 0
response = hosts.all.command("dls -s " + cp.BSDS)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 350
# Purge the catalog
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Finally delete the boostrap dataset again
response = hosts.all.zos_data_set(name=cp.BSDS, state="absent")
for result in response.contacted.values():
assert result['changed'] is True
assert result['message'] == ''
# Setup the Catalog while defining the staging dataset.
def test_catalog_define_staging(ansible_zos_module):
hosts = ansible_zos_module
# Delete the staging dataset first
response = hosts.all.zos_data_set(name=cp.STAGE, state="absent")
for result in response.contacted.values():
assert result['message'] == ''
if result['changed'] is False:
response = hosts.all.zos_data_set(name=cp.STAGE, state="absent", volume="SCR03")
# Load catalog while defining the staging dataset
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4533I",
directory_staging_dataset={
'dataset_name': cp.STAGE,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 300,
'volumes': ['222222']
},
control_statements={'managed_acbs': {"setup": True}})
# Verify the staging dataset was created with the specified parameters
estimated_size_in_bytes = 0
response = hosts.all.command("dls -s " + cp.STAGE)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
pprint("dls stdout: " + line)
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 300
# Purge the catalog
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Finally delete the staging dataset again
response = hosts.all.zos_data_set(name=cp.STAGE, state="absent")
for result in response.contacted.values():
assert result['changed'] is True
assert result['message'] == ''
# Setup the Catalog while defining the directory datasets.
def test_catalog_define_directory(ansible_zos_module):
hosts = ansible_zos_module
# Delete the directory datasets first
response = hosts.all.zos_data_set(batch=cp.DIR_BATCH)
for result in response.contacted.values():
assert result['message'] == ''
if result['changed'] is False:
response = hosts.all.zos_data_set(name=cp.DIR_BATCH, state="absent", volume="SCR03")
# Load catalog while defining the directory datasets
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4533I",
directory_datasets=[
{
'dataset_name': cp.DIR1,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 200,
'volumes': ['222222']
},
{
'dataset_name': cp.DIR2,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 200,
'volumes': ['222222']
},
],
control_statements={'managed_acbs': {"setup": True}})
# Verify the directory datasets were created with the specified parameters
estimated_size_in_bytes = 0
response = hosts.all.command("dls -s " + cp.DIR1)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 200
response = hosts.all.command("dls -s " + cp.DIR2)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 200
# Purge the catalog
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Finally delete the directory datasets again
response = hosts.all.zos_data_set(batch=cp.DIR_BATCH)
for result in response.contacted.values():
assert result['changed'] is True
assert result['message'] == ''
"""
Scenario 7: Test the creation of the temp_acb_dataset, which holds ACBs that reference
GSAM database. Test catalog in load mode with managed acbs setup = true or no managedacbs
options specified. Specify the temp_acb_dataset fields. The temp_acb_dataset can be named
anything, I recommend sticking with your first two IMS library qualifiers with the 3rd
qualifier being whatever you want. Verify the temp acb dataset is created with the specified
values. Purge the catalog.
"""
def test_creation_of_temp_acb_dataset_with_managed_acbs(ansible_zos_module):
hosts = ansible_zos_module
# Delete TEMP_ACB data set before the test
response = hosts.all.zos_data_set(name=cp.TEMP_ACB, state="absent")
for result in response.contacted.values():
assert result['message'] == ''
temp_acb_data_set = {
'dataset_name': cp.TEMP_ACB,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 200,
'volumes': ['222222']
}
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
temp_acb_dataset=temp_acb_data_set,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4533I",
control_statements={
'managed_acbs': {
'setup': True
}
})
estimated_size_in_bytes = 0
response = hosts.all.command("dls -s " + cp.TEMP_ACB)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 200
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Delete TEMP_ACB data set after the test
response = hosts.all.zos_data_set(name=cp.TEMP_ACB, state="absent")
for result in response.contacted.values():
assert result['changed'] is True
assert result['message'] == ''
def test_creation_of_temp_acb_dataset_without_managed_acbs(ansible_zos_module):
hosts = ansible_zos_module
# Delete TEMP_ACB data set before the test
response = hosts.all.zos_data_set(name=cp.TEMP_ACB, state="absent")
for result in response.contacted.values():
assert result['message'] == ''
temp_acb_data_set = {
'dataset_name': cp.TEMP_ACB,
'disposition': 'NEW',
'normal_disposition': 'CATLG',
'primary': 200,
'volumes': ['222222']
}
load_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
acb_lib=cp.ACBLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
temp_acb_dataset=temp_acb_data_set,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.LOADMODE,
validation_msg="DFS4434I"
)
estimated_size_in_bytes = 0
response = hosts.all.command("dls -s " + cp.TEMP_ACB)
for result in response.contacted.values():
for line in result.get("stdout_lines", []):
lineList = line.split()
estimated_size_in_bytes = int(lineList[-1])
estimated_size_in_unit = bytes_to_unit(estimated_size_in_bytes, "TRK")
assert estimated_size_in_unit == 200
purge_catalog(hosts,
psb_lib=cp.PSBLIB,
dbd_lib=cp.DBDLIB,
steplib=cp.STEPLIB,
reslib=cp.RESLIB,
proclib=cp.PROCLIB,
primary_log_dataset=cp.PRIMARYLOG,
buffer_pool_param_dataset=cp.BUFFERPOOL,
mode=cp.PURGEMODE,
validation_msg="",
delete=cp.DELETES,
managed_acbs=True)
# Delete TEMP_ACB data set after the test
response = hosts.all.zos_data_set(name=cp.TEMP_ACB, state="absent")
for result in response.contacted.values():
assert result['changed'] is True
assert result['message'] == ''
def bytes_to_unit(number_of_bytes, unit):
size = 0
unit = unit.lower()
if number_of_bytes == 0:
number_of_bytes = 1
if unit == "cyl":
size = byte_to_cyl(number_of_bytes)
elif unit == "kb" or unit == "k":
size = byte_to_kilobyte(number_of_bytes)
elif unit == "mb" or unit == "m":
size = byte_to_megabyte(number_of_bytes)
else:
size = byte_to_trk(number_of_bytes)
return size
def byte_to_trk(number_of_bytes):
return ceil(number_of_bytes / BYTES_PER_TRK)
def byte_to_cyl(number_of_bytes):
return ceil(number_of_bytes / BYTES_PER_CYL)
def byte_to_kilobyte(number_of_bytes):
return ceil(number_of_bytes / BYTES_PER_KB)
def byte_to_megabyte(number_of_bytes):
return ceil(number_of_bytes / BYTES_PER_MB)
| 37.566879
| 138
| 0.575167
| 1,957
| 17,694
| 4.938682
| 0.106796
| 0.019659
| 0.045008
| 0.035178
| 0.843559
| 0.837765
| 0.805691
| 0.791723
| 0.791723
| 0.752509
| 0
| 0.012847
| 0.335707
| 17,694
| 470
| 139
| 37.646809
| 0.809427
| 0.070306
| 0
| 0.783422
| 0
| 0
| 0.063363
| 0.001317
| 0
| 0
| 0
| 0
| 0.05615
| 1
| 0.032086
| false
| 0
| 0.018717
| 0.010695
| 0.064171
| 0.008021
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
006d62c417c8c534371527306d103d08ee138f13
| 48
|
py
|
Python
|
gevent_ticker/__init__.py
|
segmentio/gevent-ticker
|
a7f353f8cc61190432e08efe2524fe1f2f0a277e
|
[
"MIT"
] | 2
|
2020-10-21T03:24:45.000Z
|
2021-02-13T02:56:15.000Z
|
gevent_ticker/__init__.py
|
tejasmanohar/gevent-ticker
|
a7f353f8cc61190432e08efe2524fe1f2f0a277e
|
[
"MIT"
] | null | null | null |
gevent_ticker/__init__.py
|
tejasmanohar/gevent-ticker
|
a7f353f8cc61190432e08efe2524fe1f2f0a277e
|
[
"MIT"
] | 2
|
2017-05-06T01:55:56.000Z
|
2018-08-04T19:09:47.000Z
|
from gevent_ticker.ticker import Ticker, ticker
| 24
| 47
| 0.854167
| 7
| 48
| 5.714286
| 0.571429
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104167
| 48
| 1
| 48
| 48
| 0.930233
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
006d93031c44c6db00cbb57c56e99ec94020c96a
| 10,078
|
py
|
Python
|
features/feature_generation_strategy-2.py
|
jmrozanec/features-generator
|
0772394cf1c4a56a88c8a8faba2e5c84b4b2883f
|
[
"Apache-2.0"
] | 3
|
2018-07-19T14:37:37.000Z
|
2021-06-03T12:44:22.000Z
|
features/feature_generation_strategy-2.py
|
jmrozanec/features-generator
|
0772394cf1c4a56a88c8a8faba2e5c84b4b2883f
|
[
"Apache-2.0"
] | null | null | null |
features/feature_generation_strategy-2.py
|
jmrozanec/features-generator
|
0772394cf1c4a56a88c8a8faba2e5c84b4b2883f
|
[
"Apache-2.0"
] | 2
|
2020-02-22T20:14:48.000Z
|
2020-12-03T19:42:03.000Z
|
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.decomposition import PCA, TruncatedSVD, FastICA
from sklearn.random_projection import GaussianRandomProjection, SparseRandomProjection
import abc
class ColumnBasedFeatureGenerationStrategyAbstract(BaseEstimator, TransformerMixin):
"""Provides abstraction for features generation"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def fit(self, train):
"""Required Method"""
@abc.abstractmethod
def transform(self, train):
"""Required Method"""
@abc.abstractmethod
def featurename(self, colname1, colname2):
"""Required Method"""
@abc.abstractmethod
def equivalent_featurenames(self, colname1, colname2):
"""Required Method. Used to reflect commutativity."""
class SumFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def fit(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)] = train[[colname1, colname2]].sum(axis=1)
val[self.featurename(colname1, colname2)] = val[[colname1, colname2]].sum(axis=1)
test[self.featurename(colname1, colname2)] = test[[colname1, colname2]].sum(axis=1)
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_sum_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2), self.featurename(colname2, colname1)]
class DiffFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[colname1]-train[colname2]
val[self.featurename(colname1, colname2)]=train[colname1]-val[colname2]
test[self.featurename(colname1, colname2)]=test[colname1]-test[colname2]
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_diff_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2)]
class ProdFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[colname1]*train[colname2]
val[self.featurename(colname1, colname2)]=val[colname1]*val[colname2]
test[self.featurename(colname1, colname2)]=test[colname1]*test[colname2]
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_prod_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2), self.featurename(colname2, colname1)]
class DivFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[colname1]/train[colname2]
val[self.featurename(colname1, colname2)]=val[colname1]/val[colname2]
test[self.featurename(colname1, colname2)]=test[colname1]/test[colname2]
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_div_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2)]
class AvgFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[[colname1, colname2]].mean(axis=1)
val[self.featurename(colname1, colname2)]=val[[colname1, colname2]].mean(axis=1)
test[self.featurename(colname1, colname2)]=test[[colname1, colname2]].mean(axis=1)
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_avg_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2), self.featurename(colname2, colname1)]
class MaxFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[[colname1, colname2]].max(axis=1)
val[self.featurename(colname1, colname2)]=val[[colname1, colname2]].max(axis=1)
test[self.featurename(colname1, colname2)]=test[[colname1, colname2]].max(axis=1)
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_max_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2), self.featurename(colname2, colname1)]
class MinFeatureGenerationStrategy(ColumnBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, colname1, colname2):
train[self.featurename(colname1, colname2)]=train[[colname1, colname2]].min(axis=1)
val[self.featurename(colname1, colname2)]=val[[colname1, colname2]].min(axis=1)
test[self.featurename(colname1, colname2)]=test[[colname1, colname2]].min(axis=1)
return (train, val, test)
def featurename(self, colname1, colname2):
return "{}_min_{}".format(colname1, colname2)
def equivalent_featurenames(self, colname1, colname2):
return [self.featurename(colname1, colname2), self.featurename(colname2, colname1)]
# Features based on decomposition methods
class DecompositionBasedFeatureGenerationStrategyAbstract(object):
"""Provides abstraction for features generation"""
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def generate(self, train, val, test):
"""Required Method"""
@abc.abstractmethod
def featurename(self, idx):
"""Required Method"""
@abc.abstractmethod
def equivalent_featurenames(self, idx):
"""Required Method. Used to reflect commutativity."""
class PCAFeatureGenerationStrategy(DecompositionBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, n_comps):
decomposer = PCA(n_components=n_comps, random_state=1234)
results_train = decomposer.fit_transform(train)
results_val = decomposer.fit_transform(val)
results_test = decomposer.transform(test)
for i in range(1, n_comps + 1):
train[self.featurename(i)] = results_train[:, i - 1]
val[self.featurename(i)] = results_val[:, i - 1]
test[self.featurename(i)] = results_test[:, i - 1]
return (train, val, test)
def featurename(self, idx):
return "pca_{}".format(str(idx))
def equivalent_featurenames(self, idx):
return [self.featurename(idx)]
class TSVDFeatureGenerationStrategy(DecompositionBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, n_comps):
decomposer = TruncatedSVD(n_components=n_comps, random_state=1234)
results_train = decomposer.fit_transform(train)
results_val = decomposer.fit_transform(val)
results_test = decomposer.transform(test)
for i in range(1, n_comps + 1):
train[self.featurename(i)] = results_train[:, i - 1]
val[self.featurename(i)] = results_val[:, i - 1]
test[self.featurename(i)] = results_test[:, i - 1]
return (train, val, test)
def featurename(self, idx):
return "tsvd_{}".format(str(idx))
def equivalent_featurenames(self, idx):
return [self.featurename(idx)]
class ICAFeatureGenerationStrategy(DecompositionBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, n_comps):
decomposer = FastICA(n_components=n_comps, random_state=1234)
results_train = decomposer.fit_transform(train)
results_val = decomposer.fit_transform(val)
results_test = decomposer.transform(test)
for i in range(1, n_comps + 1):
train[self.featurename(i)] = results_train[:, i - 1]
val[self.featurename(i)] = results_val[:, i - 1]
test[self.featurename(i)] = results_test[:, i - 1]
return (train, val, test)
def featurename(self, idx):
return "ica_{}".format(str(idx))
def equivalent_featurenames(self, idx):
return [self.featurename(idx)]
class GRPFeatureGenerationStrategy(DecompositionBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, n_comps):
decomposer = GaussianRandomProjection(n_components=n_comps, random_state=1234)
results_train = decomposer.fit_transform(train)
results_val = decomposer.fit_transform(val)
results_test = decomposer.transform(test)
for i in range(1, n_comps + 1):
train[self.featurename(i)] = results_train[:, i - 1]
val[self.featurename(i)] = results_val[:, i - 1]
test[self.featurename(i)] = results_test[:, i - 1]
return (train, val, test)
def featurename(self, idx):
return "grp_{}".format(str(idx))
def equivalent_featurenames(self, idx):
return [self.featurename(idx)]
class SRPFeatureGenerationStrategy(DecompositionBasedFeatureGenerationStrategyAbstract):
def generate(self, train, val, test, n_comps):
decomposer = SparseRandomProjection(n_components=n_comps, random_state=1234)
results_train = decomposer.fit_transform(train)
results_val = decomposer.fit_transform(val)
results_test = decomposer.transform(test)
for i in range(1, n_comps + 1):
train[self.featurename(i)] = results_train[:, i - 1]
val[self.featurename(i)] = results_val[:, i - 1]
test[self.featurename(i)] = results_test[:, i - 1]
return (train, val, test)
def featurename(self, idx):
return "grp_{}".format(str(idx))
def equivalent_featurenames(self, idx):
return [self.featurename(idx)]
| 44.791111
| 93
| 0.701528
| 1,060
| 10,078
| 6.568868
| 0.083019
| 0.16085
| 0.092489
| 0.124659
| 0.875054
| 0.866724
| 0.860261
| 0.825793
| 0.80856
| 0.80856
| 0
| 0.027223
| 0.179897
| 10,078
| 224
| 94
| 44.991071
| 0.815245
| 0.030363
| 0
| 0.652695
| 0
| 0
| 0.00987
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.257485
| false
| 0
| 0.023952
| 0.143713
| 0.592814
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 9
|
00d277881da6c7740628d87860298f8d20c20e62
| 2,618
|
py
|
Python
|
bin/SchemaUpgrade/versions/4c7ab7d3b46c_version_0_68_007.py
|
Middlecon/DBImport
|
8f19776a5f6a6e5d6eebe5c312432b8058a2e579
|
[
"Apache-2.0"
] | 10
|
2019-05-22T04:17:02.000Z
|
2021-12-05T16:54:08.000Z
|
bin/SchemaUpgrade/versions/4c7ab7d3b46c_version_0_68_007.py
|
Middlecon/DBImport
|
8f19776a5f6a6e5d6eebe5c312432b8058a2e579
|
[
"Apache-2.0"
] | 73
|
2019-05-22T04:19:24.000Z
|
2022-01-18T05:09:26.000Z
|
bin/SchemaUpgrade/versions/4c7ab7d3b46c_version_0_68_007.py
|
BerryOsterlund/DBImport
|
aa5f4599834985266fc0bf211f9bb8b348f6ae8e
|
[
"Apache-2.0"
] | 5
|
2020-05-19T23:46:56.000Z
|
2021-11-12T12:02:37.000Z
|
"""Version 0.68.007
Revision ID: 4c7ab7d3b46c
Revises: e317884da580
Create Date: 2021-10-22 06:59:47.134546
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
from sqlalchemy import Enum
# revision identifiers, used by Alembic.
revision = '4c7ab7d3b46c'
down_revision = 'e317884da580'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('airflow_tasks', sa.Column('sensor_soft_fail', sa.Integer(), nullable=True, comment='Setting this to 1 will add soft_fail=True on sensor'))
op.execute("ALTER TABLE `airflow_tasks` CHANGE COLUMN `sensor_soft_fail` `sensor_soft_fail` INTEGER NULL COMMENT 'Setting this to 1 will add soft_fail=True on sensor' AFTER `sensor_timeout_minutes`")
op.add_column('airflow_dag_sensors', sa.Column('sensor_soft_fail', sa.Integer(), nullable=True, comment='Setting this to 1 will add soft_fail=True on sensor'))
op.alter_column('airflow_custom_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=32),
type_=mysql.VARCHAR(length=128),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_etl_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=32),
type_=mysql.VARCHAR(length=128),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_export_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=32),
type_=mysql.VARCHAR(length=128),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_import_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=32),
type_=mysql.VARCHAR(length=128),
comment='Time to execute dag',
existing_nullable=False)
def downgrade():
op.drop_column('airflow_tasks', 'sensor_soft_fail')
op.drop_column('airflow_dag_sensors', 'sensor_soft_fail')
op.alter_column('airflow_custom_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=128),
type_=mysql.VARCHAR(length=32),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_etl_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=128),
type_=mysql.VARCHAR(length=32),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_export_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=128),
type_=mysql.VARCHAR(length=32),
comment='Time to execute dag',
existing_nullable=False)
op.alter_column('airflow_import_dags', 'schedule_interval',
existing_type=mysql.VARCHAR(length=128),
type_=mysql.VARCHAR(length=32),
comment='Time to execute dag',
existing_nullable=False)
| 33.139241
| 200
| 0.776547
| 373
| 2,618
| 5.217158
| 0.217158
| 0.073998
| 0.131552
| 0.180884
| 0.720452
| 0.720452
| 0.720452
| 0.720452
| 0.720452
| 0.720452
| 0
| 0.04211
| 0.101986
| 2,618
| 78
| 201
| 33.564103
| 0.785623
| 0.055386
| 0
| 0.727273
| 0
| 0.018182
| 0.354302
| 0.00974
| 0
| 0
| 0
| 0
| 0
| 1
| 0.036364
| false
| 0
| 0.109091
| 0
| 0.145455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
dab409c26c446c8c916964d21d27ce04b336251f
| 67
|
py
|
Python
|
app/github_client/services/__init__.py
|
TennaGraph/TennaGraph
|
002998d94300ee67168f1a8164c0e6bc86836e1f
|
[
"Apache-2.0"
] | 7
|
2018-11-13T17:39:15.000Z
|
2019-03-27T04:55:24.000Z
|
app/github_client/services/__init__.py
|
TennaGraph/TennaGraph
|
002998d94300ee67168f1a8164c0e6bc86836e1f
|
[
"Apache-2.0"
] | 72
|
2018-11-09T14:20:25.000Z
|
2020-06-05T19:28:19.000Z
|
app/github_client/services/__init__.py
|
TennaGraph/TennaGraph
|
002998d94300ee67168f1a8164c0e6bc86836e1f
|
[
"Apache-2.0"
] | 3
|
2018-11-19T19:10:39.000Z
|
2019-08-23T20:52:23.000Z
|
from .git_hub_eip import GitHubEIP
from .git_hub_db import GitHubDB
| 33.5
| 34
| 0.865672
| 12
| 67
| 4.5
| 0.666667
| 0.259259
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104478
| 67
| 2
| 35
| 33.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
972d0669a83e8c48e6074096337432084049f87c
| 1,701
|
py
|
Python
|
dataset/prepare_SIG17.py
|
Susmit-A/FSHDR
|
45dfbe7783b2a5859bbe8653761058b9ee207a01
|
[
"MIT"
] | 6
|
2021-07-26T17:41:26.000Z
|
2021-12-31T09:56:55.000Z
|
dataset/prepare_SIG17.py
|
Susmit-A/FSHDR
|
45dfbe7783b2a5859bbe8653761058b9ee207a01
|
[
"MIT"
] | 4
|
2021-07-27T13:42:45.000Z
|
2022-03-20T11:31:29.000Z
|
dataset/prepare_SIG17.py
|
Susmit-A/FSHDR
|
45dfbe7783b2a5859bbe8653761058b9ee207a01
|
[
"MIT"
] | 1
|
2021-12-05T13:35:08.000Z
|
2021-12-05T13:35:08.000Z
|
import shutil, os, glob
src = 'train'
dst = 'SIG17/train'
if not os.path.exists('SIG17'):
os.mkdir('SIG17')
os.mkdir(dst)
elif not os.path.exists(dst):
os.mkdir(dst)
count = 1
for s in glob.glob(src + '/*'):
d = dst + '/{:03d}'.format(count)
if not os.path.exists(d):
os.mkdir(d)
os.mkdir(d + '/dynamic')
os.mkdir(d + '/static')
shutil.copyfile(s + '/input_1_aligned.tif', d + '/dynamic/le.tif')
shutil.copyfile(s + '/input_2_aligned.tif', d + '/dynamic/me.tif')
shutil.copyfile(s + '/input_3_aligned.tif', d + '/dynamic/he.tif')
shutil.copyfile(s + '/ref_1_aligned.tif', d + '/static/le.tif')
shutil.copyfile(s + '/ref_2_aligned.tif', d + '/static/me.tif')
shutil.copyfile(s + '/ref_3_aligned.tif', d + '/static/he.tif')
shutil.copyfile(s + '/ref_hdr_aligned.hdr', d + '/hdr_gt.hdr')
shutil.copyfile(s + '/input_exp.txt', d + '/input_exp.txt')
print(str(count) + ' folders transferred')
count += 1
src = 'test'
dst = 'SIG17/val'
if not os.path.exists(dst):
os.mkdir(dst)
count = 1
for s in glob.glob(src + '/*'):
d = dst + '/{:03d}'.format(count)
if not os.path.exists(d):
os.mkdir(d)
os.mkdir(d + '/dynamic')
shutil.copyfile(s + '/input_1_aligned.tif', d + '/dynamic/le.tif')
shutil.copyfile(s + '/input_2_aligned.tif', d + '/dynamic/me.tif')
shutil.copyfile(s + '/input_3_aligned.tif', d + '/dynamic/he.tif')
shutil.copyfile(s + '/ref_hdr_aligned.hdr', d + '/hdr_gt.hdr')
shutil.copyfile(s + '/input_exp.txt', d + '/input_exp.txt')
print(str(count) + ' folders transferred')
count += 1
| 35.4375
| 71
| 0.579659
| 255
| 1,701
| 3.756863
| 0.172549
| 0.189979
| 0.203549
| 0.169102
| 0.837161
| 0.769311
| 0.769311
| 0.769311
| 0.769311
| 0.769311
| 0
| 0.018925
| 0.223398
| 1,701
| 48
| 72
| 35.4375
| 0.706283
| 0
| 0
| 0.690476
| 0
| 0
| 0.328701
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.02381
| 0
| 0.02381
| 0.047619
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
97c79420701cc4c261d922d84831429edea5e1a7
| 46,438
|
py
|
Python
|
ub/modules/giftext.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 15
|
2020-12-13T17:37:05.000Z
|
2021-06-23T00:00:49.000Z
|
ub/modules/giftext.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 2
|
2021-01-11T16:39:31.000Z
|
2021-01-25T22:35:28.000Z
|
ub/modules/giftext.py
|
parv779/javes-3.0
|
d510717b2756a65b39ff18d9f53d4adc46d8e23f
|
[
"MIT"
] | 78
|
2020-12-13T17:52:51.000Z
|
2022-03-24T03:43:09.000Z
|
from ub import bot
from ub import bot as borg
global hawkmoth
#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
hawkmoth="I0Rvbm90IEthbmcgTUFERSBCWSBAVEhFX0JMX0FDS19IQVQgTU9ESUZJRUQgQlkgU2gxdmFtICNUZWFtIERDIA=="
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE
from ub.utils import admin_cmd
from PIL import Image, ImageDraw, ImageFont
import os
from ub import CMD_HELP
@borg.on(admin_cmd(pattern="giftext ?(.*)"))
async def lol(event):
await event.delete()
if not os.path.isdir("./imglol"):
os.makedirs("./imglol")
rasta = './imglol'
reply = await event.get_reply_message()
me= await borg.download_media(reply.media, rasta)
lol = event.text
hui, font,size,color,align,loop,duration= lol[9:].split('|')
#hui,size,color,align= lol[9:].split('|')
loltext = hui
x,y=align.split(";")
size=int(size)
def adi(text):
img = Image.open(me)
#fnt = f'ub/helpers/styles/{font}'
fonts = ImageFont.truetype(r"ub/helpers/styles/{}".format(font),size)
draw = ImageDraw.Draw(img)
draw.text(((int(x), int(y))), text,fill=(color),font=fonts )
return img
# Create the frames
frames = []
def ruil(text):
global c
for i in range(len(text)+1):
new_frame = adi(text[:i])
frames.append(new_frame)
c = 0
all_text = f"{loltext}"
ruil(all_text)
# Save into a GIF file that loops forever
frames[0].save('catnoiar.gif', format='GIF',
append_images=frames[1:], save_all=True, duration=int(duration), loop=int(loop))
ukanger = "catnoiar.gif"
await borg.send_file(event.chat_id, ukanger)
#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
global miracul
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
miracul="I0Rvbm90IEthbmcgTUFERSBCWSBAVEhFX0JMX0FDS19IQVQgTU9ESUZJRUQgQlkgU2gxdmFtICNUZWFtIERDIA=="
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#Donot Kang MADE BY @THE_BL_ACK_HAT MODIFIED BY Sh1vam #Team DC
if hawkmoth!=miracul :
print("GREAT kanger Here")
#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE#@Kraken_The_BadASS Owner OF HELL BOT IS BIGGEST KANGER AND WILL TRY TO KANG THIN HEY U YES YES U @Kraken_The_BadASS JUMP IN A WELL AND DIE DONT TRY TO KANG THIS LIKE UNINSTLL MODULE AND TELLING THAT ALL VARIABLES CAME IN DREAM WHICH ARE SAME AS SH1VAM's UNINSTALL MODULE
CMD_HELP.update({"CustomGIF":"\n\n.(gif/pic)text text|font|size|color|coordinate(x);coordinate(y)|loop|duration\n\n.if u ise pic dont add loop and duration \n\n use !term ls ub/helpers/styles for font list"})
| 245.703704
| 2,981
| 0.797343
| 9,133
| 46,438
| 3.949852
| 0.0173
| 0.065366
| 0.108943
| 0.057382
| 0.969147
| 0.969147
| 0.969147
| 0.969147
| 0.969147
| 0.969147
| 0
| 0.007663
| 0.176623
| 46,438
| 189
| 2,982
| 245.703704
| 0.935793
| 0.948254
| 0
| 0
| 0
| 0.022222
| 0.236829
| 0.12293
| 0
| 0
| 0
| 0
| 0
| 1
| 0.044444
| false
| 0
| 0.133333
| 0
| 0.2
| 0.022222
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 9
|
c119cf185ce9eec5f0d57712d5bad209fd85a1c0
| 1,764
|
py
|
Python
|
test/test_rgb_to_hsl.py
|
liamwb/colourise
|
536b3a9671ef4c4648ef67e1221e1dc5a24c006d
|
[
"MIT"
] | null | null | null |
test/test_rgb_to_hsl.py
|
liamwb/colourise
|
536b3a9671ef4c4648ef67e1221e1dc5a24c006d
|
[
"MIT"
] | 7
|
2021-11-23T02:53:43.000Z
|
2021-12-01T02:01:33.000Z
|
test/test_rgb_to_hsl.py
|
liamwb/colourise
|
536b3a9671ef4c4648ef67e1221e1dc5a24c006d
|
[
"MIT"
] | 4
|
2021-04-20T06:07:44.000Z
|
2021-11-25T04:19:53.000Z
|
import unittest
from colourise import rgb2hsl
class TestRGBtoHSL(unittest.TestCase):
def test_primary_colour_red(self):
r, g, b = 255, 0, 0
h, s, l = rgb2hsl(r, g, b)
self.assertEqual(h, 0.0)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_primary_colour_green(self):
r, g, b = 0, 255, 0
h, s, l = rgb2hsl(r, g, b)
self.assertEqual(h, 120.0)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_primary_colour_blue(self):
r, g, b = 0, 0, 255
h, s, l = rgb2hsl(r, g, b)
self.assertEqual(h, 240.0)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_secondary_colour_cyan(self):
r, g, b = 0, 255, 255
h, s, l = rgb2hsl(r, g, b)
self.assertAlmostEqual(h, 180.0, delta=0.15)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_secondary_colour_magenta(self):
r, g, b = 255, 0, 255
h, s, l = rgb2hsl(r, g, b)
self.assertAlmostEqual(h, 300.0, delta=0.15)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_secondary_colour_yellow(self):
r, g, b = 255, 255, 0
h, s, l = rgb2hsl(r, g, b)
self.assertAlmostEqual(h, 60.0, delta=0.15)
self.assertEqual(s, 1.0)
self.assertEqual(l, 0.5)
def test_black(self):
r, g, b = 0, 0, 0
h, s, l = rgb2hsl(r, g, b)
self.assertEqual(s, 0.0)
self.assertEqual(s, 0.0)
self.assertEqual(l, 0.0)
def test_white(self):
r, g, b = 255, 255, 255
h, s, l = rgb2hsl(r, g, b)
self.assertEqual(s, 0.0)
self.assertEqual(s, 0.0)
self.assertEqual(l, 1.0)
| 28.918033
| 52
| 0.545918
| 287
| 1,764
| 3.285714
| 0.142857
| 0.33404
| 0.050901
| 0.059385
| 0.834571
| 0.83245
| 0.756098
| 0.756098
| 0.756098
| 0.756098
| 0
| 0.101151
| 0.310658
| 1,764
| 60
| 53
| 29.4
| 0.674342
| 0
| 0
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.470588
| 1
| 0.156863
| false
| 0
| 0.039216
| 0
| 0.215686
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
c147353fde49824f5bf4a708c341ec64a2d51f57
| 33,481
|
py
|
Python
|
face_pose_dataset/third_party/fsa_estimator/SSRNET_model.py
|
samuelbaltanas/face-pose-dataset
|
84c864c155ac7c0b231032d403c0e2b2bc10b871
|
[
"MIT"
] | 1
|
2020-06-18T07:58:46.000Z
|
2020-06-18T07:58:46.000Z
|
face_pose_dataset/third_party/fsa_estimator/SSRNET_model.py
|
samuelbaltanas/face-pose-dataset
|
84c864c155ac7c0b231032d403c0e2b2bc10b871
|
[
"MIT"
] | null | null | null |
face_pose_dataset/third_party/fsa_estimator/SSRNET_model.py
|
samuelbaltanas/face-pose-dataset
|
84c864c155ac7c0b231032d403c0e2b2bc10b871
|
[
"MIT"
] | null | null | null |
import logging
import sys
import numpy as np
from tensorflow.keras import backend as K
from tensorflow.keras import layers
from tensorflow.keras.layers import (
AveragePooling2D,
BatchNormalization,
Conv2D,
MaxPooling2D,
SeparableConv2D,
)
from tensorflow.keras.models import Model
sys.setrecursionlimit(2 ** 20)
np.random.seed(2 ** 10)
class SSR_net:
def __init__(self, image_size, stage_num, lambda_local, lambda_d):
if K.image_dim_ordering() == "th":
logging.debug("image_dim_ordering = 'th'")
self._channel_axis = 1
self._input_shape = (3, image_size, image_size)
else:
logging.debug("image_dim_ordering = 'tf'")
self._channel_axis = -1
self._input_shape = (image_size, image_size, 3)
self.stage_num = stage_num
self.lambda_local = lambda_local
self.lambda_d = lambda_d
def __call__(self):
logging.debug("Creating model...")
inputs = layers.Input(shape=self._input_shape)
# -------------------------------------------------------------------------------------------------------------------------
x = Conv2D(32, (3, 3))(inputs)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer1 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer1)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer2 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer2)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer3 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer3)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
# -------------------------------------------------------------------------------------------------------------------------
s = Conv2D(16, (3, 3))(inputs)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer1 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer1)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer2 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer2)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer3 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer3)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
# -------------------------------------------------------------------------------------------------------------------------
# Classifier block
s_layer4 = Conv2D(10, (1, 1), activation="relu")(s)
s_layer4 = layers.Flatten()(s_layer4)
s_layer4_mix = layers.Dropout(0.2)(s_layer4)
s_layer4_mix = layers.Dense(units=self.stage_num[0], activation="relu")(
s_layer4_mix
)
x_layer4 = Conv2D(10, (1, 1), activation="relu")(x)
x_layer4 = layers.Flatten()(x_layer4)
x_layer4_mix = layers.Dropout(0.2)(x_layer4)
x_layer4_mix = layers.Dense(units=self.stage_num[0], activation="relu")(
x_layer4_mix
)
feat_a_s1_pre = layers.Multiply()([s_layer4, x_layer4])
delta_s1 = layers.Dense(1, activation="tanh", name="delta_s1")(feat_a_s1_pre)
feat_a_s1 = layers.Multiply()([s_layer4_mix, x_layer4_mix])
feat_a_s1 = layers.Dense(2 * self.stage_num[0], activation="relu")(feat_a_s1)
pred_a_s1 = layers.Dense(
units=self.stage_num[0], activation="relu", name="pred_age_stage1"
)(feat_a_s1)
# feat_local_s1 = layers.Lambda(lambda x: x/10)(feat_a_s1)
# feat_a_s1_local = Dropout(0.2)(pred_a_s1)
local_s1 = layers.Dense(
units=self.stage_num[0], activation="tanh", name="local_delta_stage1",
)(feat_a_s1)
# -------------------------------------------------------------------------------------------------------------------------
s_layer2 = Conv2D(10, (1, 1), activation="relu")(s_layer2)
s_layer2 = MaxPooling2D(4, 4)(s_layer2)
s_layer2 = layers.Flatten()(s_layer2)
s_layer2_mix = layers.Dropout(0.2)(s_layer2)
s_layer2_mix = layers.Dense(self.stage_num[1], activation="relu")(s_layer2_mix)
x_layer2 = Conv2D(10, (1, 1), activation="relu")(x_layer2)
x_layer2 = AveragePooling2D(4, 4)(x_layer2)
x_layer2 = layers.Flatten()(x_layer2)
x_layer2_mix = layers.Dropout(0.2)(x_layer2)
x_layer2_mix = layers.Dense(self.stage_num[1], activation="relu")(x_layer2_mix)
feat_a_s2_pre = layers.Multiply()([s_layer2, x_layer2])
delta_s2 = layers.Dense(1, activation="tanh", name="delta_s2")(feat_a_s2_pre)
feat_a_s2 = layers.Multiply()([s_layer2_mix, x_layer2_mix])
feat_a_s2 = layers.Dense(2 * self.stage_num[1], activation="relu")(feat_a_s2)
pred_a_s2 = layers.Dense(
units=self.stage_num[1], activation="relu", name="pred_age_stage2"
)(feat_a_s2)
# feat_local_s2 = layers.Lambda(lambda x: x/10)(feat_a_s2)
# feat_a_s2_local = Dropout(0.2)(pred_a_s2)
local_s2 = layers.Dense(
units=self.stage_num[1], activation="tanh", name="local_delta_stage2",
)(feat_a_s2)
# -------------------------------------------------------------------------------------------------------------------------
s_layer1 = Conv2D(10, (1, 1), activation="relu")(s_layer1)
s_layer1 = MaxPooling2D(8, 8)(s_layer1)
s_layer1 = layers.Flatten()(s_layer1)
s_layer1_mix = layers.Dropout(0.2)(s_layer1)
s_layer1_mix = layers.Dense(self.stage_num[2], activation="relu")(s_layer1_mix)
x_layer1 = Conv2D(10, (1, 1), activation="relu")(x_layer1)
x_layer1 = AveragePooling2D(8, 8)(x_layer1)
x_layer1 = layers.Flatten()(x_layer1)
x_layer1_mix = layers.Dropout(0.2)(x_layer1)
x_layer1_mix = layers.Dense(self.stage_num[2], activation="relu")(x_layer1_mix)
feat_a_s3_pre = layers.Multiply()([s_layer1, x_layer1])
delta_s3 = layers.Dense(1, activation="tanh", name="delta_s3")(feat_a_s3_pre)
feat_a_s3 = layers.Multiply()([s_layer1_mix, x_layer1_mix])
feat_a_s3 = layers.Dense(2 * self.stage_num[2], activation="relu")(feat_a_s3)
pred_a_s3 = layers.Dense(
units=self.stage_num[2], activation="relu", name="pred_age_stage3"
)(feat_a_s3)
# feat_local_s3 = layers.Lambda(lambda x: x/10)(feat_a_s3)
# feat_a_s3_local = Dropout(0.2)(pred_a_s3)
local_s3 = layers.Dense(
units=self.stage_num[2], activation="tanh", name="local_delta_stage3",
)(feat_a_s3)
# -------------------------------------------------------------------------------------------------------------------------
def merge_age(x, s1, s2, s3, lambda_local, lambda_d):
a = x[0][:, 0] * 0
b = x[0][:, 0] * 0
c = x[0][:, 0] * 0
# A = s1 * s2 * s3
V = 101
for i in range(0, s1):
a = a + (i + lambda_local * x[6][:, i]) * x[0][:, i]
a = K.expand_dims(a, -1)
a = a / (s1 * (1 + lambda_d * x[3]))
for j in range(0, s2):
b = b + (j + lambda_local * x[7][:, j]) * x[1][:, j]
b = K.expand_dims(b, -1)
b = b / (s1 * (1 + lambda_d * x[3])) / (s2 * (1 + lambda_d * x[4]))
for k in range(0, s3):
c = c + (k + lambda_local * x[8][:, k]) * x[2][:, k]
c = K.expand_dims(c, -1)
c = (
c
/ (s1 * (1 + lambda_d * x[3]))
/ (s2 * (1 + lambda_d * x[4]))
/ (s3 * (1 + lambda_d * x[5]))
)
age = (a + b + c) * V
return age
pred_a = layers.Lambda(
merge_age,
arguments={
"s1": self.stage_num[0],
"s2": self.stage_num[1],
"s3": self.stage_num[2],
"lambda_local": self.lambda_local,
"lambda_d": self.lambda_d,
},
name="pred_a",
)(
[
pred_a_s1,
pred_a_s2,
pred_a_s3,
delta_s1,
delta_s2,
delta_s3,
local_s1,
local_s2,
local_s3,
]
)
model = Model(inputs=inputs, outputs=pred_a)
return model
class SSR_net_general:
def __init__(self, image_size, stage_num, lambda_local, lambda_d):
if K.image_dim_ordering() == "th":
logging.debug("image_dim_ordering = 'th'")
self._channel_axis = 1
self._input_shape = (3, image_size, image_size)
else:
logging.debug("image_dim_ordering = 'tf'")
self._channel_axis = -1
self._input_shape = (image_size, image_size, 3)
self.stage_num = stage_num
self.lambda_local = lambda_local
self.lambda_d = lambda_d
def __call__(self):
logging.debug("Creating model...")
inputs = layers.Input(shape=self._input_shape)
# -------------------------------------------------------------------------------------------------------------------------
x = Conv2D(32, (3, 3))(inputs)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer1 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer1)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer2 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer2)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer3 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3))(x_layer3)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
# -------------------------------------------------------------------------------------------------------------------------
s = Conv2D(16, (3, 3))(inputs)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer1 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer1)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer2 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer2)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer3 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3))(s_layer3)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
# -------------------------------------------------------------------------------------------------------------------------
# Classifier block
s_layer4 = Conv2D(10, (1, 1), activation="relu")(s)
s_layer4 = layers.Flatten()(s_layer4)
s_layer4_mix = layers.Dropout(0.2)(s_layer4)
s_layer4_mix = layers.Dense(units=self.stage_num[0], activation="relu")(
s_layer4_mix
)
x_layer4 = Conv2D(10, (1, 1), activation="relu")(x)
x_layer4 = layers.Flatten()(x_layer4)
x_layer4_mix = layers.Dropout(0.2)(x_layer4)
x_layer4_mix = layers.Dense(units=self.stage_num[0], activation="relu")(
x_layer4_mix
)
feat_s1_pre = layers.Multiply()([s_layer4, x_layer4])
delta_s1 = layers.Dense(1, activation="tanh", name="delta_s1")(feat_s1_pre)
feat_s1 = layers.Multiply()([s_layer4_mix, x_layer4_mix])
feat_s1 = layers.Dense(2 * self.stage_num[0], activation="relu")(feat_s1)
pred_s1 = layers.Dense(
units=self.stage_num[0], activation="relu", name="pred_stage1"
)(feat_s1)
local_s1 = layers.Dense(
units=self.stage_num[0], activation="tanh", name="local_delta_stage1",
)(feat_s1)
# -------------------------------------------------------------------------------------------------------------------------
s_layer2 = Conv2D(10, (1, 1), activation="relu")(s_layer2)
s_layer2 = MaxPooling2D(4, 4)(s_layer2)
s_layer2 = layers.Flatten()(s_layer2)
s_layer2_mix = layers.Dropout(0.2)(s_layer2)
s_layer2_mix = layers.Dense(self.stage_num[1], activation="relu")(s_layer2_mix)
x_layer2 = Conv2D(10, (1, 1), activation="relu")(x_layer2)
x_layer2 = AveragePooling2D(4, 4)(x_layer2)
x_layer2 = layers.Flatten()(x_layer2)
x_layer2_mix = layers.Dropout(0.2)(x_layer2)
x_layer2_mix = layers.Dense(self.stage_num[1], activation="relu")(x_layer2_mix)
feat_s2_pre = layers.Multiply()([s_layer2, x_layer2])
delta_s2 = layers.Dense(1, activation="tanh", name="delta_s2")(feat_s2_pre)
feat_s2 = layers.Multiply()([s_layer2_mix, x_layer2_mix])
feat_s2 = layers.Dense(2 * self.stage_num[1], activation="relu")(feat_s2)
pred_s2 = layers.Dense(
units=self.stage_num[1], activation="relu", name="pred_stage2"
)(feat_s2)
local_s2 = layers.Dense(
units=self.stage_num[1], activation="tanh", name="local_delta_stage2",
)(feat_s2)
# -------------------------------------------------------------------------------------------------------------------------
s_layer1 = Conv2D(10, (1, 1), activation="relu")(s_layer1)
s_layer1 = MaxPooling2D(8, 8)(s_layer1)
s_layer1 = layers.Flatten()(s_layer1)
s_layer1_mix = layers.Dropout(0.2)(s_layer1)
s_layer1_mix = layers.Dense(self.stage_num[2], activation="relu")(s_layer1_mix)
x_layer1 = Conv2D(10, (1, 1), activation="relu")(x_layer1)
x_layer1 = AveragePooling2D(8, 8)(x_layer1)
x_layer1 = layers.Flatten()(x_layer1)
x_layer1_mix = layers.Dropout(0.2)(x_layer1)
x_layer1_mix = layers.Dense(self.stage_num[2], activation="relu")(x_layer1_mix)
feat_s3_pre = layers.Multiply()([s_layer1, x_layer1])
delta_s3 = layers.Dense(1, activation="tanh", name="delta_s3")(feat_s3_pre)
feat_s3 = layers.Multiply()([s_layer1_mix, x_layer1_mix])
feat_s3 = layers.Dense(2 * self.stage_num[2], activation="relu")(feat_s3)
pred_s3 = layers.Dense(
units=self.stage_num[2], activation="relu", name="pred_stage3"
)(feat_s3)
local_s3 = layers.Dense(
units=self.stage_num[2], activation="tanh", name="local_delta_stage3",
)(feat_s3)
# -------------------------------------------------------------------------------------------------------------------------
def SSR_module(x, s1, s2, s3, lambda_local, lambda_d):
a = x[0][:, 0] * 0
b = x[0][:, 0] * 0
c = x[0][:, 0] * 0
V = 1
for i in range(0, s1):
a = a + (i + lambda_local * x[6][:, i]) * x[0][:, i]
a = K.expand_dims(a, -1)
a = a / (s1 * (1 + lambda_d * x[3]))
for j in range(0, s2):
b = b + (j + lambda_local * x[7][:, j]) * x[1][:, j]
b = K.expand_dims(b, -1)
b = b / (s1 * (1 + lambda_d * x[3])) / (s2 * (1 + lambda_d * x[4]))
for k in range(0, s3):
c = c + (k + lambda_local * x[8][:, k]) * x[2][:, k]
c = K.expand_dims(c, -1)
c = (
c
/ (s1 * (1 + lambda_d * x[3]))
/ (s2 * (1 + lambda_d * x[4]))
/ (s3 * (1 + lambda_d * x[5]))
)
out = (a + b + c) * V
return out
pred = layers.Lambda(
SSR_module,
arguments={
"s1": self.stage_num[0],
"s2": self.stage_num[1],
"s3": self.stage_num[2],
"lambda_local": self.lambda_local,
"lambda_d": self.lambda_d,
},
name="pred",
)(
[
pred_s1,
pred_s2,
pred_s3,
delta_s1,
delta_s2,
delta_s3,
local_s1,
local_s2,
local_s3,
]
)
model = Model(inputs=inputs, outputs=pred)
return model
class SSR_net_MT:
def __init__(self, image_size, num_classes, stage_num, lambda_d):
if K.image_dim_ordering() == "th":
logging.debug("image_dim_ordering = 'th'")
self._channel_axis = 1
self._input_shape = (3, image_size, image_size)
else:
logging.debug("image_dim_ordering = 'tf'")
self._channel_axis = -1
self._input_shape = (image_size, image_size, 3)
self.num_classes = num_classes
self.stage_num = stage_num
self.lambda_d = lambda_d
def __call__(self):
logging.debug("Creating model...")
img_inputs = layers.Input(self._input_shape)
# -------------------------------------------------------------------------------------------------------------------------
x = SeparableConv2D(16, (3, 3), padding="same")(img_inputs)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x_layer1 = AveragePooling2D((2, 2))(x)
x = SeparableConv2D(32, (3, 3), padding="same")(x_layer1)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x = SeparableConv2D(32, (3, 3), padding="same")(x)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x_layer2 = AveragePooling2D((2, 2))(x)
x = SeparableConv2D(64, (3, 3), padding="same")(x_layer2)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x = SeparableConv2D(64, (3, 3), padding="same")(x)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x_layer3 = AveragePooling2D((2, 2))(x)
x = SeparableConv2D(128, (3, 3), padding="same")(x_layer3)
x = BatchNormalization(axis=-1)(x)
x = layers.Activation("relu")(x)
x = SeparableConv2D(128, (3, 3), padding="same")(x)
x = BatchNormalization(axis=-1)(x)
x_layer4 = layers.Activation("relu")(x)
# -------------------------------------------------------------------------------------------------------------------------
s = SeparableConv2D(16, (3, 3), padding="same")(img_inputs)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s_layer1 = MaxPooling2D((2, 2))(s)
s = SeparableConv2D(32, (3, 3), padding="same")(s_layer1)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s = SeparableConv2D(32, (3, 3), padding="same")(s)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s_layer2 = MaxPooling2D((2, 2))(s)
s = SeparableConv2D(64, (3, 3), padding="same")(s_layer2)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s = SeparableConv2D(64, (3, 3), padding="same")(s)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s_layer3 = MaxPooling2D((2, 2))(s)
s = SeparableConv2D(128, (3, 3), padding="same")(s_layer3)
s = BatchNormalization(axis=-1)(s)
s = layers.Activation("tanh")(s)
s = SeparableConv2D(128, (3, 3), padding="same")(s)
s = BatchNormalization(axis=-1)(s)
s_layer4 = layers.Activation("tanh")(s)
# -------------------------------------------------------------------------------------------------------------------------
# Classifier block
s_layer4 = Conv2D(64, (1, 1), activation="tanh")(s_layer4)
s_layer4 = MaxPooling2D((2, 2))(s_layer4)
x_layer4 = Conv2D(64, (1, 1), activation="relu")(x_layer4)
x_layer4 = AveragePooling2D((2, 2))(x_layer4)
feat_s1_pre = layers.Multiply()([s_layer4, x_layer4])
feat_s1_pre = layers.Flatten()(feat_s1_pre)
feat_delta_s1 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s1_pre
)
delta_s1 = layers.Dense(self.num_classes, activation="tanh", name="delta_s1")(
feat_delta_s1
)
feat_local_s1 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s1_pre
)
local_s1 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage1"
)(feat_local_s1)
feat_pred_s1 = layers.Dense(
self.stage_num[0] * self.num_classes, activation="relu"
)(feat_s1_pre)
pred_a_s1 = layers.Reshape((self.num_classes, self.stage_num[0]))(feat_pred_s1)
# -------------------------------------------------------------------------------------------------------------------------
s_layer3 = Conv2D(64, (1, 1), activation="tanh")(s_layer3)
s_layer3 = MaxPooling2D((2, 2))(s_layer3)
x_layer3 = Conv2D(64, (1, 1), activation="relu")(x_layer3)
x_layer3 = AveragePooling2D((2, 2))(x_layer3)
feat_s2_pre = layers.Multiply()([s_layer3, x_layer3])
feat_s2_pre = layers.Flatten()(feat_s2_pre)
feat_delta_s2 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s2_pre
)
delta_s2 = layers.Dense(self.num_classes, activation="tanh", name="delta_s2")(
feat_delta_s2
)
feat_local_s2 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s2_pre
)
local_s2 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage2"
)(feat_local_s2)
feat_pred_s2 = layers.Dense(
self.stage_num[1] * self.num_classes, activation="relu"
)(feat_s2_pre)
pred_a_s2 = layers.Reshape((self.num_classes, self.stage_num[1]))(feat_pred_s2)
# -------------------------------------------------------------------------------------------------------------------------
s_layer2 = Conv2D(64, (1, 1), activation="tanh")(s_layer2)
s_layer2 = MaxPooling2D((2, 2))(s_layer2)
x_layer2 = Conv2D(64, (1, 1), activation="relu")(x_layer2)
x_layer2 = AveragePooling2D((2, 2))(x_layer2)
feat_s3_pre = layers.Multiply()([s_layer2, x_layer2])
feat_s3_pre = layers.Flatten()(feat_s3_pre)
feat_delta_s3 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s3_pre
)
delta_s3 = layers.Dense(self.num_classes, activation="tanh", name="delta_s3")(
feat_delta_s3
)
feat_local_s3 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s3_pre
)
local_s3 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage3"
)(feat_local_s3)
feat_pred_s3 = layers.Dense(
self.stage_num[2] * self.num_classes, activation="relu"
)(feat_s3_pre)
pred_a_s3 = layers.Reshape((self.num_classes, self.stage_num[2]))(feat_pred_s3)
# -------------------------------------------------------------------------------------------------------------------------
def SSR_module(x, s1, s2, s3, lambda_d):
a = x[0][:, :, 0] * 0
b = x[0][:, :, 0] * 0
c = x[0][:, :, 0] * 0
di = s1 // 2
dj = s2 // 2
dk = s3 // 2
V = 99
# lambda_d = 0.9
for i in range(0, s1):
a = a + (i - di + x[6]) * x[0][:, :, i]
# a = K.expand_dims(a,-1)
a = a / (s1 * (1 + lambda_d * x[3]))
for j in range(0, s2):
b = b + (j - dj + x[7]) * x[1][:, :, j]
# b = K.expand_dims(b,-1)
b = b / (s1 * (1 + lambda_d * x[3])) / (s2 * (1 + lambda_d * x[4]))
for k in range(0, s3):
c = c + (k - dk + x[8]) * x[2][:, :, k]
# c = K.expand_dims(c,-1)
c = (
c
/ (s1 * (1 + lambda_d * x[3]))
/ (s2 * (1 + lambda_d * x[4]))
/ (s3 * (1 + lambda_d * x[5]))
)
pred = (a + b + c) * V
return pred
pred_pose = layers.Lambda(
SSR_module,
arguments={
"s1": self.stage_num[0],
"s2": self.stage_num[1],
"s3": self.stage_num[2],
"lambda_d": self.lambda_d,
},
name="pred_pose",
)(
[
pred_a_s1,
pred_a_s2,
pred_a_s3,
delta_s1,
delta_s2,
delta_s3,
local_s1,
local_s2,
local_s3,
]
)
model = Model(inputs=img_inputs, outputs=pred_pose)
return model
class SSR_net_ori_MT:
def __init__(self, image_size, num_classes, stage_num, lambda_d):
if K.image_dim_ordering() == "th":
logging.debug("image_dim_ordering = 'th'")
self._channel_axis = 1
self._input_shape = (3, image_size, image_size)
else:
logging.debug("image_dim_ordering = 'tf'")
self._channel_axis = -1
self._input_shape = (image_size, image_size, 3)
self.num_classes = num_classes
self.stage_num = stage_num
self.lambda_d = lambda_d
def __call__(self):
logging.debug("Creating model...")
img_inputs = layers.Input(self._input_shape)
# -------------------------------------------------------------------------------------------------------------------------
x = Conv2D(32, (3, 3), padding="same")(img_inputs)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer1 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3), padding="same")(x_layer1)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer2 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3), padding="same")(x_layer2)
x = BatchNormalization(axis=self._channel_axis)(x)
x = layers.Activation("relu")(x)
x_layer3 = AveragePooling2D(2, 2)(x)
x = Conv2D(32, (3, 3), padding="same")(x_layer3)
x = BatchNormalization(axis=self._channel_axis)(x)
x_layer4 = layers.Activation("relu")(x)
# -------------------------------------------------------------------------------------------------------------------------
s = Conv2D(16, (3, 3), padding="same")(img_inputs)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer1 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3), padding="same")(s_layer1)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer2 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3), padding="same")(s_layer2)
s = BatchNormalization(axis=self._channel_axis)(s)
s = layers.Activation("tanh")(s)
s_layer3 = MaxPooling2D(2, 2)(s)
s = Conv2D(16, (3, 3), padding="same")(s_layer3)
s = BatchNormalization(axis=self._channel_axis)(s)
s_layer4 = layers.Activation("tanh")(s)
# -------------------------------------------------------------------------------------------------------------------------
# Classifier block
s_layer4 = Conv2D(64, (1, 1), activation="tanh")(s_layer4)
s_layer4 = MaxPooling2D((2, 2))(s_layer4)
x_layer4 = Conv2D(64, (1, 1), activation="relu")(x_layer4)
x_layer4 = AveragePooling2D((2, 2))(x_layer4)
feat_s1_pre = layers.Multiply()([s_layer4, x_layer4])
feat_s1_pre = layers.Flatten()(feat_s1_pre)
feat_delta_s1 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s1_pre
)
delta_s1 = layers.Dense(self.num_classes, activation="tanh", name="delta_s1")(
feat_delta_s1
)
feat_local_s1 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s1_pre
)
local_s1 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage1"
)(feat_local_s1)
feat_pred_s1 = layers.Dense(
self.stage_num[0] * self.num_classes, activation="relu"
)(feat_s1_pre)
pred_a_s1 = layers.Reshape((self.num_classes, self.stage_num[0]))(feat_pred_s1)
# -------------------------------------------------------------------------------------------------------------------------
s_layer3 = Conv2D(64, (1, 1), activation="tanh")(s_layer3)
s_layer3 = MaxPooling2D((2, 2))(s_layer3)
x_layer3 = Conv2D(64, (1, 1), activation="relu")(x_layer3)
x_layer3 = AveragePooling2D((2, 2))(x_layer3)
feat_s2_pre = layers.Multiply()([s_layer3, x_layer3])
feat_s2_pre = layers.Flatten()(feat_s2_pre)
feat_delta_s2 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s2_pre
)
delta_s2 = layers.Dense(self.num_classes, activation="tanh", name="delta_s2")(
feat_delta_s2
)
feat_local_s2 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s2_pre
)
local_s2 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage2"
)(feat_local_s2)
feat_pred_s2 = layers.Dense(
self.stage_num[1] * self.num_classes, activation="relu"
)(feat_s2_pre)
pred_a_s2 = layers.Reshape((self.num_classes, self.stage_num[1]))(feat_pred_s2)
# -------------------------------------------------------------------------------------------------------------------------
s_layer2 = Conv2D(64, (1, 1), activation="tanh")(s_layer2)
s_layer2 = MaxPooling2D((2, 2))(s_layer2)
x_layer2 = Conv2D(64, (1, 1), activation="relu")(x_layer2)
x_layer2 = AveragePooling2D((2, 2))(x_layer2)
feat_s3_pre = layers.Multiply()([s_layer2, x_layer2])
feat_s3_pre = layers.Flatten()(feat_s3_pre)
feat_delta_s3 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s3_pre
)
delta_s3 = layers.Dense(self.num_classes, activation="tanh", name="delta_s3")(
feat_delta_s3
)
feat_local_s3 = layers.Dense(2 * self.num_classes, activation="tanh")(
feat_s3_pre
)
local_s3 = layers.Dense(
units=self.num_classes, activation="tanh", name="local_delta_stage3"
)(feat_local_s3)
feat_pred_s3 = layers.Dense(
self.stage_num[2] * self.num_classes, activation="relu"
)(feat_s3_pre)
pred_a_s3 = layers.Reshape((self.num_classes, self.stage_num[2]))(feat_pred_s3)
# -------------------------------------------------------------------------------------------------------------------------
def SSR_module(x, s1, s2, s3, lambda_d):
a = x[0][:, :, 0] * 0
b = x[0][:, :, 0] * 0
c = x[0][:, :, 0] * 0
di = s1 // 2
dj = s2 // 2
dk = s3 // 2
V = 99
# lambda_d = 0.9
for i in range(0, s1):
a = a + (i - di + x[6]) * x[0][:, :, i]
# a = K.expand_dims(a,-1)
a = a / (s1 * (1 + lambda_d * x[3]))
for j in range(0, s2):
b = b + (j - dj + x[7]) * x[1][:, :, j]
# b = K.expand_dims(b,-1)
b = b / (s1 * (1 + lambda_d * x[3])) / (s2 * (1 + lambda_d * x[4]))
for k in range(0, s3):
c = c + (k - dk + x[8]) * x[2][:, :, k]
# c = K.expand_dims(c,-1)
c = (
c
/ (s1 * (1 + lambda_d * x[3]))
/ (s2 * (1 + lambda_d * x[4]))
/ (s3 * (1 + lambda_d * x[5]))
)
pred = (a + b + c) * V
return pred
pred_pose = layers.Lambda(
SSR_module,
arguments={
"s1": self.stage_num[0],
"s2": self.stage_num[1],
"s3": self.stage_num[2],
"lambda_d": self.lambda_d,
},
name="pred_pose",
)(
[
pred_a_s1,
pred_a_s2,
pred_a_s3,
delta_s1,
delta_s2,
delta_s3,
local_s1,
local_s2,
local_s3,
]
)
model = Model(inputs=img_inputs, outputs=pred_pose)
return model
| 40.681652
| 131
| 0.49655
| 4,064
| 33,481
| 3.830463
| 0.030758
| 0.060256
| 0.04471
| 0.046252
| 0.962999
| 0.955097
| 0.95105
| 0.95105
| 0.941093
| 0.922079
| 0
| 0.053857
| 0.284042
| 33,481
| 822
| 132
| 40.731144
| 0.595553
| 0.104029
| 0
| 0.781109
| 0
| 0
| 0.04587
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017991
| false
| 0
| 0.010495
| 0
| 0.046477
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 7
|
c1540d6e73722c863dfcae0e270e49aa99bf2bc5
| 1,730
|
py
|
Python
|
misc/deep_learning_notes/Ch3 Advanced Tensorflow/GPU and device management tests/1_simple_GPU_test.py
|
tmjnow/MoocX
|
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
|
[
"MIT"
] | 7
|
2017-06-13T05:24:15.000Z
|
2022-01-09T01:10:28.000Z
|
misc/deep_learning_notes/Ch3 Advanced Tensorflow/GPU and device management tests/1_simple_GPU_test.py
|
tmjnow/MoocX
|
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
|
[
"MIT"
] | 11
|
2017-05-08T23:30:50.000Z
|
2017-06-24T21:57:42.000Z
|
misc/deep_learning_notes/Ch3 Advanced Tensorflow/GPU and device management tests/1_simple_GPU_test.py
|
kinshuk4/MoocX
|
52c8450ff7ecc8450a8adc2457233d5777a3d5bb
|
[
"MIT"
] | 4
|
2017-10-05T12:56:53.000Z
|
2020-06-14T17:01:32.000Z
|
import tensorflow as tf
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
with tf.Session(config=tf.ConfigProto(log_device_placement=True)) as sess:
print(sess.run(c))
""" prints:
Device mapping:
/job:localhost/replica:0/task:0/gpu:0 -> device: 0, name: GRID K520, pci bus id: 0000:00:03.0
/job:localhost/replica:0/task:0/gpu:1 -> device: 1, name: GRID K520, pci bus id: 0000:00:04.0
/job:localhost/replica:0/task:0/gpu:2 -> device: 2, name: GRID K520, pci bus id: 0000:00:05.0
/job:localhost/replica:0/task:0/gpu:3 -> device: 3, name: GRID K520, pci bus id: 0000:00:06.0
I tensorflow/core/common_runtime/direct_session.cc:175] Device mapping:
/job:localhost/replica:0/task:0/gpu:0 -> device: 0, name: GRID K520, pci bus id: 0000:00:03.0
/job:localhost/replica:0/task:0/gpu:1 -> device: 1, name: GRID K520, pci bus id: 0000:00:04.0
/job:localhost/replica:0/task:0/gpu:2 -> device: 2, name: GRID K520, pci bus id: 0000:00:05.0
/job:localhost/replica:0/task:0/gpu:3 -> device: 3, name: GRID K520, pci bus id: 0000:00:06.0
MatMul: /job:localhost/replica:0/task:0/gpu:0
I tensorflow/core/common_runtime/simple_placer.cc:818] MatMul: /job:localhost/replica:0/task:0/gpu:0
b: /job:localhost/replica:0/task:0/gpu:0
I tensorflow/core/common_runtime/simple_placer.cc:818] b: /job:localhost/replica:0/task:0/gpu:0
a: /job:localhost/replica:0/task:0/gpu:0
I tensorflow/core/common_runtime/simple_placer.cc:818] a: /job:localhost/replica:0/task:0/gpu:0
[[ 22. 28.]
[ 49. 64.]]
"""
| 59.655172
| 104
| 0.672254
| 334
| 1,730
| 3.446108
| 0.191617
| 0.14596
| 0.231103
| 0.243267
| 0.827976
| 0.827976
| 0.803649
| 0.803649
| 0.803649
| 0.714162
| 0
| 0.131347
| 0.146243
| 1,730
| 29
| 105
| 59.655172
| 0.647935
| 0.03237
| 0
| 0
| 0
| 0
| 0.006826
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.166667
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 8
|
c17c5ca0e7a53ec874abc54caefe80f5813b59fe
| 114
|
py
|
Python
|
website/discovery/views.py
|
gaybro8777/osf.io
|
30408511510a40bc393565817b343ef5fd76ab14
|
[
"Apache-2.0"
] | 628
|
2015-01-15T04:33:22.000Z
|
2022-03-30T06:40:10.000Z
|
website/discovery/views.py
|
gaybro8777/osf.io
|
30408511510a40bc393565817b343ef5fd76ab14
|
[
"Apache-2.0"
] | 4,712
|
2015-01-02T01:41:53.000Z
|
2022-03-30T14:18:40.000Z
|
website/discovery/views.py
|
Johnetordoff/osf.io
|
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
|
[
"Apache-2.0"
] | 371
|
2015-01-12T16:14:08.000Z
|
2022-03-31T18:58:29.000Z
|
from framework.flask import redirect
def redirect_activity_to_search(**kwargs):
return redirect('/search/')
| 19
| 42
| 0.77193
| 14
| 114
| 6.071429
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 114
| 5
| 43
| 22.8
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0.070175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 7
|
c18ce0c96127691292000d21a5c5c400076d0c48
| 97
|
py
|
Python
|
lib/models/mixformer/__init__.py
|
SangbumChoi/MixFormer
|
6a1d215abcf9812a4530ba3930fea74ea5d3c51d
|
[
"MIT"
] | 103
|
2022-03-21T13:40:05.000Z
|
2022-03-31T13:31:06.000Z
|
lib/models/mixformer/__init__.py
|
SangbumChoi/MixFormer
|
6a1d215abcf9812a4530ba3930fea74ea5d3c51d
|
[
"MIT"
] | 8
|
2022-03-22T12:33:17.000Z
|
2022-03-30T16:12:02.000Z
|
lib/models/mixformer/__init__.py
|
SangbumChoi/MixFormer
|
6a1d215abcf9812a4530ba3930fea74ea5d3c51d
|
[
"MIT"
] | 18
|
2022-03-21T13:40:06.000Z
|
2022-03-31T19:08:10.000Z
|
from .mixformer import build_mixformer
from .mixformer_online import build_mixformer_online_score
| 48.5
| 58
| 0.907216
| 13
| 97
| 6.384615
| 0.461538
| 0.313253
| 0.481928
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072165
| 97
| 2
| 58
| 48.5
| 0.922222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 7
|
c1b431fad52156e083546e41acd6f14de77de6d9
| 109
|
py
|
Python
|
common/appenginepatch/ragendja/auth/models.py
|
westurner/nhs-social-web
|
18e1bfa217284add514041db27efe9d6c58ac141
|
[
"BSD-3-Clause"
] | 2
|
2017-07-25T17:53:01.000Z
|
2018-06-27T10:16:10.000Z
|
common/appenginepatch/ragendja/auth/models.py
|
westurner/nhs-social-web
|
18e1bfa217284add514041db27efe9d6c58ac141
|
[
"BSD-3-Clause"
] | 1
|
2022-01-18T11:30:41.000Z
|
2022-01-18T11:30:41.000Z
|
common/appenginepatch/ragendja/auth/models.py
|
westurner/nhs-social-web
|
18e1bfa217284add514041db27efe9d6c58ac141
|
[
"BSD-3-Clause"
] | 1
|
2022-01-18T10:47:55.000Z
|
2022-01-18T10:47:55.000Z
|
from django.contrib.auth.models import *
from django.contrib.auth.models import DjangoCompatibleUser as User
| 36.333333
| 67
| 0.844037
| 15
| 109
| 6.133333
| 0.6
| 0.217391
| 0.369565
| 0.456522
| 0.717391
| 0.717391
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091743
| 109
| 2
| 68
| 54.5
| 0.929293
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 9
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.