Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!DOCTYPE html>
<html>
<body>
<p>
<input value="20" />
<button>Fibonacci</button>
</p>
<p class="result"></p>
<script type="application/lua" data-modname="fibonacci">
--from: https://gist.github.com/SegFaultAX/2772595
function fibonacci(n)
local a, b = 0, 1
for i = 1, n do
a, b = b, a + b
end
return a
end
return fibonacci
</script>
<script type="application/lua">
package.preload['lunajson._str_lib'] = (function (...)
local inf = math.huge
local byte, char, sub = string.byte, string.char, string.sub
local setmetatable = setmetatable
local floor = math.floor
local _ENV = nil
local hextbl = {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, inf, inf, inf, inf, inf, inf,
inf, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, inf, inf, inf, inf, inf, inf, inf, inf, inf,
inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf,
inf, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, inf, inf, inf, inf, inf, inf, inf, inf, inf,
}
hextbl.__index = function()
return inf
end
setmetatable(hextbl, hextbl)
return function(myerror)
local escapetbl = {
['"'] = '"',
['\\'] = '\\',
['/'] = '/',
['b'] = '\b',
['f'] = '\f',
['n'] = '\n',
['r'] = '\r',
['t'] = '\t'
}
escapetbl.__index = function()
myerror("invalid escape sequence")
end
setmetatable(escapetbl, escapetbl)
local surrogateprev = 0
local function subst(ch, rest)
-- 0.000003814697265625 = 2^-18
-- 0.000244140625 = 2^-12
-- 0.015625 = 2^-6
local u8
if ch == 'u' then
local c1, c2, c3, c4 = byte(rest, 1, 4)
local ucode = hextbl[c1-47] * 0x1000 + hextbl[c2-47] * 0x100 + hextbl[c3-47] * 0x10 + hextbl[c4-47]
if ucode == inf then
myerror("invalid unicode charcode")
end
rest = sub(rest, 5)
if ucode < 0x80 then -- 1byte
u8 = char(ucode)
elseif ucode < 0x800 then -- 2byte
u8 = char(0xC0 + floor(ucode * 0.015625), 0x80 + ucode % 0x40)
elseif ucode < 0xD800 or 0xE000 <= ucode then -- 3byte
u8 = char(0xE0 + floor(ucode * 0.000244140625), 0x80 + floor(ucode * 0.015625) % 0x40, 0x80 + ucode % 0x40)
elseif 0xD800 <= ucode and ucode < 0xDC00 then -- surrogate pair 1st
if surrogateprev == 0 then
surrogateprev = ucode
if rest == '' then
return ''
end
end
else -- surrogate pair 2nd
if surrogateprev == 0 then
surrogateprev = 1
else
ucode = 0x10000 + (surrogateprev - 0xD800) * 0x400 + (ucode - 0xDC00)
surrogateprev = 0
u8 = char(0xF0 + floor(ucode * 0.000003814697265625), 0x80 + floor(ucode * 0.000244140625) % 0x40, 0x80 + floor(ucode * 0.015625) % 0x40, 0x80 + ucode % 0x40)
end
end
end
if surrogateprev ~= 0 then
myerror("invalid surrogate pair")
end
return (u8 or escapetbl[ch]) .. rest
end
local function surrogateok()
return surrogateprev == 0
end
return {
subst = subst,
surrogateok = surrogateok
}
end
end)
package.preload['lunajson.decoder'] = (function (...)
local error = error
local byte, char, find, gsub, match, sub = string.byte, string.char, string.find, string.gsub, string.match, string.sub
local tonumber = tonumber
local tostring, setmetatable = tostring, setmetatable
-- The function that interprets JSON strings is separated into another file so as to
-- use bitwise operation to speedup unicode codepoints processing on Lua 5.3.
local genstrlib
if _VERSION == "Lua 5.3" then
genstrlib = require 'lunajson._str_lib_lua53'
else
genstrlib = require 'lunajson._str_lib'
end
local _ENV = nil
local function newdecoder()
local json, pos, nullv, arraylen
-- `f` is the temporary for dispatcher[c] and
-- the dummy for the first return value of `find`
local dispatcher, f
--[[
Helper
--]]
local function decodeerror(errmsg)
error("parse error at " .. pos .. ": " .. errmsg)
end
--[[
Invalid
--]]
local function f_err()
decodeerror('invalid value')
end
--[[
Constants
--]]
-- null
local function f_nul()
if sub(json, pos, pos+2) == 'ull' then
pos = pos+3
return nullv
end
decodeerror('invalid value')
end
-- false
local function f_fls()
if sub(json, pos, pos+3) == 'alse' then
pos = pos+4
return false
end
decodeerror('invalid value')
end
-- true
local function f_tru()
if sub(json, pos, pos+2) == 'rue' then
pos = pos+3
return true
end
decodeerror('invalid value')
end
--[[
Numbers
Conceptually, the longest prefix that matches to `-?(0|[1-9][0-9]*)(\.[0-9]*)?([eE][+-]?[0-9]*)?`
(in regexp) is captured as a number and its conformance to the JSON spec is checked.
--]]
-- deal with non-standard locales
local radixmark = match(tostring(0.5), '[^0-9]')
local fixedtonumber = tonumber
if radixmark ~= '.' then
if find(radixmark, '%W') then
radixmark = '%' .. radixmark
end
fixedtonumber = function(s)
return tonumber(gsub(s, '.', radixmark))
end
end
local function error_number()
decodeerror('invalid number')
end
-- `0(\.[0-9]*)?([eE][+-]?[0-9]*)?`
local function f_zro(mns)
local postmp = pos
local num
local c = byte(json, postmp)
if not c then
return error_number()
end
if c == 0x2E then -- is this `.`?
num = match(json, '^.[0-9]*', pos) -- skipping 0
local numlen = #num
if numlen == 1 then
return error_number()
end
postmp = pos + numlen
c = byte(json, postmp)
end
if c == 0x45 or c == 0x65 then -- is this e or E?
local numexp = match(json, '^[^eE]*[eE][-+]?[0-9]+', pos)
if not numexp then
return error_number()
end
if num then -- since `0e.*` is always 0.0, ignore those
num = numexp
end
postmp = pos + #numexp
end
pos = postmp
if num then
num = fixedtonumber(num)
else
num = 0.0
end
if mns then
num = -num
end
return num
end
-- `[1-9][0-9]*(\.[0-9]*)?([eE][+-]?[0-9]*)?`
local function f_num(mns)
pos = pos-1
local num = match(json, '^.[0-9]*%.?[0-9]*', pos)
if byte(num, -1) == 0x2E then
return error_number()
end
local postmp = pos + #num
local c = byte(json, postmp)
if c == 0x45 or c == 0x65 then -- e or E?
num = match(json, '^[^eE]*[eE][-+]?[0-9]+', pos)
if not num then
return error_number()
end
postmp = pos + #num
end
pos = postmp
num = fixedtonumber(num)-0.0
if mns then
num = -num
end
return num
end
-- skip minus sign
local function f_mns()
local c = byte(json, pos)
if c then
pos = pos+1
if c > 0x30 then
if c < 0x3A then
return f_num(true)
end
else
if c > 0x2F then
return f_zro(true)
end
end
end
decodeerror('invalid number')
end
--[[
Strings
--]]
local f_str_lib = genstrlib(decodeerror)
local f_str_surrogateok = f_str_lib.surrogateok -- whether codepoints for surrogate pair are correctly paired
local f_str_subst = f_str_lib.subst -- the function passed to gsub that interprets escapes
-- caching interpreted keys for speed
local f_str_keycache = setmetatable({}, {__mode="v"})
local function f_str(iskey)
local newpos = pos-2
local pos2 = pos
local c1, c2
repeat
newpos = find(json, '"', pos2, true) -- search '"'
if not newpos then
decodeerror("unterminated string")
end
pos2 = newpos+1
while true do -- skip preceding '\\'s
c1, c2 = byte(json, newpos-2, newpos-1)
if c2 ~= 0x5C or c1 ~= 0x5C then
break
end
newpos = newpos-2
end
until c2 ~= 0x5C -- check '"' is not preceded by '\'
local str = sub(json, pos, pos2-2)
pos = pos2
if iskey then -- check key cache
local str2 = f_str_keycache[str]
if str2 then
return str2
end
end
local str2 = str
if find(str2, '\\', 1, true) then -- check if backslash occurs
str2 = gsub(str2, '\\(.)([^\\]*)', f_str_subst) -- interpret escapes
if not f_str_surrogateok() then
decodeerror("invalid surrogate pair")
end
end
if iskey then -- commit key cache
f_str_keycache[str] = str2
end
return str2
end
--[[
Arrays, Objects
--]]
-- array
local function f_ary()
local ary = {}
f, pos = find(json, '^[ \n\r\t]*', pos)
pos = pos+1
local i = 0
if byte(json, pos) ~= 0x5D then -- check closing bracket ']', that consists an empty array
local newpos = pos-1
repeat
i = i+1
f = dispatcher[byte(json,newpos+1)] -- parse value
pos = newpos+2
ary[i] = f()
f, newpos = find(json, '^[ \n\r\t]*,[ \n\r\t]*', pos) -- check comma
until not newpos
f, newpos = find(json, '^[ \n\r\t]*%]', pos) -- check closing bracket
if not newpos then
decodeerror("no closing bracket of an array")
end
pos = newpos
end
pos = pos+1
if arraylen then -- commit the length of the array if `arraylen` is set
ary[0] = i
end
return ary
end
-- objects
local function f_obj()
local obj = {}
f, pos = find(json, '^[ \n\r\t]*', pos)
pos = pos+1
if byte(json, pos) ~= 0x7D then -- check the closing bracket '}', that consists an empty object
local newpos = pos-1
repeat
pos = newpos+1
if byte(json, pos) ~= 0x22 then -- check '"'
decodeerror("not key")
end
pos = pos+1
local key = f_str(true) -- parse key
-- optimized for compact json
-- c1, c2 == ':', <the first char of the value> or
-- c1, c2, c3 == ':', ' ', <the first char of the value>
f = f_err
do
local c1, c2, c3 = byte(json, pos, pos+3)
if c1 == 0x3A then
newpos = pos
if c2 == 0x20 then
newpos = newpos+1
c2 = c3
end
f = dispatcher[c2]
end
end
if f == f_err then -- read a colon and arbitrary number of spaces
f, newpos = find(json, '^[ \n\r\t]*:[ \n\r\t]*', pos)
if not newpos then
decodeerror("no colon after a key")
end
end
f = dispatcher[byte(json, newpos+1)] -- parse value
pos = newpos+2
obj[key] = f()
f, newpos = find(json, '^[ \n\r\t]*,[ \n\r\t]*', pos)
until not newpos
f, newpos = find(json, '^[ \n\r\t]*}', pos)
if not newpos then
decodeerror("no closing bracket of an object")
end
pos = newpos
end
pos = pos+1
return obj
end
--[[
The jump table to dispatch a parser for a value, indexed by the code of the value's first char.
Nil key means the end of json.
--]]
dispatcher = {
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_str, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_mns, f_err, f_err,
f_zro, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_ary, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_fls, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_nul, f_err,
f_err, f_err, f_err, f_err, f_tru, f_err, f_err, f_err, f_err, f_err, f_err, f_obj, f_err, f_err, f_err, f_err,
}
dispatcher[0] = f_err
dispatcher.__index = function()
decodeerror("unexpected termination")
end
setmetatable(dispatcher, dispatcher)
--[[
run decoder
--]]
local function decode(json_, pos_, nullv_, arraylen_)
json, pos, nullv, arraylen = json_, pos_, nullv_, arraylen_
pos = pos or 1
f, pos = find(json, '^[ \n\r\t]*', pos)
pos = pos+1
f = dispatcher[byte(json, pos)]
pos = pos+1
local v = f()
if pos_ then
return v, pos
else
f, pos = find(json, '^[ \n\r\t]*', pos)
if pos ~= #json then
error('json ended')
end
return v
end
end
return decode
end
return newdecoder
end)
package.preload['lunajson.encoder'] = (function (...)
local error = error
local byte, find, format, gsub, match = string.byte, string.find, string.format, string.gsub, string.match
local concat = table.concat
local tostring = tostring
local pairs, type = pairs, type
local setmetatable = setmetatable
local huge, tiny = 1/0, -1/0
local f_string_pat
if _VERSION == "Lua 5.1" then
-- use the cluttered pattern because lua 5.1 does not handle \0 in a pattern correctly
f_string_pat = '[^ -!#-[%]^-\255]'
else
f_string_pat = '[\0-\31"\\]'
end
local _ENV = nil
local function newencoder()
local v, nullv
local i, builder, visited
local function f_tostring(v)
builder[i] = tostring(v)
i = i+1
end
local radixmark = match(tostring(0.5), '[^0-9]')
local delimmark = match(tostring(12345.12345), '[^0-9' .. radixmark .. ']')
if radixmark == '.' then
radixmark = nil
end
local radixordelim
if radixmark or delimmark then
radixordelim = true
if radixmark and find(radixmark, '%W') then
radixmark = '%' .. radixmark
end
if delimmark and find(delimmark, '%W') then
delimmark = '%' .. delimmark
end
end
local f_number = function(n)
if tiny < n and n < huge then
local s = format("%.17g", n)
if radixordelim then
if delimmark then
s = gsub(s, delimmark, '')
end
if radixmark then
s = gsub(s, radixmark, '.')
end
end
builder[i] = s
i = i+1
return
end
error('invalid number')
end
local doencode
local f_string_subst = {
['"'] = '\\"',
['\\'] = '\\\\',
['\b'] = '\\b',
['\f'] = '\\f',
['\n'] = '\\n',
['\r'] = '\\r',
['\t'] = '\\t',
__index = function(_, c)
return format('\\u00%02X', byte(c))
end
}
setmetatable(f_string_subst, f_string_subst)
local function f_string(s)
builder[i] = '"'
if find(s, f_string_pat) then
s = gsub(s, f_string_pat, f_string_subst)
end
builder[i+1] = s
builder[i+2] = '"'
i = i+3
end
local function f_table(o)
if visited[o] then
error("loop detected")
end
visited[o] = true
local tmp = o[0]
if type(tmp) == 'number' then -- arraylen available
builder[i] = '['
i = i+1
for j = 1, tmp do
doencode(o[j])
builder[i] = ','
i = i+1
end
if tmp > 0 then
i = i-1
end
builder[i] = ']'
else
tmp = o[1]
if tmp ~= nil then -- detected as array
builder[i] = '['
i = i+1
local j = 2
repeat
doencode(tmp)
tmp = o[j]
if tmp == nil then
break
end
j = j+1
builder[i] = ','
i = i+1
until false
builder[i] = ']'
else -- detected as object
builder[i] = '{'
i = i+1
local tmp = i
for k, v in pairs(o) do
if type(k) ~= 'string' then
error("non-string key")
end
f_string(k)
builder[i] = ':'
i = i+1
doencode(v)
builder[i] = ','
i = i+1
end
if i > tmp then
i = i-1
end
builder[i] = '}'
end
end
i = i+1
visited[o] = nil
end
local dispatcher = {
boolean = f_tostring,
number = f_number,
string = f_string,
table = f_table,
__index = function()
error("invalid type value")
end
}
setmetatable(dispatcher, dispatcher)
function doencode(v)
if v == nullv then
builder[i] = 'null'
i = i+1
return
end
return dispatcher[type(v)](v)
end
local function encode(v_, nullv_)
v, nullv = v_, nullv_
i, builder, visited = 1, {}, {}
doencode(v)
return concat(builder)
end
return encode
end
return newencoder
end)
package.preload['lunajson.sax'] = (function (...)
local error = error
local byte, char, find, gsub, match, sub = string.byte, string.char, string.find, string.gsub, string.match, string.sub
local tonumber = tonumber
local tostring, type, unpack = tostring, type, table.unpack or unpack
-- The function that interprets JSON strings is separated into another file so as to
-- use bitwise operation to speedup unicode codepoints processing on Lua 5.3.
local genstrlib
if _VERSION == "Lua 5.3" then
genstrlib = require 'lunajson._str_lib_lua53'
else
genstrlib = require 'lunajson._str_lib'
end
local _ENV = nil
local function nop() end
local function newparser(src, saxtbl)
local json, jsonnxt
local jsonlen, pos, acc = 0, 1, 0
-- `f` is the temporary for dispatcher[c] and
-- the dummy for the first return value of `find`
local dispatcher, f
-- initialize
if type(src) == 'string' then
json = src
jsonlen = #json
jsonnxt = function()
json = ''
jsonlen = 0
jsonnxt = nop
end
else
jsonnxt = function()
acc = acc + jsonlen
pos = 1
repeat
json = src()
if not json then
json = ''
jsonlen = 0
jsonnxt = nop
return
end
jsonlen = #json
until jsonlen > 0
end
jsonnxt()
end
local sax_startobject = saxtbl.startobject or nop
local sax_key = saxtbl.key or nop
local sax_endobject = saxtbl.endobject or nop
local sax_startarray = saxtbl.startarray or nop
local sax_endarray = saxtbl.endarray or nop
local sax_string = saxtbl.string or nop
local sax_number = saxtbl.number or nop
local sax_boolean = saxtbl.boolean or nop
local sax_null = saxtbl.null or nop
--[[
Helper
--]]
local function tryc()
local c = byte(json, pos)
if not c then
jsonnxt()
c = byte(json, pos)
end
return c
end
local function parseerror(errmsg)
error("parse error at " .. acc + pos .. ": " .. errmsg)
end
local function tellc()
return tryc() or parseerror("unexpected termination")
end
local function spaces() -- skip spaces and prepare the next char
while true do
f, pos = find(json, '^[ \n\r\t]*', pos)
if pos ~= jsonlen then
pos = pos+1
return
end
if jsonlen == 0 then
parseerror("unexpected termination")
end
jsonnxt()
end
end
--[[
Invalid
--]]
local function f_err()
parseerror('invalid value')
end
--[[
Constants
--]]
-- fallback slow constants parser
local function generic_constant(target, targetlen, ret, sax_f)
for i = 1, targetlen do
local c = tellc()
if byte(target, i) ~= c then
parseerror("invalid char")
end
pos = pos+1
end
return sax_f(ret)
end
-- null
local function f_nul()
if sub(json, pos, pos+2) == 'ull' then
pos = pos+3
return sax_null(nil)
end
return generic_constant('ull', 3, nil, sax_null)
end
-- false
local function f_fls()
if sub(json, pos, pos+3) == 'alse' then
pos = pos+4
return sax_boolean(false)
end
return generic_constant('alse', 4, false, sax_boolean)
end
-- true
local function f_tru()
if sub(json, pos, pos+2) == 'rue' then
pos = pos+3
return sax_boolean(true)
end
return generic_constant('rue', 3, true, sax_boolean)
end
--[[
Numbers
Conceptually, the longest prefix that matches to `(0|[1-9][0-9]*)(\.[0-9]*)?([eE][+-]?[0-9]*)?`
(in regexp) is captured as a number and its conformance to the JSON spec is checked.
--]]
-- deal with non-standard locales
local radixmark = match(tostring(0.5), '[^0-9]')
local fixedtonumber = tonumber
if radixmark ~= '.' then -- deals with non-standard locales
if find(radixmark, '%W') then
radixmark = '%' .. radixmark
end
fixedtonumber = function(s)
return tonumber(gsub(s, '.', radixmark))
end
end
-- fallback slow parser
local function generic_number(mns)
local buf = {}
local i = 1
local c = byte(json, pos)
pos = pos+1
local function nxt()
buf[i] = c
i = i+1
c = tryc()
pos = pos+1
end
if c == 0x30 then
nxt()
else
repeat nxt() until not (c and 0x30 <= c and c < 0x3A)
end
if c == 0x2E then
nxt()
if not (c and 0x30 <= c and c < 0x3A) then
parseerror('invalid number')
end
repeat nxt() until not (c and 0x30 <= c and c < 0x3A)
end
if c == 0x45 or c == 0x65 then
nxt()
if c == 0x2B or c == 0x2D then
nxt()
end
if not (c and 0x30 <= c and c < 0x3A) then
parseerror('invalid number')
end
repeat nxt() until not (c and 0x30 <= c and c < 0x3A)
end
pos = pos-1
local num = char(unpack(buf))
num = fixedtonumber(num)-0.0
if mns then
num = -num
end
return sax_number(num)
end
-- `0(\.[0-9]*)?([eE][+-]?[0-9]*)?`
local function f_zro(mns)
local postmp = pos
local num
local c = byte(json, postmp)
if c == 0x2E then -- is this `.`?
num = match(json, '^.[0-9]*', pos) -- skipping 0
local numlen = #num
if numlen == 1 then
pos = pos-1
return generic_number(mns)
end
postmp = pos + numlen
c = byte(json, postmp)
end
if c == 0x45 or c == 0x65 then -- is this e or E?
local numexp = match(json, '^[^eE]*[eE][-+]?[0-9]+', pos)
if not numexp then
pos = pos-1
return generic_number(mns)
end
if num then -- since `0e.*` is always 0.0, ignore those
num = numexp
end
postmp = pos + #numexp
end
if postmp > jsonlen then
pos = pos-1
return generic_number(mns)
end
pos = postmp
if num then
num = fixedtonumber(num)
else
num = 0.0
end
if mns then
num = -num
end
return sax_number(num)
end
-- `[1-9][0-9]*(\.[0-9]*)?([eE][+-]?[0-9]*)?`
local function f_num(mns)
pos = pos-1
local num = match(json, '^.[0-9]*%.?[0-9]*', pos)
if byte(num, -1) == 0x2E then
return generic_number(mns)
end
local postmp = pos + #num
local c = byte(json, postmp)
if c == 0x45 or c == 0x65 then -- e or E?
num = match(json, '^[^eE]*[eE][-+]?[0-9]+', pos)
if not num then
return generic_number(mns)
end
postmp = pos + #num
end
if postmp > jsonlen then
return generic_number(mns)
end
pos = postmp
num = fixedtonumber(num)-0.0
if mns then
num = -num
end
return sax_number(num)
end
-- skip minus sign
local function f_mns()
local c = byte(json, pos) or tellc()
if c then
pos = pos+1
if c > 0x30 then
if c < 0x3A then
return f_num(true)
end
else
if c > 0x2F then
return f_zro(true)
end
end
end
parseerror("invalid number")
end
--[[
Strings
--]]
local f_str_lib = genstrlib(parseerror)
local f_str_surrogateok = f_str_lib.surrogateok -- whether codepoints for surrogate pair are correctly paired
local f_str_subst = f_str_lib.subst -- the function passed to gsub that interprets escapes
local function f_str(iskey)
local pos2 = pos
local newpos
local str = ''
local bs
while true do
while true do -- search '\' or '"'
newpos = find(json, '[\\"]', pos2)
if newpos then
break
end
str = str .. sub(json, pos, jsonlen)
if pos2 == jsonlen+2 then
pos2 = 2
else
pos2 = 1
end
jsonnxt()
end
if byte(json, newpos) == 0x22 then -- break if '"'
break
end
pos2 = newpos+2 -- skip '\<char>'
bs = true -- remember that backslash occurs
end
str = str .. sub(json, pos, newpos-1)
pos = newpos+1
if bs then -- check if backslash occurs
str = gsub(str, '\\(.)([^\\]*)', f_str_subst) -- interpret escapes
if not f_str_surrogateok() then
parseerror("invalid surrogate pair")
end
end
if iskey then
return sax_key(str)
end
return sax_string(str)
end
--[[
Arrays, Objects
--]]
-- arrays
local function f_ary()
sax_startarray()
spaces()
if byte(json, pos) ~= 0x5D then -- check the closing bracket ']', that consists an empty array
local newpos
while true do
f = dispatcher[byte(json, pos)] -- parse value
pos = pos+1
f()
f, newpos = find(json, '^[ \n\r\t]*,[ \n\r\t]*', pos) -- check comma
if not newpos then
f, newpos = find(json, '^[ \n\r\t]*%]', pos) -- check closing bracket
if newpos then
pos = newpos
break
end
spaces() -- since the current chunk can be ended, skip spaces toward following chunks
local c = byte(json, pos)
if c == 0x2C then -- check comma again
pos = pos+1
spaces()
newpos = pos-1
elseif c == 0x5D then -- check closing bracket again
break
else
parseerror("no closing bracket of an array")
end
end
pos = newpos+1
if pos > jsonlen then
spaces()
end
end
end
pos = pos+1
return sax_endarray()
end
-- objects
local function f_obj()
sax_startobject()
spaces()
if byte(json, pos) ~= 0x7D then -- check the closing bracket `}`, that consists an empty object
local newpos
while true do
if byte(json, pos) ~= 0x22 then
parseerror("not key")
end
pos = pos+1
f_str(true)
f, newpos = find(json, '^[ \n\r\t]*:[ \n\r\t]*', pos) -- check colon
if not newpos then
spaces() -- since the current chunk can be ended, skip spaces toward following chunks
if byte(json, pos) ~= 0x3A then -- check colon again
parseerror("no colon after a key")
end
pos = pos+1
spaces()
newpos = pos-1
end
pos = newpos+1
if pos > jsonlen then
spaces()
end
f = dispatcher[byte(json, pos)] -- parse value
pos = pos+1
f()
f, newpos = find(json, '^[ \n\r\t]*,[ \n\r\t]*', pos) -- check comma
if not newpos then
f, newpos = find(json, '^[ \n\r\t]*}', pos) -- check closing bracket
if newpos then
pos = newpos
break
end
spaces() -- since the current chunk can be ended, skip spaces toward following chunks
local c = byte(json, pos)
if c == 0x2C then -- check comma again
pos = pos+1
spaces()
newpos = pos-1
elseif c == 0x7D then -- check closing bracket again
break
else
parseerror("no closing bracket of an object")
end
end
pos = newpos+1
if pos > jsonlen then
spaces()
end
end
end
pos = pos+1
return sax_endobject()
end
--[[
The jump table to dispatch a parser for a value, indexed by the code of the value's first char.
Key should be non-nil.
--]]
dispatcher = {
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_str, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_mns, f_err, f_err,
f_zro, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_num, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_ary, f_err, f_err, f_err, f_err,
f_err, f_err, f_err, f_err, f_err, f_err, f_fls, f_err, f_err, f_err, f_err, f_err, f_err, f_err, f_nul, f_err,
f_err, f_err, f_err, f_err, f_tru, f_err, f_err, f_err, f_err, f_err, f_err, f_obj, f_err, f_err, f_err, f_err,
}
dispatcher[0] = f_err
--[[
public funcitons
--]]
local function run()
spaces()
f = dispatcher[byte(json, pos)]
pos = pos+1
f()
end
local function read(n)
if n < 0 then
error("the argument must be non-negative")
end
local pos2 = (pos-1) + n
local str = sub(json, pos, pos2)
while pos2 > jsonlen and jsonlen ~= 0 do
jsonnxt()
pos2 = pos2 - (jsonlen - (pos-1))
str = str .. sub(json, pos, pos2)
end
if jsonlen ~= 0 then
pos = pos2+1
end
return str
end
local function tellpos()
return acc + pos
end
return {
run = run,
tryc = tryc,
read = read,
tellpos = tellpos,
}
end
local function newfileparser(fn, saxtbl)
local fp = io.open(fn)
local function gen()
local s
if fp then
s = fp:read(8192)
if not s then
fp:close()
fp = nil
end
end
return s
end
return newparser(gen, saxtbl)
end
return {
newparser = newparser,
newfileparser = newfileparser
}
end)
package.preload['lunajson'] = (function (...)
local newdecoder = require 'lunajson.decoder'
local newencoder = require 'lunajson.encoder'
local sax = require 'lunajson.sax'
-- If you need multiple contexts of decoder and/or encoder,
-- you can require lunajson.decoder and/or lunajson.encoder directly.
return {
decode = newdecoder(),
encode = newencoder(),
newparser = sax.newparser,
newfileparser = sax.newfileparser,
}
end)
package.preload['fhirformats-xml'] = (function (...)
-- Copyright (C) Marcin Kalicinski 2006, 2009, Gaspard Bucher 2014.
-- This software may be modified and distributed under the terms
-- of the MIT license. See the LICENSE file for details.
-- this is a cannibalised XML encoding portion of https://github.com/lubyk/xml
local ipairs, pairs, insert, type,
match, tostring =
ipairs, pairs, table.insert, type,
string.match, tostring
local function escape(v)
if type(v) == 'boolean' then
return v and 'true' or 'false'
else
return v:gsub('&','&amp;'):gsub('>','&gt;'):gsub('<','&lt;'):gsub("'",'&apos;')
end
end
local function tagWithAttributes(data)
local res = data.xml or 'table'
for k,v in pairs(data) do
if k ~= 'xml' and type(k) == 'string' then
res = res .. ' ' .. k .. "='" .. escape(v) .. "'"
end
end
return res
end
local function doDump(data, indent, output, last, depth, max_depth)
if depth > max_depth then
error(string.format("Could not dump table to XML. Maximal depth of %i reached.", max_depth))
end
if data[1] then
insert(output, (last == 'n' and indent or '')..'<'..tagWithAttributes(data)..'>')
last = 'n'
local ind = indent..' '
for _, child in ipairs(data) do
local typ = type(child)
if typ == 'table' then
doDump(child, ind, output, last, depth + 1, max_depth)
last = 'n'
elseif typ == 'number' then
insert(output, tostring(child))
else
local s = escape(child)
insert(output, s)
last = 's'
end
end
insert(output, (last == 'n' and indent or '')..'</'..(data.xml or 'table')..'>')
last = 'n'
else
-- no children
insert(output, (last == 'n' and indent or '')..'<'..tagWithAttributes(data)..'/>')
last = 'n'
end
end
local function dump(data, max_depth)
local max_depth = max_depth or 3000
local res = {}
doDump(data, '\n', res, 's', 1, max_depth)
return table.concat(res, '')
end
return {
dump = dump
}
end)
package.preload['inspect'] = (function (...)
local inspect ={
_VERSION = 'inspect.lua 3.0.3',
_URL = 'http://github.com/kikito/inspect.lua',
_DESCRIPTION = 'human-readable representations of tables',
_LICENSE = [[
MIT LICENSE
Copyright (c) 2013 Enrique García Cota
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
}
inspect.KEY = setmetatable({}, {__tostring = function() return 'inspect.KEY' end})
inspect.METATABLE = setmetatable({}, {__tostring = function() return 'inspect.METATABLE' end})
-- Apostrophizes the string if it has quotes, but not aphostrophes
-- Otherwise, it returns a regular quoted string
local function smartQuote(str)
if str:match('"') and not str:match("'") then
return "'" .. str .. "'"
end
return '"' .. str:gsub('"', '\\"') .. '"'
end
local controlCharsTranslation = {
["\a"] = "\\a", ["\b"] = "\\b", ["\f"] = "\\f", ["\n"] = "\\n",
["\r"] = "\\r", ["\t"] = "\\t", ["\v"] = "\\v"
}
local function escape(str)
local result = str:gsub("\\", "\\\\"):gsub("(%c)", controlCharsTranslation)
return result
end
local function isIdentifier(str)
return type(str) == 'string' and str:match( "^[_%a][_%a%d]*$" )
end
local function isSequenceKey(k, sequenceLength)
return type(k) == 'number'
and 1 <= k
and k <= sequenceLength
and math.floor(k) == k
end
local defaultTypeOrders = {
['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4,
['function'] = 5, ['userdata'] = 6, ['thread'] = 7
}
local function sortKeys(a, b)
local ta, tb = type(a), type(b)
-- strings and numbers are sorted numerically/alphabetically
if ta == tb and (ta == 'string' or ta == 'number') then return a < b end
local dta, dtb = defaultTypeOrders[ta], defaultTypeOrders[tb]
-- Two default types are compared according to the defaultTypeOrders table
if dta and dtb then return defaultTypeOrders[ta] < defaultTypeOrders[tb]
elseif dta then return true -- default types before custom ones
elseif dtb then return false -- custom types after default ones
end
-- custom types are sorted out alphabetically
return ta < tb
end
-- For implementation reasons, the behavior of rawlen & # is "undefined" when
-- tables aren't pure sequences. So we implement our own # operator.
local function getSequenceLength(t)
local len = 1
local v = rawget(t,len)
while v ~= nil do
len = len + 1
v = rawget(t,len)
end
return len - 1
end
local function getNonSequentialKeys(t)
local keys = {}
local sequenceLength = getSequenceLength(t)
for k,_ in pairs(t) do
if not isSequenceKey(k, sequenceLength) then table.insert(keys, k) end
end
table.sort(keys, sortKeys)
return keys, sequenceLength
end
local function getToStringResultSafely(t, mt)
local __tostring = type(mt) == 'table' and rawget(mt, '__tostring')
local str, ok
if type(__tostring) == 'function' then
ok, str = pcall(__tostring, t)
str = ok and str or 'error: ' .. tostring(str)
end
if type(str) == 'string' and #str > 0 then return str end
end
local maxIdsMetaTable = {
__index = function(self, typeName)
rawset(self, typeName, 0)
return 0
end
}
local idsMetaTable = {
__index = function (self, typeName)
local col = {}
rawset(self, typeName, col)
return col
end
}
local function countTableAppearances(t, tableAppearances)
tableAppearances = tableAppearances or {}
if type(t) == 'table' then
if not tableAppearances[t] then
tableAppearances[t] = 1
for k,v in pairs(t) do
countTableAppearances(k, tableAppearances)
countTableAppearances(v, tableAppearances)
end
countTableAppearances(getmetatable(t), tableAppearances)
else
tableAppearances[t] = tableAppearances[t] + 1
end
end
return tableAppearances
end
local copySequence = function(s)
local copy, len = {}, #s
for i=1, len do copy[i] = s[i] end
return copy, len
end
local function makePath(path, ...)
local keys = {...}
local newPath, len = copySequence(path)
for i=1, #keys do
newPath[len + i] = keys[i]
end
return newPath
end
local function processRecursive(process, item, path)
if item == nil then return nil end
local processed = process(item, path)
if type(processed) == 'table' then
local processedCopy = {}
local processedKey
for k,v in pairs(processed) do
processedKey = processRecursive(process, k, makePath(path, k, inspect.KEY))
if processedKey ~= nil then
processedCopy[processedKey] = processRecursive(process, v, makePath(path, processedKey))
end
end
local mt = processRecursive(process, getmetatable(processed), makePath(path, inspect.METATABLE))
setmetatable(processedCopy, mt)
processed = processedCopy
end
return processed
end
-------------------------------------------------------------------
local Inspector = {}
local Inspector_mt = {__index = Inspector}
function Inspector:puts(...)
local args = {...}
local buffer = self.buffer
local len = #buffer
for i=1, #args do
len = len + 1
buffer[len] = tostring(args[i])
end
end
function Inspector:down(f)
self.level = self.level + 1
f()
self.level = self.level - 1
end
function Inspector:tabify()
self:puts(self.newline, string.rep(self.indent, self.level))
end
function Inspector:alreadyVisited(v)
return self.ids[type(v)][v] ~= nil
end
function Inspector:getId(v)
local tv = type(v)
local id = self.ids[tv][v]
if not id then
id = self.maxIds[tv] + 1
self.maxIds[tv] = id
self.ids[tv][v] = id
end
return id
end
function Inspector:putKey(k)
if isIdentifier(k) then return self:puts(k) end
self:puts("[")
self:putValue(k)
self:puts("]")
end
function Inspector:putTable(t)
if t == inspect.KEY or t == inspect.METATABLE then
self:puts(tostring(t))
elseif self:alreadyVisited(t) then
self:puts('<table ', self:getId(t), '>')
elseif self.level >= self.depth then
self:puts('{...}')
else
if self.tableAppearances[t] > 1 then self:puts('<', self:getId(t), '>') end
local nonSequentialKeys, sequenceLength = getNonSequentialKeys(t)
local mt = getmetatable(t)
local toStringResult = getToStringResultSafely(t, mt)
self:puts('{')
self:down(function()
if toStringResult then
self:puts(' -- ', escape(toStringResult))
if sequenceLength >= 1 then self:tabify() end
end
local count = 0
for i=1, sequenceLength do
if count > 0 then self:puts(',') end
self:puts(' ')
self:putValue(t[i])
count = count + 1
end
for _,k in ipairs(nonSequentialKeys) do
if count > 0 then self:puts(',') end
self:tabify()
self:putKey(k)
self:puts(' = ')
self:putValue(t[k])
count = count + 1
end
if mt then
if count > 0 then self:puts(',') end
self:tabify()
self:puts('<metatable> = ')
self:putValue(mt)
end
end)
if #nonSequentialKeys > 0 or mt then -- result is multi-lined. Justify closing }
self:tabify()
elseif sequenceLength > 0 then -- array tables have one extra space before closing }
self:puts(' ')
end
self:puts('}')
end
end
function Inspector:putValue(v)
local tv = type(v)
if tv == 'string' then
self:puts(smartQuote(escape(v)))
elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then
self:puts(tostring(v))
elseif tv == 'table' then
self:putTable(v)
else
self:puts('<',tv,' ',self:getId(v),'>')
end
end
-------------------------------------------------------------------
function inspect.inspect(root, options)
options = options or {}
local depth = options.depth or math.huge
local newline = options.newline or '\n'
local indent = options.indent or ' '
local process = options.process
if process then
root = processRecursive(process, root, {})
end
local inspector = setmetatable({
depth = depth,
buffer = {},
level = 0,
ids = setmetatable({}, idsMetaTable),
maxIds = setmetatable({}, maxIdsMetaTable),
newline = newline,
indent = indent,
tableAppearances = countTableAppearances(root)
}, Inspector_mt)
inspector:putValue(root)
return table.concat(inspector.buffer)
end
setmetatable(inspect, { __call = function(_, ...) return inspect.inspect(...) end })
return inspect
end)
do local resources = {};
resources["fhir-data/fhir-elements.json"] = "[\
{\
\"path\": \"date\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"date.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"date.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"date.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"xs:gYear, xs:gYearMonth, xs:date\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"dateTime\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"dateTime.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"dateTime.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"dateTime.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"xs:gYear, xs:gYearMonth, xs:date, xs:dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"string\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"string.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"string.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"string.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"integer\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"integer.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"integer.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"integer.value\",\
\"type_json\": \"number\",\
\"type_xml\": \"int\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"uri\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"uri.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"uri.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"uri.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"anyURI\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"instant\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"instant.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"instant.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"instant.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"boolean\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"boolean.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"boolean.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"boolean.value\",\
\"type_json\": \"true | false\",\
\"type_xml\": \"boolean\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"base64Binary\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"base64Binary.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"base64Binary.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"base64Binary.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"base64Binary\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"time\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"time.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"time.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"time.value\",\
\"type_json\": \"string\",\
\"type_xml\": \"time\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"decimal\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"decimal.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"decimal.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"decimal.value\",\
\"type_json\": \"number\",\
\"type_xml\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Identifier.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Identifier.use\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.type\",\
\"type\": \"CodeableConcept\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.system\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.value\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.period\",\
\"type\": \"Period\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Identifier.assigner\",\
\"type\": \"Reference\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Coding.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Coding.system\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding.version\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding.code\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding.display\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Coding.userSelected\",\
\"type\": \"boolean\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Reference\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Reference.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Reference.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Reference.reference\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Reference.display\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Signature\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Signature.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Signature.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Signature.type\",\
\"type\": \"Coding\",\
\"min\": \"1\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Signature.when\",\
\"type\": \"instant\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Signature.whoUri\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"uri\"\
},\
{\
\"path\": \"Signature.whoReference\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Signature.whoReference\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Signature.whoReference\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Signature.whoReference\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Signature.whoReference\",\
\"max\": \"1\",\
\"min\": \"1\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Signature.contentType\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Signature.blob\",\
\"type\": \"base64Binary\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"SampledData.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"SampledData.origin\",\
\"type\": \"Quantity\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.period\",\
\"type\": \"decimal\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.factor\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.lowerLimit\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.upperLimit\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.dimensions\",\
\"type\": \"positiveInt\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"SampledData.data\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Quantity.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Quantity.value\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity.comparator\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity.unit\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity.system\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Quantity.code\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Period\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Period.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Period.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Period.start\",\
\"type\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Period.end\",\
\"type\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Attachment.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Attachment.contentType\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.language\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.data\",\
\"type\": \"base64Binary\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.url\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.size\",\
\"type\": \"unsignedInt\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.hash\",\
\"type\": \"base64Binary\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.title\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Attachment.creation\",\
\"type\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Ratio\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Ratio.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Ratio.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Ratio.numerator\",\
\"type\": \"Quantity\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Ratio.denominator\",\
\"type\": \"Quantity\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Range\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Range.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Range.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Range.low\",\
\"type\": \"Quantity\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Range.high\",\
\"type\": \"Quantity\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Annotation\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Annotation.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Annotation.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Annotation.authorReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Annotation.authorReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Annotation.authorReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Annotation.authorString\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"string\"\
},\
{\
\"path\": \"Annotation.time\",\
\"type\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Annotation.text\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"CodeableConcept\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"CodeableConcept.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"CodeableConcept.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"CodeableConcept.coding\",\
\"type\": \"Coding\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"CodeableConcept.text\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Extension\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Extension.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Extension.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Extension.url\",\
\"type\": \"uri\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Extension.valueBoolean\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"boolean\"\
},\
{\
\"path\": \"Extension.valueInteger\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"integer\"\
},\
{\
\"path\": \"Extension.valueDecimal\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"decimal\"\
},\
{\
\"path\": \"Extension.valueBase64Binary\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"base64Binary\"\
},\
{\
\"path\": \"Extension.valueInstant\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"instant\"\
},\
{\
\"path\": \"Extension.valueString\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"string\"\
},\
{\
\"path\": \"Extension.valueUri\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"uri\"\
},\
{\
\"path\": \"Extension.valueDate\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"date\"\
},\
{\
\"path\": \"Extension.valueDateTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"dateTime\"\
},\
{\
\"path\": \"Extension.valueTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"time\"\
},\
{\
\"path\": \"Extension.valueCode\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"code\"\
},\
{\
\"path\": \"Extension.valueOid\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"oid\"\
},\
{\
\"path\": \"Extension.valueId\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"id\"\
},\
{\
\"path\": \"Extension.valueUnsignedInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"unsignedInt\"\
},\
{\
\"path\": \"Extension.valuePositiveInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"positiveInt\"\
},\
{\
\"path\": \"Extension.valueMarkdown\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"markdown\"\
},\
{\
\"path\": \"Extension.valueAnnotation\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Annotation\"\
},\
{\
\"path\": \"Extension.valueAttachment\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Attachment\"\
},\
{\
\"path\": \"Extension.valueIdentifier\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Identifier\"\
},\
{\
\"path\": \"Extension.valueCodeableConcept\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"CodeableConcept\"\
},\
{\
\"path\": \"Extension.valueCoding\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Coding\"\
},\
{\
\"path\": \"Extension.valueQuantity\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Quantity\"\
},\
{\
\"path\": \"Extension.valueRange\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Range\"\
},\
{\
\"path\": \"Extension.valuePeriod\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Period\"\
},\
{\
\"path\": \"Extension.valueRatio\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Ratio\"\
},\
{\
\"path\": \"Extension.valueSampledData\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"SampledData\"\
},\
{\
\"path\": \"Extension.valueSignature\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Signature\"\
},\
{\
\"path\": \"Extension.valueHumanName\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"HumanName\"\
},\
{\
\"path\": \"Extension.valueAddress\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Address\"\
},\
{\
\"path\": \"Extension.valueContactPoint\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"ContactPoint\"\
},\
{\
\"path\": \"Extension.valueTiming\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Timing\"\
},\
{\
\"path\": \"Extension.valueReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"Extension.valueMeta\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Meta\"\
},\
{\
\"path\": \"BackboneElement\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"BackboneElement.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"BackboneElement.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"BackboneElement.modifierExtension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Narrative\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Narrative.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Narrative.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Narrative.status\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Narrative.div\",\
\"type\": \"xhtml\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Element\",\
\"derivations\": [\
\"ActionDefinition\",\
\"Address\",\
\"Annotation\",\
\"Attachment\",\
\"BackboneElement\",\
\"CodeableConcept\",\
\"Coding\",\
\"ContactPoint\",\
\"DataRequirement\",\
\"ElementDefinition\",\
\"Extension\",\
\"HumanName\",\
\"Identifier\",\
\"Meta\",\
\"ModuleMetadata\",\
\"Narrative\",\
\"ParameterDefinition\",\
\"Period\",\
\"Quantity\",\
\"Range\",\
\"Ratio\",\
\"Reference\",\
\"SampledData\",\
\"Signature\",\
\"Timing\",\
\"TriggerDefinition\",\
\"base64Binary\",\
\"boolean\",\
\"date\",\
\"dateTime\",\
\"decimal\",\
\"instant\",\
\"integer\",\
\"string\",\
\"time\",\
\"uri\"\
],\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Element.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Element.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"HumanName.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.use\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"HumanName.text\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"HumanName.family\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.given\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.prefix\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.suffix\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"HumanName.period\",\
\"type\": \"Period\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ContactPoint.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ContactPoint.system\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint.value\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint.use\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint.rank\",\
\"type\": \"positiveInt\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ContactPoint.period\",\
\"type\": \"Period\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Meta\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Meta.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Meta.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Meta.versionId\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Meta.lastUpdated\",\
\"type\": \"instant\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Meta.profile\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Meta.security\",\
\"type\": \"Coding\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Meta.tag\",\
\"type\": \"Coding\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Address\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Address.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Address.use\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.type\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.text\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.line\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Address.city\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.district\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.state\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.postalCode\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.country\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Address.period\",\
\"type\": \"Period\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"TriggerDefinition\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"TriggerDefinition.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"TriggerDefinition.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"TriggerDefinition.type\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"TriggerDefinition.eventName\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"TriggerDefinition.eventTimingTiming\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Timing\"\
},\
{\
\"path\": \"TriggerDefinition.eventTimingReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"TriggerDefinition.eventTimingDate\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"date\"\
},\
{\
\"path\": \"TriggerDefinition.eventTimingDateTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"dateTime\"\
},\
{\
\"path\": \"TriggerDefinition.eventData\",\
\"type\": \"DataRequirement\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.url\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.identifier\",\
\"type\": \"Identifier\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.version\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.name\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.title\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.type\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.status\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.experimental\",\
\"type\": \"boolean\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.description\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.purpose\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.usage\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.publicationDate\",\
\"type\": \"date\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.lastReviewDate\",\
\"type\": \"date\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.effectivePeriod\",\
\"type\": \"Period\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.coverage\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.coverage.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.coverage.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.coverage.focus\",\
\"type\": \"Coding\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.coverage.value\",\
\"type\": \"CodeableConcept\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.topic\",\
\"type\": \"CodeableConcept\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contributor\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.type\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.name\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.contact\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.contact.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.contact.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.contact.name\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contributor.contact.telecom\",\
\"type\": \"ContactPoint\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.publisher\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contact\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contact.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contact.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.contact.name\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.contact.telecom\",\
\"type\": \"ContactPoint\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.copyright\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource.type\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource.document\",\
\"type\": \"Attachment\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ModuleMetadata.relatedResource.resource\",\
\"type\": \"Reference\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Timing.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Timing.event\",\
\"type\": \"dateTime\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Timing.repeat\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"Timing.repeat.boundsQuantity\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Quantity\"\
},\
{\
\"path\": \"Timing.repeat.boundsRange\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Range\"\
},\
{\
\"path\": \"Timing.repeat.boundsPeriod\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Period\"\
},\
{\
\"path\": \"Timing.repeat.count\",\
\"type\": \"integer\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.countMax\",\
\"type\": \"integer\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.duration\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.durationMax\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.durationUnit\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.frequency\",\
\"type\": \"integer\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.frequencyMax\",\
\"type\": \"integer\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.period\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.periodMax\",\
\"type\": \"decimal\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.periodUnit\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.when\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.repeat.offset\",\
\"type\": \"unsignedInt\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"Timing.code\",\
\"type\": \"CodeableConcept\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.path\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.representation\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.name\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.label\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.code\",\
\"type\": \"Coding\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.slicing\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.slicing.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.slicing.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.slicing.discriminator\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.slicing.description\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.slicing.ordered\",\
\"type\": \"boolean\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.slicing.rules\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.short\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.definition\",\
\"type\": \"markdown\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.comments\",\
\"type\": \"markdown\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.requirements\",\
\"type\": \"markdown\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.alias\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.min\",\
\"type\": \"integer\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.max\",\
\"type\": \"string\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.base\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.base.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.base.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.base.path\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.base.min\",\
\"type\": \"integer\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.base.max\",\
\"type\": \"string\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.contentReference\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.type\",\
\"type\": \"Element\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.type.id\",\
\"type\": \"id\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.type.extension\",\
\"type\": \"Extension\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.type.code\",\
\"type\": \"code\",\
\"min\": \"1\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.type.profile\",\
\"type\": \"uri\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.type.aggregation\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"*\"\
},\
{\
\"path\": \"ElementDefinition.type.versioning\",\
\"type\": \"code\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueBoolean\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"boolean\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueInteger\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"integer\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueDecimal\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"decimal\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueBase64Binary\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"base64Binary\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueInstant\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"instant\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueString\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"string\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueUri\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"uri\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueDate\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"date\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueDateTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"dateTime\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"time\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueCode\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"code\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueOid\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"oid\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueId\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"id\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueUnsignedInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"unsignedInt\"\
},\
{\
\"path\": \"ElementDefinition.defaultValuePositiveInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"positiveInt\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueMarkdown\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"markdown\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueAnnotation\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Annotation\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueAttachment\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Attachment\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueIdentifier\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Identifier\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueCodeableConcept\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"CodeableConcept\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueCoding\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Coding\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueQuantity\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Quantity\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueRange\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Range\"\
},\
{\
\"path\": \"ElementDefinition.defaultValuePeriod\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Period\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueRatio\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Ratio\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueSampledData\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"SampledData\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueSignature\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Signature\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueHumanName\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"HumanName\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueAddress\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Address\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueContactPoint\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"ContactPoint\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueTiming\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Timing\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueReference\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Reference\"\
},\
{\
\"path\": \"ElementDefinition.defaultValueMeta\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Meta\"\
},\
{\
\"path\": \"ElementDefinition.meaningWhenMissing\",\
\"type\": \"markdown\",\
\"min\": \"0\",\
\"max\": \"1\"\
},\
{\
\"path\": \"ElementDefinition.fixedBoolean\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"boolean\"\
},\
{\
\"path\": \"ElementDefinition.fixedInteger\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"integer\"\
},\
{\
\"path\": \"ElementDefinition.fixedDecimal\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"decimal\"\
},\
{\
\"path\": \"ElementDefinition.fixedBase64Binary\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"base64Binary\"\
},\
{\
\"path\": \"ElementDefinition.fixedInstant\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"instant\"\
},\
{\
\"path\": \"ElementDefinition.fixedString\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"string\"\
},\
{\
\"path\": \"ElementDefinition.fixedUri\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"uri\"\
},\
{\
\"path\": \"ElementDefinition.fixedDate\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"date\"\
},\
{\
\"path\": \"ElementDefinition.fixedDateTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"dateTime\"\
},\
{\
\"path\": \"ElementDefinition.fixedTime\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"time\"\
},\
{\
\"path\": \"ElementDefinition.fixedCode\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"code\"\
},\
{\
\"path\": \"ElementDefinition.fixedOid\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"oid\"\
},\
{\
\"path\": \"ElementDefinition.fixedId\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"id\"\
},\
{\
\"path\": \"ElementDefinition.fixedUnsignedInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"unsignedInt\"\
},\
{\
\"path\": \"ElementDefinition.fixedPositiveInt\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"positiveInt\"\
},\
{\
\"path\": \"ElementDefinition.fixedMarkdown\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"markdown\"\
},\
{\
\"path\": \"ElementDefinition.fixedAnnotation\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Annotation\"\
},\
{\
\"path\": \"ElementDefinition.fixedAttachment\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Attachment\"\
},\
{\
\"path\": \"ElementDefinition.fixedIdentifier\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Identifier\"\
},\
{\
\"path\": \"ElementDefinition.fixedCodeableConcept\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"CodeableConcept\"\
},\
{\
\"path\": \"ElementDefinition.fixedCoding\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Coding\"\
},\
{\
\"path\": \"ElementDefinition.fixedQuantity\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Quantity\"\
},\
{\
\"path\": \"ElementDefinition.fixedRange\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Range\"\
},\
{\
\"path\": \"ElementDefinition.fixedPeriod\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Period\"\
},\
{\
\"path\": \"ElementDefinition.fixedRatio\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Ratio\"\
},\
{\
\"path\": \"ElementDefinition.fixedSampledData\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"SampledData\"\
},\
{\
\"path\": \"ElementDefinition.fixedSignature\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"Signature\"\
},\
{\
\"path\": \"ElementDefinition.fixedHumanName\",\
\"max\": \"1\",\
\"min\": \"0\",\
\"type\": \"HumanName\"\
},\
{\
\"path\": \"ElementDefinition.fixedAddress\",\