MCPcopy Create free account
hub / github.com/TPAFS/transparency-data / get_schema

Function get_schema

validator/src/main.rs:36–488  ·  view source on GitHub ↗
(schema_name: &str)

Source from the content-addressed store, hash-verified

34}
35
36fn get_schema(schema_name: &str) -> Result<&[DataCol], Box<dyn Error>> {
37 let cols: &[DataCol];
38
39 match schema_name {
40 "hospital_price_transparency" => {
41 // Columns
42 cols = &[
43 DataCol {
44 name: "ccn",
45 required: false,
46 col_type: ColType::Other,
47 },
48 DataCol {
49 name: "reporting_entity_name_legal",
50 required: false,
51 col_type: ColType::Other,
52 },
53 DataCol {
54 name: "reporting_entity_name_common",
55 required: true,
56 col_type: ColType::Other,
57 },
58 DataCol {
59 name: "reporting_entity_type",
60 required: false,
61 col_type: ColType::Enum(&["hospital", "other"]),
62 },
63 DataCol {
64 name: "machine_readable_url",
65 required: false,
66 col_type: ColType::Other,
67 },
68 DataCol {
69 name: "machine_readable_url_status",
70 required: false,
71 col_type: ColType::Enum(&["up", "down", "corrupt"]),
72 },
73 DataCol {
74 name: "machine_readable_page",
75 required: false,
76 col_type: ColType::Other,
77 },
78 DataCol {
79 name: "supplemental_url",
80 required: false,
81 col_type: ColType::Other,
82 },
83 DataCol {
84 name: "file_name",
85 required: false,
86 col_type: ColType::Other,
87 },
88 DataCol {
89 name: "file_format",
90 required: false,
91 col_type: ColType::Enum(ACCEPTED_FILE_TYPES),
92 },
93 DataCol {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected