content
stringlengths 4
1.04M
| lang
stringclasses 358
values | score
int64 0
5
| repo_name
stringlengths 5
114
| repo_path
stringlengths 4
229
| repo_licenses
sequencelengths 1
8
|
---|---|---|---|---|---|
class Fancy {
class Enumerable {
"""
Mixin-Class with useful methods for collections that implement an @each:@ method.
"""
expects_interface: 'each:
def at: index {
"""
@index @Fixnum@ that is the 0-based index into @self.
@return Value in @self at 0-based position defined by @index.
Example:
\"foo\" at: 2 # => \"o\"
\"foo\" at: 3 # => nil
"""
each_with_index: |x i| {
{ return x } if: $ i == index
}
return nil
}
def each_with_index: block {
"""
@block @Block@ to be called with each element and its index in the @self.
@return @self
Iterate over all elements in @self.
Calls a given @Block@ with each element and its index.
"""
i = 0
each: |x| {
block call: [x, i]
i = i + 1
}
}
def first {
"""
@return The first element in the @Fancy::Enumerable@.
"""
at: 0
}
def second {
"""
@return The second element in the @Fancy::Enumerable@.
"""
at: 1
}
def third {
"""
@return The third element in the @Fancy::Enumerable@.
"""
at: 2
}
def fourth {
"""
@return The fourth element in the @Fancy::Enumerable@.
"""
at: 3
}
def last {
"""
@return Last element in @self or @nil, if empty.
Returns the last element in a @Fancy::Enumerable@.
"""
item = nil
each: |x| {
item = x
}
item
}
def rest {
"""
@return @Array@ of all but the first element in @self.
"""
drop: 1
}
def first: amount {
"""
@amount Amount of first elements to take from @self.
@return @Array@ of first @amount elements in @self.
Example:
(1,2,3,4) first: 2 # => [1,2]
"""
take: amount
}
def last: amount {
"""
@amount Amount of last elements to take from @self.
@return @Array@ of last @amount elements in @self.
Example:
(1,2,3,4) last: 2 # => [3,4]
"""
start_index = size - amount
i = 0
drop_while: {
i = i + 1
i <= start_index
}
}
def includes?: item {
"""
@item Item to check if it's included in @self.
@return @true, if @item in @self, otherwise @false.
Indicates, if a collection includes a given element.
"""
any?: |x| { x == item }
}
def each: each_block in_between: between_block {
"""
Similar to @each:@ but calls an additional @Block@ between
calling the first @Block@ for each element in self.
Example:
result = \"\"
[1,2,3,4,5] each: |i| {
result << i
} in_between: {
result << \"-\"
}
result # => \"1-2-3-4-5\"
"""
between = { between = between_block }
each: |x| {
between call
each_block call: [x]
}
}
def join: str ("") {
"""
@str Value (usually a @String@) to be used for the joined @String@.
@return @String@ containing all elements in @self interspersed with @str.
Joins a collection with a @String@ between each element, returning a new @String@.
Example:
\"hello, world\" join: \"-\" # => \"h-e-l-l-o-,- -w-o-r-l-d\"
"""
s = ""
each: |c| {
s << c
} in_between: {
s << str
}
s
}
def join_by: block {
"""
@block @Block@ to be called pair-wise to produce a single value.
@return Result of calling @block pairwise (similar to using @Fancy::Enumerable#reduce:into:@).
Works similar to @Fancy::Enumerable#inject:into:@ but uses first element as value injected.
Example:
(1,2,3) join_by: '+ # => same as: (2,3) inject: 1 into: '+
"""
first, *rest = self
rest inject: first into: block
}
def any?: condition {
"""
@condition @Block@ (or @Callable) that is used to check if any element in @self yields true for it.
@return @true, if @condition yields @true for any element, @false otherwise.
Indicates, if any element meets the condition.
"""
each: |x| {
if: (condition call: [x]) then: {
return true
}
}
false
}
def all?: condition {
"""
@block Predicate @Block@ to be called for each element until it returns @false for any one of them.
@return @true if all elements in @self yield @true for @block, @false otherwise.
Takes condition-block and returns @true if all elements meet it.
"""
each: |x| {
unless: (condition call: [x]) do: {
return false
}
}
true
}
def find: item {
"""
@item Item to be found in @self.
@return The first element that is equal to @item or @nil, if none found.
Returns @nil, if @item (or anything that returns @true when comparing to @item) isn't found.
Otherwise returns that element that is equal to @item.
"""
match item {
case Block -> find_by: item
case _ ->
each: |x| {
if: (item == x) then: {
return x
}
}
nil
}
}
def find: item do: block {
"""
@item Item to find in @self.
@block @Block@ to be called with @item if found in @self.
Calls @block with @item, if found.
If @item is not in @self, @block is not called.
"""
if: (find: item) then: block
}
def find_by: block {
"""
Similar to @find:@ but takes a block that is called for each element to find it.
Example:
[1,2,3,4,5] find_by: @{ even? } # => 2
[1,2,3,4,5] find_by: @{ odd? } # => 1
[1,2,3,4,5] find_by: @{ % 3 == 0 } # => 3
"""
each: |x| {
if: (block call: [x]) then: {
return x
}
}
nil
}
def find_with_index: item do: block {
"""
@item Item to find in @self.
@block @Block@ to be called with @item and its index in @self.
Calls @block with @item and its index in @self, if found.
If @item is not in @self, @block is not called.
"""
for_every: item with_index_do: |x i| {
return block call: [x, i]
}
nil
}
def for_every: item with_index_do: block {
"""
@item Item to call @block with.
@block @Block@ to be called with @item and each of its indexes in @self.
Calls @block with @item and each of its indexes in @self, if @item is in @self.
"""
each_with_index: |x i| {
if: (item == x) then: {
block call: [x, i]
}
}
}
def for_every: item do: block {
"""
@item Item to call @block with.
@block @Block@ to be called with @item for every occurance of @item in @self.
Calls @block with @item for each occurance of @item in @self.
Example:
count = 0
[1,2,3,2,1] for_every: 1 do: { count = count + 1 }
# count is now 2
"""
each: |x| {
if: (item == x) then: { block call: [x] }
}
}
def last_index_of: item {
"""
@item Item for which the last index in @self should be found.
@return Last index of @item in @self, or @nil (if not in @self).
Returns the last index for @item in @self, or @nil, if @item is not in @self.
"""
last_idx = nil
for_every: item with_index_do: |_ i| { last_idx = i }
last_idx
}
def map: block {
"""
@block A @Block@ that gets called with each element in @self.
@return An @Array@ containing all values of calling @block with each element in @self.
Returns a new @Array@ with the results of calling a given block for every element.
"""
coll = []
each: |x| {
coll << (block call: [x])
}
coll
}
def map_with_index: block {
"""
@block A @Block@ that gets called with each element and its index in @self.
@return An @Array@ containing all values of calling @block with each element and its index in @self.
Returns a new @Array@ with the results of calling a given block for every element and its index.
"""
coll = []
each_with_index: |x i| {
coll << (block call: [x, i])
}
coll
}
def map_chained: blocks {
"""
@blocks Collection of @Block@s to be called sequentially for every element in @self.
@return Collection of all values in @self successively called with all blocks in @blocks.
Example:
(1,2,3) map_chained: (@{ + 1 }, 'to_s, @{ * 2 })
# => [\"22\", \"33\", \"44\"]
"""
map: |v| {
blocks inject: v into: |acc b| {
b call: [acc]
}
}
}
def flat_map: block {
"""
Similar to @Fancy::Enumerable#map:@ but returns the result @Array@ flattened.
"""
map: block . tap: @{ flatten! }
}
def select: condition {
"""
@condition A @Block@ that is used as a filter on all elements in @self.
@return An @Array@ containing all elements in @self that yield @true when called with @condition.
Returns a new @Array@ with all elements that meet the given condition block.
"""
coll = []
each: |x| {
{ coll << x } if: $ condition call: [x]
}
coll
}
def select_with_index: condition {
"""
@condition A @Block@ that is used as a filter on all elements in @self.
@return An @Array@ containing all elements and their indices in @self that yield @true when called with @condition.
Returns a new @Array@ with all elements and their indices that meet the given
condition block. @condition is called with each element and its index in @self.
"""
tmp = []
each_with_index: |obj idx| {
if: (condition call: [obj, idx]) then: {
tmp << [obj, idx]
}
}
tmp
}
def reject: condition {
"""
Similar to @select:@ but inverse.
Returns a new @Array@ with all elements that don't meet the given condition block.
"""
coll = []
each: |x| {
{ coll << x } unless: $ condition call: [x]
}
coll
}
def take_while: condition {
"""
@condition A @Block@ that is used as a condition for filtering.
@return An @Array@ of all elements from the beginning until @condition yields @false.
Returns a new @Array@ by taking elements from the beginning
as long as they meet the given condition block.
Example:
[1,2,3,4,5] take_while: |x| { x < 4 } # => [1,2,3]
"""
coll = []
each: |x| {
if: (condition call: [x]) then: {
coll << x
} else: {
return coll
}
}
coll
}
def drop_while: condition {
"""
Similar to @take_while:@ but inverse.
Returns a new @Array@ by skipping elements from the beginning
as long as they meet the given condition block.
Example:
[1,2,3,4,5] drop_while: |x| { x < 4 } # => [4,5]
"""
coll = []
drop? = false
first_check? = true
each: |x| {
if: (drop? or: first_check?) then: {
drop? = condition call: [x]
first_check? = false
# check, if we actually have to insert this one:
unless: drop? do: {
coll << x
}
} else: {
coll << x
}
}
coll
}
def take: amount {
"""
@amount Amount of elements to take from @self.
@return @Array@ of first @amount elements in @self.
Example:
[1,2,3,4] take: 2 # => [1,2]
"""
i = 0
take_while: {
i = i + 1
i <= amount
}
}
def drop: amount {
"""
@amount Amount of elements to skip in @self.
@return An @Array@ of all but the first @amount elements in @self.
Example:
[1,2,3,4,5] drop: 2 # => [3,4,5]
"""
i = 0
drop_while: {
i = i + 1
i <= amount
}
}
alias_method: 'skip: for: 'drop:
def drop_last: amount (1) {
"""
@amount Amount of elements to drop from the end.
@return New @Array@ without last @amount elements.
Example:
[1,2,3,4] drop_last: 2 # => [1,2]
"""
first: (size - amount)
}
def reduce: block init_val: init_val {
"""
Calculates a value based on a given block to be called on an accumulator
value and an initial value.
Example:
[1,2,3] reduce: |sum val| { sum + val } init_val: 0 # => 6
"""
acc = init_val
each: |x| {
acc = block call: [acc, x]
}
acc
}
def inject: val into: block {
"""
Same as reduce:init_val: but taking the initial value as first
and the reducing block as second parameter.
Example:
[1,2,3] inject: 0 into: |sum val| { sum + val } # => 6
"""
reduce: block init_val: val
}
def unique {
"""
@return @Array@ of all unique elements in @self.
Returns a new Array with all unique values (double entries are skipped).
Example:
[1,2,1,2,3] unique # => [1,2,3]
"""
unique_vals = []
each: |x| {
unless: (unique_vals includes?: x) do: {
unique_vals << x
}
}
unique_vals
}
def size {
"""
@return Amount of elements in @self.
Returns the size of an Enumerable.
"""
i = 0
each: {
i = i + 1
}
i
}
def empty? {
"""
@return @true, if size of @self is 0, @false otherwise.
Indicates, if the Enumerable is empty (has no elements).
"""
size == 0
}
def compact {
"""
@return @Array@ with all non-nil elements in @self.
Returns a new @Array@ with all values removed that are @nil ( return @true on @nil? ).
Example:
[1,2,nil,3,nil] compact # => [1,2,3]
"""
reject: @{ nil? }
}
def superior_by: comparison_block taking: selection_block (@{ identity }) {
"""
@comparison_block @Block@ to be used for comparison.
@selection_block @Block@ to be used for selecting the values to be used for comparison by @comparison_block.
@return Superior element in @self in terms of @comparison_block.
Returns the superior element in the @Fancy::Enumerable@ that has met
the given comparison block with all other elements,
applied to whatever @selection_block returns for each element.
@selection_block defaults to @identity.
Examples:
[1,2,5,3,4] superior_by: '> # => 5
[1,2,5,3,4] superior_by: '< # => 1
[[1,2], [2,3,4], [], [1]] superior_by: '> taking: 'size # => [2,3,4]
[[1,2], [2,3,4], [-1]] superior_by: '< taking: 'first # => [-1]
"""
{ return nil } if: empty?
retval = first
retval_cmp = selection_block call: [retval]
rest each: |p| {
cmp = selection_block call: [p]
if: (comparison_block call: [cmp, retval_cmp]) then: {
retval = p
retval_cmp = cmp
}
}
retval
}
def max {
"""
@return Maximum value in @self.
Returns the maximum value in the Enumerable (via the '>' comparison message).
"""
superior_by: '>
}
def max_by: block {
"""
@block @Block@ by which to calculate the maximum value in @self.
@return Maximum value in @self based on @block.
Returns the maximum value in the Enumerable (via the '>' comparison message).
Example:
[[1,2,3], [1,2], [1]] max_by: @{ size } # => [1,2,3]
"""
superior_by: '> taking: block
}
def min {
"""
@return Minimum value in @self.
Returns the minimum value in the Enumerable (via the '<' comparison message).
"""
superior_by: '<
}
def min_by: block {
"""
@block @Block@ by which to calculate the minimum value in @self.
@return Minimum value in @self based on @block.
Returns the minimum value in the Enumerable (via the '<' comparison message).
Example:
[[1,2,3], [1,2], [1]] min_by: @{ size } # => [1]
"""
superior_by: '< taking: block
}
def min_max {
"""
@return @Tuple@ of min and max value in @self.
If @self is empty, returns (nil, nil).
Example:
(1,2,3,4) min_max # => (1, 3)
"""
min_max_by: @{ identity }
}
def min_max_by: block {
"""
@block @Block@ to calculate the min and max value by.
@return @Tuple@ of min and max value based on @block in @self.
Calls @block with each element in @self to determine min and max values.
If @self is empty, returns (nil, nil).
Example:
(\"a\", \”bc\", \”def\") min_max_by: 'size # => (1, 3)
"""
min, max = nil, nil
min_val, max_val = nil, nil
each: |x| {
val = block call: [x]
{ min = val; min_val = x } unless: min
{ min = val; min_val = x } if: (val < min)
{ max = val; max_val = x } unless: max
{ max = val; max_val = x } if: (val > max)
}
(min_val, max_val)
}
def sum {
"""
Calculates the sum of all the elements in the @Enumerable
(assuming them to be @Number@s (implementing '+' & '*')).
"""
inject: 0 into: '+
}
def product {
"""
Calculates the product of all the elements in the @Enumerable
(assuming them to be @Number@s (implementing @+ & @*)).
"""
inject: 1 into: '*
}
def average {
"""
@return Average value in @self (expecting @Number@s or Objects implementing @+ and @*).
"""
{ return 0 } if: empty?
sum to_f / size
}
def partition_by: block {
"""
@block @Block@ that gets used to decide when to partition elements in @self.
@return @Array@ of @Array@s, partitioned by equal return values of calling @block with each element
Example:
(0..10) partition_by: @{ < 3 } # => [[0, 1, 2], [3, 4, 5, 6, 7, 8, 9, 10]]
"""
last = block call: [first]
coll = []
tmp_coll = []
each: |x| {
tmp = block call: [x]
if: (tmp != last) then: {
coll << tmp_coll
tmp_coll = [x]
} else: {
tmp_coll << x
}
last = tmp
}
coll << tmp_coll
coll
}
def chunk_by: block {
"""
@block @Block@ to chunk @self by.
@return @Array@ of chunks, each including the return value of calling @block with elements in the chunk, as well as the elements themselves (within another @Array@).
Similar to @Fancy::Enumerable#partition_by:@ but includes the value of
calling @block with an element within the chunk.
Example:
[1,3,4,5,6,8,10] chunk_by: 'odd?
# => [[true, [1,3]], [false, [4]], [true, [5]], [false, [6,8,10]]]
"""
{ return [] } if: empty?
chunks = []
curr_chunk = []
initial = first
last_val = block call: [initial]
curr_chunk << initial
rest each: |x| {
val = block call: [x]
if: (val != last_val) then: {
chunks << [last_val, curr_chunk]
curr_chunk = []
}
curr_chunk << x
last_val = val
}
{ chunks << [last_val, curr_chunk] } unless: $ curr_chunk empty?
chunks
}
def random {
"""
@return Random element in @self.
"""
at: $ size random
}
def sort: comparison_block {
"""
@comparison_block @Block@ taking 2 arguments used to compare elements in a collection.
@return Sorted @Array@ of elements in @self.
Sorts a collection by a given comparison block.
"""
sort(&comparison_block)
}
def sort_by: block {
"""
@block @Block@ taking 1 argument used to extract a value to use for comparison.
@return Sorted @Array@ of elements in @self based on @block.
Sorts a collection by calling a @Block@ with every element
and using the return values for comparison.
Example:
[\"abc\", \"abcd\", \"ab\", \"a\", \"\"] sort_by: @{ size }
# => [\"\", \"a\", \"ab\", \"abc\", \"abcd\"]
"""
sort_by() |x| {
block call: [x]
}
}
def in_groups_of: size {
"""
@size Maximum size of each group.
@return @Array@ of @Array@s with a max size of @size (grouped).
Example:
[1,2,3,4,5] in_groups_of: 3 # => [[1,2,3],[4,5]]
"""
groups = []
tmp = []
enum = to_enum
{ return groups } if: (size <= 0)
loop: {
size times: {
tmp << (enum next)
}
if: (enum ended?) then: {
{ groups << tmp } unless: $ tmp empty?
break
}
groups << tmp
tmp = []
}
groups
}
def group_by: block {
"""
@block @Block@ used to group elements in @self by.
@return @Hash@ with elements in @self grouped by return value of calling @block with them.
Returns the elements grouped by @block in a @Hash@ (the keys being the
value of calling @block with the elements).
Example:
('foo, 1, 2, 'bar) group_by: @{ class }
# => <[Symbol => ['foo, 'bar], Fixnum => [1,2]]>
"""
h = <[]>
each: |x| {
group = h at: (block call: [x]) else_put: { [] }
group << x
}
h
}
def reverse {
"""
@return @self in reverse order.
Returns @self in reverse order.
This only makes sense for collections that have an ordering.
In either case, it simply converts @self to an @Array@ and returns it in reversed order.
"""
self to_a reverse
}
def to_a {
"""
Default implementation for converting @Fancy::Enumerable@s into @Array@s.
"""
a = []
each: |x| {
a << x
}
a
}
def to_hash: block {
"""
@block @Block@ to be called to get the key for each element in @self.
@return @Hash@ of key/value pairs based on values in @self.
Example:
[\"foo\", \”hello\", \"ok\", \"\"] to_hash: @{ size }
# => <[3 => \"foo\", 5 => \"hello\", 2 => \"ok\", 0 => \"\"]>
"""
inject: <[]> into: |h val| {
key = block call: [val]
h[key]: val
h
}
}
def reverse_each: block {
"""
@block @Block@ to be called for each element in reverse order.
@return @self
Runs @block for each element on reversed version of self.
If @self is not a sorted collection, no guarantees about the reverse order can be given.
"""
reverse each: block
}
def count: block {
"""
@block Predicate @Block@ called with each element.
@return @Fixnum@ that is the amount of elements in @self for which @block yields @true.
Example:
(0..10) count: @{ even? } # => 6 (even numbers are: 0,2,4,6,8,10)
[1,2,3] count: @{ odd? } # => 2
[1,2, \"foo\"] count: @{ class == String } # => 1
"""
count = 0
each: |x| {
{ count = count + 1 } if: $ block call: [x]
}
count
}
def to_s {
"""
@return @String@ concatenation of elements in @self.
Example:
(1,2,3) to_s # => \"123\"
[1,2,3] to_s # => \"123\"
\"foo\" to_s # => \"foo\"
"""
join
}
def sorted? {
"""
@return @true if @self is sorted, @false otherwise.
Example:
(1,2,3) sorted? # => true
(2,1,3) sorted? # => false
\"abc\" sorted? # => true
\"bac\" sorted? # => false
"""
last = nil
each: |x| {
if: last then: {
{ return false } unless: $ last <= x
}
last = x
}
true
}
def split_at: index {
"""
@index Index at which @self should be split.
@return @Array@ of 2 @Array@s of elements in self splitted at @index.
Example:
[1,2,3,4,5] split_at: 2 # => [[1,2], [3,4,5]]
"""
[take: index, drop: index]
}
def split_with: predicate_block {
"""
@predicate_block @Block@ to be used as a predicate on where to split in @self.
@return @Array@ of 2 @Array@s of elements split based on @predicate_block.
Example:
[1,2,3,4,5] split_with: @{ < 3 } # => [[1, 2], [3, 4, 5]]
"""
[take_while: predicate_block, drop_while: predicate_block]
}
def grep: pattern {
"""
@pattern Pattern to be filtered by (via @Object#===@)
@return Elements in @self for which @pattern matches.
Example:
\"hello world\" grep: /[a-h]/ # => [\"h\", \"e\", \"d\"]
[\"hello\", \"world\", 1, 2, 3] grep: String # => [\"hello\", \"world\"]
"""
select: |x| { pattern === x }
}
def grep: pattern taking: block {
"""
@pattern Pattern to be filtered by (via @Object#===@)
@block @Block@ to be called with each element for which @pattern matches.
@return Return values of elements in @self called with @block for which @pattern matches.
Example:
\"hello world\" grep: /[a-h]/ taking: @{ upcase } # => [\"H\", \"E\", \"D\"]
[\"hello\", \"world\", 1, 2, 3] grep: String taking: 'upcase # => [\"HELLO\", \"WORLD\"]
"""
result = []
each: |x| {
match x {
case pattern -> result << (block call: [x])
}
}
result
}
def one?: block {
"""
@block @Block@ to be used to check for a condition expected only once in @self.
@return @true if @block yields @true only once for all elements in @self.
Example:
(0,1,2) one?: 'odd? # => true
(0,1,2) one?: 'even? # => false
"""
count: block == 1
}
def none?: block {
"""
@block @Block@ to be used to check for a condition expected not once in @self.
@return @true if none of the elements in @self called with @block yield @true.
Example:
(0,2,4) none?: 'odd? # => true
(0,2,5) none?: 'odd? # => false
"""
any?: block . not
}
}
}
| Fancy | 5 | bakkdoor/fancy | lib/enumerable.fy | [
"BSD-3-Clause"
] |
<%@ page contentType="text/html; charset=utf-8"%>
<style>
.form-control {
height: 30px;
}
</style>
<table>
<tr>
<th>
<div class="input-group" style="float:left;">
<span class="input-group-addon">开始</span>
<input type="text" id="time" style="width:130px"/>
</div>
<div class="input-group" style="float:left;width:60px">
<span class="input-group-addon">结束</span>
<input type="text" id="endTime" style="width:60px;"/></div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">App</span>
<select id="appId" style="width: 100px;">
<c:forEach var="item" items="${model.apps}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:350px">
<span class="input-group-addon">命令字</span>
<form id="wrap_search" style="margin-bottom:0px;">
<span class="input-icon" style="width:350px;">
<input type="text" placeholder="" class="search-input search-input form-control ui-autocomplete-input" id="command" autocomplete="on" data=""/>
<i class="ace-icon fa fa-search nav-search-icon"></i>
</span>
</form>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">来源</span>
<select id="source" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.sources}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">返回码</span>
<select id="code" style="width:120px"><option value=''>All</option></select>
</div>
</th>
</tr>
<tr>
<th align=left>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">网络类型</span>
<select id="network">
<option value=''>All</option>
<c:forEach var="item" items="${model.networks}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">版本</span>
<select id="version" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.versions}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">连接类型</span>
<select id="connectionType" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.connectionTypes}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">平台</span>
<select id="platform" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.platforms}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">地区</span>
<select id="city" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.cities}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">运营商</span>
<select id="operator" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.operators}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<input class="btn btn-primary btn-sm"
value=" 查询 " onclick="query()"
type="submit" /> <input class="btn btn-primary btn-sm" id="checkbox"
onclick="check()" type="checkbox" /> <label for="checkbox"
style="display: -webkit-inline-box">选择对比</label>
</th>
</tr>
</table>
<table id="history" style="display: none">
<tr>
<th>
<div class="input-group" style="float:left;">
<span class="input-group-addon">开始</span>
<input type="text" id="time2" style="width:130px"/>
</div>
<div class="input-group" style="float:left;width:60px">
<span class="input-group-addon">结束</span>
<input type="text" id="endTime2" style="width:60px;"/></div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">App</span>
<select id="appId2" style="width: 100px;">
<c:forEach var="item" items="${model.apps}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:350px">
<span class="input-group-addon">命令字</span>
<form id="wrap_search2" style="margin-bottom:0px;">
<span class="input-icon" style="width:350px;">
<input type="text" placeholder="input domain for search" class="search-input search-input form-control ui-autocomplete-input" id="command2" autocomplete="on" data=""/>
<i class="ace-icon fa fa-search nav-search-icon"></i>
</span>
</form>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">来源</span>
<select id="source2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.sources}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">返回码</span>
<select id="code2" style="width:120px"><option value=''>All</option></select>
</div>
</th>
</tr>
<tr>
<th align=left>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">网络类型</span>
<select id="network2">
<option value=''>All</option>
<c:forEach var="item" items="${model.networks}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">版本</span>
<select id="version2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.versions}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">连接类型</span>
<select id="connectionType2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.connectionTypes}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">平台</span>
<select id="platform2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.platforms}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">地区</span>
<select id="city2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.cities}" varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float:left;width:120px">
<span class="input-group-addon">运营商</span>
<select id="operator2" style="width: 100px;">
<option value=''>All</option>
<c:forEach var="item" items="${model.operators}"
varStatus="status">
<option value='${item.value.id}'>${item.value.value}</option>
</c:forEach>
</select>
</div>
</th>
</tr>
</table>
<div>
<label class="btn btn-info btn-sm"><input type="radio"
name="typeCheckbox" value="request">请求数
</label><label class="btn btn-info btn-sm"> <input type="radio"
name="typeCheckbox" value="success">网络成功率</label><label class="btn btn-info btn-sm">
<input type="radio" name="typeCheckbox" value="businessSuccess">业务成功率
</label><label class="btn btn-info btn-sm"> <input type="radio"
name="typeCheckbox" value="delay">成功延时
</label>
</div>
<div style="float: left; width: 100%;">
<div id="${model.lineChart.id}"></div>
</div>
<br/>
<table id="web_content" class="table table-striped table-condensed table-bordered table-hover">
<thead>
<tr class="text-success">
<th class="right text-success">类别</th>
<th class="right text-success">成功率(%)</th>
<th class="right text-success">总请求数</th>
<th class="right text-success">成功平均延迟(ms)</th>
<th class="right text-success">平均发包(B)</th>
<th class="right text-success">平均回包(B)</th>
</tr></thead>
<tbody>
<c:forEach var="item" items="${model.comparisonAppDetails}">
<tr class="right">
<td>${item.key}</td>
<td>${w:format(item.value.successRatio,'#0.000')}%</td>
<td>${w:format(item.value.accessNumberSum,'#,###,###,###,##0')}</td>
<td>${w:format(item.value.responseTimeAvg,'###,##0.000')}</td>
<td>${w:format(item.value.requestPackageAvg,'#,###,###,###,##0')}</td>
<td>${w:format(item.value.responsePackageAvg,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</tbody>
</table>
<h5 class="center text-success"><strong>点击展开,进行OLAP查询</strong></h5>
<table id="comparison_content" class="table table-striped table-condensed table-bordered table-hover">
<thead>
<tr>
<th class="right text-success">网络类型</th>
<th class="right text-success">版本</th>
<th class="right text-success">连接类型</th>
<th class="right text-success">平台</th>
<th class="right text-success">地区</th>
<th class="right text-success">运营商</th>
<th class="right text-success">来源</th>
<th class="right"><a href="javascript:queryGroupBy('success');">成功率</a>(%)</th>
<th class="right"><a href="javascript:queryGroupBy('request');">总请求数</a></th>
<th class="right"><a href="javascript:queryGroupBy('delay');">成功平均延迟</a>(ms)</th>
<th class="right"><a href="javascript:queryGroupBy('requestPackage');">平均发包</a>(B)</th>
<th class="right"><a href="javascript:queryGroupBy('responsePackage');">平均回包</a>(B)</th>
</tr></thead>
<tbody>
<c:forEach var="item" items="${model.appDataDetailInfos}" varStatus="status">
<tr class="right">
<c:set var="networkCode" value="${item.network eq '-1' ? '' : item.network}"/>
<c:set var="appVersionCode" value="${item.appVersion eq '-1' ? '' : item.appVersion}"/>
<c:set var="channelCode" value="${item.connectType eq '-1' ? '' : item.connectType}"/>
<c:set var="platformCode" value="${item.platform eq '-1' ? '' : item.platform}"/>
<c:set var="cityCode" value="${item.city eq '-1' ? '' : item.city}"/>
<c:set var="operatorCode" value="${item.operator eq '-1' ? '' : item.operator}"/>
<c:set var="sourceCode" value="${item.source eq '-1' ? '' : item.source}"/>
<c:set var="network" value="${model.networks[networkCode].value}"/>
<c:set var="appVersion" value="${model.versions[appVersionCode].value}"/>
<c:set var="channel" value="${model.connectionTypes[channelCode].value}"/>
<c:set var="platform" value="${model.platforms[platformCode].value}"/>
<c:set var="city" value="${model.cities[cityCode].value}"/>
<c:set var="operator" value="${model.operators[operatorCode].value}"/>
<c:set var="source" value="${model.sources[sourceCode].value}"/>
<c:choose>
<c:when test="${empty networkCode}">
<td><button class="btn btn-xs btn-info" onclick="query('network', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty network}">
<td class="text-danger">Unknown [${networkCode}]</td>
</c:when>
<c:otherwise>
<td>${network}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty appVersionCode}">
<td><button class="btn btn-xs btn-info" onclick="query('app-version', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty appVersion}">
<td class="text-danger">Unknown [${appVersionCode}]</td>
</c:when>
<c:otherwise>
<td>${appVersion}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty channelCode}">
<td><button class="btn btn-xs btn-info" onclick="query('connect-type', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty channel}">
<td class="text-danger">Unknown [${channelCode}]</td>
</c:when>
<c:otherwise>
<td>${channel}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty platformCode}">
<td><button class="btn btn-xs btn-info" onclick="query('platform', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty platform}">
<td class="text-danger">Unknown [${platformCode}]</td>
</c:when>
<c:otherwise>
<td>${platform}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty cityCode}">
<td><button class="btn btn-xs btn-info" onclick="query('city', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty city}">
<td class="text-danger">Unknown [${cityCode}]</td>
</c:when>
<c:otherwise>
<td>${city}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty operatorCode}">
<td><button class="btn btn-xs btn-info" onclick="query('operator', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty operator}">
<td class="text-danger">Unknown [${operatorCode}]</td>
</c:when>
<c:otherwise>
<td>${operator}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${empty sourceCode}">
<td><button class="btn btn-xs btn-info" onclick="query('source', '${networkCode}','${appVersionCode}','${channelCode}','${platformCode}','${cityCode}','${operatorCode}','${sourceCode}');">展开⬇</button></td>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${empty source}">
<td class="text-danger">Unknown [${sourceCode}]</td>
</c:when>
<c:otherwise>
<td>${source}</td>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<td>${w:format(item.successRatio,'#0.000')}%</td>
<td>${w:format(item.accessNumberSum,'#,###,###,###,##0')}</td>
<td>${w:format(item.responseTimeAvg,'###,##0.000')}</td>
<td>${w:format(item.requestPackageAvg,'#,###,###,###,##0')}</td>
<td>${w:format(item.responsePackageAvg,'#,###,###,###,##0')}</td>
</tr>
</c:forEach>
</tbody>
</table>
| Java Server Pages | 3 | woozhijun/cat | cat-home/src/main/webapp/jsp/report/app/linechartDetail.jsp | [
"Apache-2.0"
] |
--TEST--
SplFileObject::fgetcsv with alternative delimiter
--FILE--
<?php
$fp = fopen('SplFileObject__fgetcsv3.csv', 'w+');
fputcsv($fp, array(
'field1',
'field2',
'field3',
5
), '|');
fclose($fp);
$fo = new SplFileObject('SplFileObject__fgetcsv3.csv');
try {
var_dump($fo->fgetcsv('invalid'));
} catch (ValueError $e) {
echo $e->getMessage(), "\n";
}
?>
--CLEAN--
<?php
unlink('SplFileObject__fgetcsv3.csv');
?>
--EXPECT--
SplFileObject::fgetcsv(): Argument #1 ($separator) must be a single character
| PHP | 3 | NathanFreeman/php-src | ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt | [
"PHP-3.01"
] |
@mixin rtl()
.v-application--is-rtl &
@content
@mixin ltr()
.v-application--is-ltr &
@content
| Sass | 4 | ahmadiqbal1/vuetify | packages/vuetify/src/styles/tools/_rtl.sass | [
"MIT"
] |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {getFileSystem, PathManipulation} from '@angular/compiler-cli/private/localize';
import {ɵParsedTranslation} from '@angular/localize';
import {NodePath, PluginObj, types as t} from '../../babel_core';
import {Diagnostics} from '../../diagnostics';
import {buildCodeFrameError, buildLocalizeReplacement, isBabelParseError, isLocalize, translate, TranslatePluginOptions, unwrapMessagePartsFromTemplateLiteral} from '../../source_file_utils';
/**
* Create a Babel plugin that can be used to do compile-time translation of `$localize` tagged
* messages.
*
* @publicApi used by CLI
*/
export function makeEs2015TranslatePlugin(
diagnostics: Diagnostics, translations: Record<string, ɵParsedTranslation>,
{missingTranslation = 'error', localizeName = '$localize'}: TranslatePluginOptions = {},
fs: PathManipulation = getFileSystem()): PluginObj {
return {
visitor: {
TaggedTemplateExpression(path: NodePath<t.TaggedTemplateExpression>) {
try {
const tag = path.get('tag');
if (isLocalize(tag, localizeName)) {
const [messageParts] =
unwrapMessagePartsFromTemplateLiteral(path.get('quasi').get('quasis'), fs);
const translated = translate(
diagnostics, translations, messageParts, path.node.quasi.expressions,
missingTranslation);
path.replaceWith(buildLocalizeReplacement(translated[0], translated[1]));
}
} catch (e) {
if (isBabelParseError(e)) {
// If we get a BabelParseError here then something went wrong with Babel itself
// since there must be something wrong with the structure of the AST generated
// by Babel parsing a TaggedTemplateExpression.
throw buildCodeFrameError(fs, path, e);
} else {
throw e;
}
}
}
}
};
}
| TypeScript | 5 | John-Cassidy/angular | packages/localize/tools/src/translate/source_files/es2015_translate_plugin.ts | [
"MIT"
] |
class Reverse[A: (Real[A] val & Number) = USize] is Iterator[A]
"""
Produces a decreasing range [max, min] with step `dec`, for any `Number` type.
(i.e. the reverse of `Range`)
Example program:
```pony
use "collections"
actor Main
new create(env: Env) =>
for e in Reverse(10, 2, 2) do
env.out.print(e.string())
end
```
Which outputs:
```
10
8
6
4
2
```
If `dec` is 0, produces an infinite series of `max`.
If `dec` is negative, produces a range with `max` as the only value.
"""
let _min: A
let _max: A
let _dec: A
var _idx: A
new create(max: A, min: A, dec: A = 1) =>
_min = min
_max = max
_dec = dec
_idx = max
fun has_next(): Bool =>
(_idx >= _min) and (_idx <= _max)
fun ref next(): A =>
if has_next() then
_idx = _idx - _dec
else
_idx + _dec
end
fun ref rewind() =>
_idx = _max
| Pony | 5 | presidentbeef/ponyc | packages/collections/reverse.pony | [
"BSD-2-Clause"
] |
package com.baeldung.webclient;
import com.baeldung.webclient.status.WebClientStatusCodeHandler;
import com.github.tomakehurst.wiremock.WireMockServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringRunner;
import reactor.core.publisher.Mono;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.configureFor;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
@RunWith(SpringRunner.class)
public class WebClientStatusCodeHandlerIntegrationTest {
private String baseUrl;
private WireMockServer wireMockServer;
@Before
public void setUp() {
wireMockServer = new WireMockServer(wireMockConfig().dynamicPort());
wireMockServer.start();
configureFor("localhost", wireMockServer.port());
baseUrl = format("http://localhost:%s", wireMockServer.port());
}
@After
public void tearDown() {
wireMockServer.stop();
}
@Test
public void whenResponseIs2XX_thenBothStatusHandlerAndExchangeFilterReturnEqualResponses() {
stubPostResponse("/success", 200, "success");
Mono<String> responseStatusHandler = WebClientStatusCodeHandler
.getResponseBodyUsingOnStatus(baseUrl + "/success");
Mono<String> responseExchangeFilter = WebClientStatusCodeHandler
.getResponseBodyUsingExchangeFilterFunction(baseUrl + "/success");
assertThat(responseStatusHandler.block())
.isEqualTo(responseExchangeFilter.block())
.isEqualTo("success");
}
@Test
public void whenResponseIs500_thenBothStatusHandlerAndExchangeFilterReturnEqualResponses() {
stubPostResponse("/server-error", 500, "Internal Server Error");
Mono<String> responseStatusHandler = WebClientStatusCodeHandler
.getResponseBodyUsingOnStatus(baseUrl + "/server-error");
Mono<String> responseExchangeFilter = WebClientStatusCodeHandler
.getResponseBodyUsingExchangeFilterFunction(baseUrl + "/server-error");
assertThatThrownBy(responseStatusHandler::block)
.isInstanceOf(Exception.class)
.hasMessageContaining("Internal Server Error");
assertThatThrownBy(responseExchangeFilter::block)
.isInstanceOf(Exception.class)
.hasMessageContaining("Internal Server Error");
}
@Test
public void whenResponseIs400_thenBothStatusHandlerAndExchangeFilterReturnEqualResponses() {
stubPostResponse("/client-error", 400, "Bad Request");
Mono<String> responseStatusHandler = WebClientStatusCodeHandler
.getResponseBodyUsingOnStatus(baseUrl + "/client-error");
Mono<String> responseExchangeFilter = WebClientStatusCodeHandler
.getResponseBodyUsingExchangeFilterFunction(baseUrl + "/client-error");
assertThatThrownBy(responseStatusHandler::block)
.isInstanceOf(Exception.class)
.hasMessageContaining("Bad Request");
assertThatThrownBy(responseExchangeFilter::block)
.isInstanceOf(Exception.class)
.hasMessageContaining("Bad Request");
}
private static void stubPostResponse(String url, int statusCode, String response) {
stubFor(post(urlEqualTo(url)).willReturn(aResponse()
.withStatus(statusCode)
.withBody(response)));
}
} | Java | 5 | DBatOWL/tutorials | spring-5-reactive-client/src/test/java/com/baeldung/webclient/WebClientStatusCodeHandlerIntegrationTest.java | [
"MIT"
] |
grasp = require '..'
require! {
'cli-color': clc
path
}
{strict-equal: equal, deep-equal, throws}:assert = require 'assert'
{keys, reject, map, lines} = require 'prelude-ls'
{EventEmitter} = require 'events'
class StdIn extends EventEmitter
(@data) ~>
@current-line = 0
@data-len = @data?.length
emit-data: ~>
@emit 'data', @data[@current-line]
@current-line++
if @current-line is @data-len
clear-interval @interval
@emit 'end'
resume: -> @interval = set-interval @emit-data, 5
set-encoding: ->
class FileSystem
(files) ->
@files = {}
for name, info of files
@files[path.join process.cwd!, name] = info
read-file-sync: (target-path) ->
node = @files[path.resolve target-path]
if node.type is 'directory'
throw new Error "#target-path is directory"
else
node.contents
read-dir-sync: (target-path) ->
node = @files[path.resolve target-path]
if node.type is 'file'
throw new Error "#target-path is file"
else
keys node
lstat-sync: (target-path) ->
node = @files[path.resolve target-path]
is-directory: -> node.type is 'directory'
is-file: -> node.type is 'file'
q = (args, opts = {}) ->
opts <<< {args}
grasp opts
test-func = (type, o, quiet) ->
(result) !->
throw new Error 'Unexpected result - quiet is on.' if quiet
try
expected-val = o.expected[o.i]
until o.callback or typeof! expected-val is 'Object'
++o.i
expected-val = o.expected[o.i]
if type is 'callback'
expected-real-val = expected-val
else
unless expected-val?.func-type
throw new Error "Expected callback, but got #type instead, with result: #result."
equal type, expected-val?.func-type
expected-real-val = expected-val?.value
switch typeof! expected-real-val
| 'RegExp' =>
assert (expected-real-val.test if typeof! result is 'String' then result else JSON.stringify result), 'RegExp did not pass'
| otherwise =>
deep-equal result, expected-real-val
++o.i
catch
console.log o.expected
console.log o.i
console.log "\n#type"
console.log '---'
console.log result
console.log expected-real-val
console.log '---'
console.log JSON.stringify result
console.log JSON.stringify expected-real-val
throw e
embolden = ->
if typeof! it is 'String'
it.replace /##/g '\u001b[1m' .replace /#/g '\u001b[22m'
else
it
eq = (arg-string, expected, done, {quiet, data, color, callback = true, stdin, fs, input, dir, final, text-format} = {}) !->
process.chdir dir if dir
expected-formatted = map embolden, [].concat expected
args = if not arg-string? then null else if color then arg-string else "--no-color #arg-string"
expected-len = expected-formatted.length
o =
i: 0
expected: expected-formatted
callback: callback
options =
console:
log: test-func 'log', o
warn: test-func 'warn', o
error: test-func 'error', o
time: test-func 'time', o
time-end: test-func 'time-end', o
callback: if callback then test-func 'callback', o, quiet else null
error: test-func 'error', o
stdin: stdin
fs: fs
text-format: text-format
input: input
data: data
exit: (exit-code, results) ->
res = [].concat results
j = 0
try
if final
final results
else
for exp in expected-formatted
continue if exp.func-type?
switch typeof! exp
| 'RegExp' =>
assert (exp.test res[j]), 'RegExp did not pass'
| otherwise =>
deep-equal exp, res[j]
j++
catch
console.log '\n'
console.log 'ERROR with final value compare'
console.log res
console.log expected-formatted
console.log JSON.stringify res
console.log JSON.stringify expected-formatted
throw e
done!
unless options.callback?
o.callback = false
q args, options
module.exports = {grasp, eq, q, StdIn, FileSystem}
| LiveScript | 4 | GerHobbelt/grasp | test/_helpers.ls | [
"MIT"
] |
export const n = 33;
| JavaScript | 1 | 1shenxi/webpack | test/cases/wasm/global-refs-imported-global/env.js | [
"MIT"
] |
.icon-react-one {
@apply absolute w-20 z-10;
right: 13%;
top: 8%;
}
.icon-electron {
@apply absolute w-16 z-0;
left: 17%;
top: 35%;
}
.icon-vue {
@apply absolute w-16 z-10;
right: 33%;
top: 3%;
}
.icon-angular {
@apply absolute w-12 z-10;
right: 21%;
top: 33%;
}
.icon-flutter {
@apply absolute w-16 z-10;
left: 5%;
top: 15%;
}
.icon-nuxt {
@apply absolute w-12 z-10;
right: 5%;
top: 28%;
}
.icon-redwood {
@apply absolute w-14 z-10;
/* background-color: yellow; */
left: 15%;
top: 5%;
}
| CSS | 3 | saendu/supabase | www/components/FloatingIcons/FloatingIcons.module.css | [
"Apache-2.0"
] |
# This file is a part of Julia. License is MIT: https://julialang.org/license
function f28825()
eval(:(1+1))
end
| Julia | 1 | TimoLarson/julia | test/embedding/include_and_eval.jl | [
"Zlib"
] |
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Lint as: python3
"""Definitions for high level configuration groups.."""
from typing import Any, List, Mapping, Optional
import dataclasses
from official.core import config_definitions
from official.modeling import hyperparams
from official.modeling.hyperparams import config_definitions as legacy_cfg
CallbacksConfig = legacy_cfg.CallbacksConfig
TensorboardConfig = legacy_cfg.TensorboardConfig
RuntimeConfig = config_definitions.RuntimeConfig
@dataclasses.dataclass
class ExportConfig(hyperparams.Config):
"""Configuration for exports.
Attributes:
checkpoint: the path to the checkpoint to export.
destination: the path to where the checkpoint should be exported.
"""
checkpoint: str = None
destination: str = None
@dataclasses.dataclass
class MetricsConfig(hyperparams.Config):
"""Configuration for Metrics.
Attributes:
accuracy: Whether or not to track accuracy as a Callback. Defaults to None.
top_5: Whether or not to track top_5_accuracy as a Callback. Defaults to
None.
"""
accuracy: bool = None
top_5: bool = None
@dataclasses.dataclass
class TimeHistoryConfig(hyperparams.Config):
"""Configuration for the TimeHistory callback.
Attributes:
log_steps: Interval of steps between logging of batch level stats.
"""
log_steps: int = None
@dataclasses.dataclass
class TrainConfig(hyperparams.Config):
"""Configuration for training.
Attributes:
resume_checkpoint: Whether or not to enable load checkpoint loading.
Defaults to None.
epochs: The number of training epochs to run. Defaults to None.
steps: The number of steps to run per epoch. If None, then this will be
inferred based on the number of images and batch size. Defaults to None.
callbacks: An instance of CallbacksConfig.
metrics: An instance of MetricsConfig.
tensorboard: An instance of TensorboardConfig.
set_epoch_loop: Whether or not to set `steps_per_execution` to
equal the number of training steps in `model.compile`. This reduces the
number of callbacks run per epoch which significantly improves end-to-end
TPU training time.
"""
resume_checkpoint: bool = None
epochs: int = None
steps: int = None
callbacks: CallbacksConfig = CallbacksConfig()
metrics: MetricsConfig = None
tensorboard: TensorboardConfig = TensorboardConfig()
time_history: TimeHistoryConfig = TimeHistoryConfig()
set_epoch_loop: bool = False
@dataclasses.dataclass
class EvalConfig(hyperparams.Config):
"""Configuration for evaluation.
Attributes:
epochs_between_evals: The number of train epochs to run between evaluations.
Defaults to None.
steps: The number of eval steps to run during evaluation. If None, this will
be inferred based on the number of images and batch size. Defaults to
None.
skip_eval: Whether or not to skip evaluation.
"""
epochs_between_evals: int = None
steps: int = None
skip_eval: bool = False
@dataclasses.dataclass
class LossConfig(hyperparams.Config):
"""Configuration for Loss.
Attributes:
name: The name of the loss. Defaults to None.
label_smoothing: Whether or not to apply label smoothing to the loss. This
only applies to 'categorical_cross_entropy'.
"""
name: str = None
label_smoothing: float = None
@dataclasses.dataclass
class OptimizerConfig(hyperparams.Config):
"""Configuration for Optimizers.
Attributes:
name: The name of the optimizer. Defaults to None.
decay: Decay or rho, discounting factor for gradient. Defaults to None.
epsilon: Small value used to avoid 0 denominator. Defaults to None.
momentum: Plain momentum constant. Defaults to None.
nesterov: Whether or not to apply Nesterov momentum. Defaults to None.
moving_average_decay: The amount of decay to apply. If 0 or None, then
exponential moving average is not used. Defaults to None.
lookahead: Whether or not to apply the lookahead optimizer. Defaults to
None.
beta_1: The exponential decay rate for the 1st moment estimates. Used in the
Adam optimizers. Defaults to None.
beta_2: The exponential decay rate for the 2nd moment estimates. Used in the
Adam optimizers. Defaults to None.
epsilon: Small value used to avoid 0 denominator. Defaults to 1e-7.
"""
name: str = None
decay: float = None
epsilon: float = None
momentum: float = None
nesterov: bool = None
moving_average_decay: Optional[float] = None
lookahead: Optional[bool] = None
beta_1: float = None
beta_2: float = None
epsilon: float = None
@dataclasses.dataclass
class LearningRateConfig(hyperparams.Config):
"""Configuration for learning rates.
Attributes:
name: The name of the learning rate. Defaults to None.
initial_lr: The initial learning rate. Defaults to None.
decay_epochs: The number of decay epochs. Defaults to None.
decay_rate: The rate of decay. Defaults to None.
warmup_epochs: The number of warmup epochs. Defaults to None.
batch_lr_multiplier: The multiplier to apply to the base learning rate, if
necessary. Defaults to None.
examples_per_epoch: the number of examples in a single epoch. Defaults to
None.
boundaries: boundaries used in piecewise constant decay with warmup.
multipliers: multipliers used in piecewise constant decay with warmup.
scale_by_batch_size: Scale the learning rate by a fraction of the batch
size. Set to 0 for no scaling (default).
staircase: Apply exponential decay at discrete values instead of continuous.
"""
name: str = None
initial_lr: float = None
decay_epochs: float = None
decay_rate: float = None
warmup_epochs: int = None
examples_per_epoch: int = None
boundaries: List[int] = None
multipliers: List[float] = None
scale_by_batch_size: float = 0.
staircase: bool = None
@dataclasses.dataclass
class ModelConfig(hyperparams.Config):
"""Configuration for Models.
Attributes:
name: The name of the model. Defaults to None.
model_params: The parameters used to create the model. Defaults to None.
num_classes: The number of classes in the model. Defaults to None.
loss: A `LossConfig` instance. Defaults to None.
optimizer: An `OptimizerConfig` instance. Defaults to None.
"""
name: str = None
model_params: hyperparams.Config = None
num_classes: int = None
loss: LossConfig = None
optimizer: OptimizerConfig = None
@dataclasses.dataclass
class ExperimentConfig(hyperparams.Config):
"""Base configuration for an image classification experiment.
Attributes:
model_dir: The directory to use when running an experiment.
mode: e.g. 'train_and_eval', 'export'
runtime: A `RuntimeConfig` instance.
train: A `TrainConfig` instance.
evaluation: An `EvalConfig` instance.
model: A `ModelConfig` instance.
export: An `ExportConfig` instance.
"""
model_dir: str = None
model_name: str = None
mode: str = None
runtime: RuntimeConfig = None
train_dataset: Any = None
validation_dataset: Any = None
train: TrainConfig = None
evaluation: EvalConfig = None
model: ModelConfig = None
export: ExportConfig = None
| Python | 5 | akshit-protonn/models | official/vision/image_classification/configs/base_configs.py | [
"Apache-2.0"
] |
<?xml version="1.0" encoding="UTF-8"?>
<!-- ******************************************************************* -->
<!-- -->
<!-- Copyright IBM Corp. 2010, 2014 -->
<!-- -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at: -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -->
<!-- implied. See the License for the specific language governing -->
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- ******************************************************************* -->
<!-- DO NOT EDIT. THIS FILE IS GENERATED. -->
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/coreex</namespace-uri>
<default-prefix>xe</default-prefix>
<designer-extension>
<control-subpackage-name>misc</control-subpackage-name>
</designer-extension>
</faces-config-extension>
<component>
<description>%component.keepSessionAlive.descr%</description>
<display-name>%component.keepSessionAlive.name%</display-name>
<component-type>com.ibm.xsp.extlib.misc.KeepSessionAlive</component-type>
<component-class>com.ibm.xsp.extlib.component.misc.UIKeepSessionAlive</component-class>
<property>
<description>%property.delay.descr%</description>
<display-name>%property.delay.name%</display-name>
<property-name>delay</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<component-family>com.ibm.xsp.extlib.Misc</component-family>
<renderer-type>com.ibm.xsp.extlib.misc.KeepSessionAlive</renderer-type>
<tag-name>keepSessionAlive</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Extension Library</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>%component.firebugLite.descr%</description>
<display-name>%component.firebugLite.name%</display-name>
<component-type>com.ibm.xsp.extlib.misc.FirebugLite</component-type>
<component-class>com.ibm.xsp.extlib.component.misc.UIFirebugLite</component-class>
<property>
<description>%property.url.descr%</description>
<display-name>%property.url.name%</display-name>
<property-name>url</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<editor>com.ibm.workplace.designer.property.editors.comboParameterEditor</editor>
<editor-parameter>
https://getfirebug.com/firebug-lite.js
</editor-parameter>
</designer-extension>
</property-extension>
</property>
<component-extension>
<component-family>com.ibm.xsp.extlib.Misc</component-family>
<renderer-type>com.ibm.xsp.extlib.misc.FirebugLite</renderer-type>
<tag-name>firebugLite</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Extension Library</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>%component.dumpObject.descr%</description>
<display-name>%component.dumpObject.name%</display-name>
<component-type>com.ibm.xsp.extlib.misc.DumpObject</component-type>
<component-class>com.ibm.xsp.extlib.component.misc.UIDumpObject</component-class>
<property>
<description>%property.value.descr%</description>
<display-name>%property.value.name%</display-name>
<property-name>value</property-name>
<property-class>java.lang.Object</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.objectNames.descr%</description>
<display-name>%property.objectNames.name%</display-name>
<property-name>objectNames</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.levels.descr%</description>
<display-name>%property.levels.name%</display-name>
<property-name>levels</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.startFilter.descr%</description>
<display-name>%property.startFilter.name%</display-name>
<property-name>startFilter</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.title.descr%</description>
<display-name>%property.title.name%</display-name>
<property-name>title</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<localizable>true</localizable>
<designer-extension>
<category>basics</category>
<tags>
not-accessibility-title
</tags>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.maxGridRows.descr%</description>
<display-name>%property.maxGridRows.name%</display-name>
<property-name>maxGridRows</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>%property.useBeanProperties.descr%</description>
<display-name>%property.useBeanProperties.name%</display-name>
<property-name>useBeanProperties</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<component-family>com.ibm.xsp.extlib.Misc</component-family>
<renderer-type>com.ibm.xsp.extlib.misc.DumpObject</renderer-type>
<tag-name>dumpObject</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Extension Library</category>
</designer-extension>
</component-extension>
</component>
</faces-config>
| XPages | 4 | jesse-gallagher/XPagesExtensionLibrary | extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/config/extlib-misc.xsp-config | [
"Apache-2.0"
] |
a { color: #aabcccdd } | CSS | 1 | mengxy/swc | crates/swc_css_parser/tests/fixture/esbuild/misc/oj5Yn0RxnGFEbVphKqrL2Q/input.css | [
"Apache-2.0"
] |
"""The upc_connect component."""
| Python | 0 | domwillcode/home-assistant | homeassistant/components/upc_connect/__init__.py | [
"Apache-2.0"
] |
module ciena-waveserver-lldp {
namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-lldp";
prefix lldp;
import ciena-waveserver-typedefs {
prefix cienawstypes;
}
organization
"Ciena Corporation";
contact
"Web URL: http://www.ciena.com/
Postal: 7035 Ridge Road
Hanover, Maryland 21076
U.S.A.
Phone: +1 800-921-1144
Fax: +1 410-694-5750";
description
"This module defines the configuration and operational data for Link Layer Discovery Protocol (LLDP) on the Waveserver.";
revision 2017-06-16 {
description
"Waveserver Platform Data Model
Migrated from Waveserver Classic R1.4 YANG model.
Updated namespace to 'ciena-waveserver'.
Changed 'port-id' from integer to string format.";
reference "";
}
typedef chassis-id {
type string {
length "1..256";
}
description
"Chassis Identifier";
}
typedef chassis-id-subtype {
type enumeration {
enum "unknown" {
value 0;
}
enum "chassis-component" {
value 1;
}
enum "interface-alias" {
value 2;
}
enum "port-component" {
value 3;
}
enum "mac-address" {
value 4;
}
enum "network-address" {
value 5;
}
enum "interface-name" {
value 6;
}
enum "local" {
value 7;
}
}
}
typedef lldp-system-capability-bits {
type bits {
bit other {
position 0;
}
bit repeater {
position 1;
}
bit bridge {
position 2;
}
bit wlan-access-point {
position 3;
}
bit router {
position 4;
}
bit telephone {
position 5;
}
bit docsis {
position 6;
}
bit station-only {
position 7;
}
}
}
typedef lldp-management-address-subtype {
type enumeration {
enum "reserved" {
value 0;
}
enum "ipv4" {
value 1;
}
enum "ipv6" {
value 2;
}
enum "nsap" {
value 3;
}
enum "hdlc" {
value 4;
}
enum "bbn-1822" {
value 5;
}
enum "ieee-802" {
value 6;
}
enum "e-163" {
value 7;
}
enum "e164-smds-atm" {
value 8;
}
enum "f69-telex" {
value 9;
}
enum "x121-x25-fr" {
value 10;
}
enum "ipx" {
value 11;
}
enum "appletalk" {
value 12;
}
enum "decnet-iv" {
value 13;
}
enum "banyan-vines" {
value 14;
}
enum "e164-w-nsap" {
value 15;
}
enum "dns" {
value 16;
}
enum "distinguish-name" {
value 17;
}
enum "as-number" {
value 18;
}
enum "xtp-over-ipv4" {
value 19;
}
enum "xtp-over-ipv6" {
value 20;
}
enum "xtp-native-mode" {
value 21;
}
enum "fibre-ch-ww-port" {
value 22;
}
enum "fibre-ch-ww-node" {
value 23;
}
enum "gwid" {
value 24;
}
}
description
"";
}
typedef lldp-management-address-interface-subtype {
type enumeration {
enum "unknown" {
value 0;
}
enum "un-known" {
value 1;
}
enum "if-index" {
value 2;
}
enum "system-port-number" {
value 3;
}
}
description
"";
}
typedef lldp-port-id-sub-type {
type enumeration {
enum "unknown" {
value 0;
}
enum "interface-alias" {
value 1;
}
enum "port-component" {
value 2;
}
enum "mac-address" {
value 3;
}
enum "network-address" {
value 4;
}
enum "interface-name" {
value 5;
}
enum "agent-circuit-id" {
value 6;
}
enum "local" {
value 7;
}
}
description
"Local port id sub-type.";
}
typedef lldp-auto-neg-capability {
type enumeration {
enum "unknown" {
value 0;
}
enum "b-10base-t" {
value 1;
}
enum "b-10base-t-fd" {
value 2;
}
enum "b-100base-t4" {
value 3;
}
enum "b-100base-tx" {
value 4;
}
enum "b-100base-tx-full-duplex" {
value 5;
}
enum "b-100base-t2" {
value 6;
}
enum "b-100base-t2-full-duplex" {
value 7;
}
enum "b-full-duplex-pause" {
value 8;
}
enum "b-full-duplex-asymmetric-pause" {
value 9;
}
enum "b-full-duplex-symmetric-pause" {
value 10;
}
enum "b-full-duplex-asymmetric-symmetric-pause" {
value 11;
}
enum "b-1000base-x" {
value 12;
}
enum "b-1000base-x-full-duplex" {
value 13;
}
enum "b-1000base-t" {
value 14;
}
enum "b-1000base-t-full-duplex" {
value 15;
}
}
}
typedef lldp-operational-mau-type {
type enumeration {
enum "unknown" {
value 0;
}
enum "dot3-mau-type-aui" {
value 1;
}
enum "dot3-mau-type-10-base-5" {
value 2;
}
enum "dot3-mau-type-foirl" {
value 3;
}
enum "dot3-mau-type-10-base-2" {
value 4;
}
enum "dot3-mau-type-10-base-t" {
value 5;
}
enum "dot3-mau-type-10-base-fp" {
value 6;
}
enum "dot3-mau-type-10-base-fb" {
value 7;
}
enum "dot3-mau-type-10-base-fl" {
value 8;
}
enum "dot3-mau-type-10-broad36" {
value 9;
}
enum "dot3-mau-type-10-base-thd" {
value 10;
}
enum "dot3-mau-type-10-base-tfd" {
value 11;
}
enum "dot3-mau-type-10-base-flhd" {
value 12;
}
enum "dot3-mau-type-10-base-flfd" {
value 13;
}
enum "dot3-mau-type-100-base-t4" {
value 14;
}
enum "dot3-mau-type-100-base-txhd" {
value 15;
}
enum "dot3-mau-type-100-base-txfd" {
value 16;
}
enum "dot3-mau-type-100-base-fxhd" {
value 17;
}
enum "dot3-mau-type-100-base-fxfd" {
value 18;
}
enum "dot3-mau-type-100-base-t2hd" {
value 19;
}
enum "dot3-mau-type-100-base-t2fd" {
value 20;
}
enum "dot3-mau-type-1000-base-xhd" {
value 21;
}
enum "dot3-mau-type-1000-base-xfd" {
value 22;
}
enum "dot3-mau-type-1000-base-lxhd" {
value 23;
}
enum "dot3-mau-type-1000-base-lxfd" {
value 24;
}
enum "dot3-mau-type-1000-base-sxhd" {
value 25;
}
enum "dot3-mau-type-1000-base-sxfd" {
value 26;
}
enum "dot3-mau-type-1000-base-cxhd" {
value 27;
}
enum "dot3-mau-type-1000-base-cxfd" {
value 28;
}
enum "dot3-mau-type-1000-base-thd" {
value 29;
}
enum "dot3-mau-type-1000-base-tfd" {
value 30;
}
enum "dot3-mau-type-10Gig-base-x" {
value 31;
}
enum "dot3-mau-type-10Gig-base-lx4" {
value 32;
}
enum "dot3-mau-type-10Gig-base-r" {
value 33;
}
enum "dot3-mau-type-10Gig-base-er" {
value 34;
}
enum "dot3-mau-type-10Gig-base-lr" {
value 35;
}
enum "dot3-mau-type-10Gig-base-sr" {
value 36;
}
enum "dot3-mau-type-10Gig-base-w" {
value 37;
}
enum "dot3-mau-type-10Gig-base-ew" {
value 38;
}
enum "dot3-mau-type-10Gig-base-lw" {
value 39;
}
enum "dot3-mau-type-10Gig-base-sw" {
value 40;
}
enum "dot3-mau-type-10Gig-base-cx4" {
value 41;
}
enum "dot3-mau-type-2-base-tl" {
value 42;
}
enum "dot3-mau-type-10-pass-ts" {
value 43;
}
enum "dot3-mau-type-100-base-bx10D" {
value 44;
}
enum "dot3-mau-type-100-base-bx10u" {
value 45;
}
enum "dot3-mau-type-100-base-lx10" {
value 46;
}
enum "dot3-mau-type-1000-base-bx10d" {
value 47;
}
enum "dot3-mau-type-1000-base-bx10u" {
value 48;
}
enum "dot3-mau-type-1000-base-lx10" {
value 49;
}
enum "dot3-mau-type-1000-base-px10d" {
value 50;
}
enum "dot3-mau-type-1000-base-px10u" {
value 51;
}
enum "dot3-mau-type-1000-base-px20d" {
value 52;
}
enum "dot3-mau-type-1000-base-px20u" {
value 53;
}
enum "invalid" {
value 54;
}
}
}
typedef supported-notsupported-enum {
type enumeration {
enum "not-supported" {
value 0;
}
enum "supported" {
value 1;
}
}
}
typedef lldp-port-class {
type enumeration {
enum "pd" {
value 0;
}
enum "pse" {
value 1;
}
}
}
typedef lldp-pair-control {
type enumeration {
enum "cannot" {
value 0;
}
enum "can" {
value 1;
}
}
}
typedef lldp-power-pair {
type enumeration {
enum "not-support" {
value 0;
}
enum "signal" {
value 1;
}
enum "spare" {
value 2;
}
enum "unknown" {
value 3;
}
}
}
typedef lldp-power-class {
type enumeration {
enum "not-support" {
value 0;
}
enum "class-0" {
value 1;
}
enum "class-1" {
value 2;
}
enum "class-2" {
value 3;
}
enum "class-3" {
value 4;
}
enum "class-4" {
value 5;
}
enum "unknown" {
value 6;
}
}
description
"Power class.";
}
grouping system-capability-group {
description
"group of LLDP system capability data.";
leaf capabilities {
type lldp-system-capability-bits;
description
"LLDP system capabilities.";
}
leaf capability-enabled {
type lldp-system-capability-bits;
description
"Enabled LLDP system capability.";
}
}
grouping management-address-group {
description
"group of LLDP management address data.";
leaf address {
type cienawstypes:string-maxl-256;
config false;
description
"Management address.";
}
leaf subtype {
type lldp-management-address-subtype;
config false;
description
"Management adress subtype.";
}
}
grouping management-address-interface-group {
description
"group of LLDP management address data.";
leaf interface-subtype {
type lldp-management-address-interface-subtype;
config false;
description
"Management address interface subtype.";
}
leaf oid-if-number {
type uint32;
config false;
description
"Management address interface OID interface number.";
}
leaf oid {
type cienawstypes:string-maxl-128;
config false;
description
"Management address interface OID.";
}
}
grouping port-id-group {
description
"group of port identification data.";
leaf id {
type cienawstypes:string-maxl-32;
config false;
description
"port identifier.";
}
leaf sub-type {
type lldp-port-id-sub-type;
config false;
description
"Port identificer sub-type.";
}
leaf descriptor {
type cienawstypes:string-maxl-256;
config false;
description
"Port descriptor";
}
}
container waveserver-lldp {
description
"Waveserver LLDP configuration and operational data.";
container chassis {
container state {
leaf admin-state {
type cienawstypes:enabled-disabled-enum;
description
"Administrative state of chassis level LLDP.";
}
leaf notification-interval {
type uint16 {
range "5 .. 32768";
}
description
"LLDP Notification interval.";
}
}
container id {
config false;
leaf chassis-id {
type chassis-id;
description
"Chassis ID.";
}
leaf chassis-id-subtype {
type chassis-id-subtype;
description
"Chassis Id subtype.";
}
leaf system-name {
type cienawstypes:string-maxl-256;
description
"System Name. Max string length of 255 characters.";
}
leaf system-description {
type cienawstypes:string-maxl-256;
description
"System escription. Max string length of 255 characters.";
}
}
leaf time-to-live {
type uint16;
config false;
description
"Time To Live.";
}
container system-capabilities {
config false;
description
"LLDP system capabilities.";
uses system-capability-group;
}
container local-management-address-table {
config false;
description
"LLDP local management address table.";
list address-table {
key "index";
config false;
max-elements "4";
leaf index {
type uint32;
description
"Unique id, read-only attribute.";
}
uses management-address-group;
uses management-address-interface-group;
}
}
container statistics {
config false;
leaf last-change {
type uint32;
description
"remote table last change in 1/100 seconds.";
}
leaf inserts {
type uint32;
description
"Inserts.";
}
leaf deletes {
type uint32;
description
"Deletes.";
}
leaf drops {
type uint32;
description
"Drops.";
}
leaf age-outs {
type uint32;
description
"Age outs.";
}
}
}
list port {
key "port-id";
leaf port-id {
type cienawstypes:port-name;
mandatory true;
description
"Port ID/name string.";
}
container properties {
description
"LLDP port level properties.";
leaf mode {
type enumeration {
enum "unknown" {
value 0;
}
enum "tx-only" {
value 1;
}
enum "snoop" {
value 2;
}
enum "tx-rx" {
value 3;
}
enum "disabled" {
value 4;
}
}
description
"LLDP port admin state";
}
leaf notification {
type cienawstypes:on-off-enum;
description
"Turn notification on or off";
}
}
container statistics {
config false;
description
"Port level statistics.";
leaf out-packets-total {
type uint32;
config false;
description
"Out packets.";
}
leaf in-packets-total {
type uint32;
config false;
description
"In packets";
}
leaf in-err-packets-discarded {
type uint32;
config false;
description
"Discarded in error packets";
}
leaf in-errored-tlv {
type uint32;
config false;
description
"In errored TLV";
}
leaf tlv-discarded {
type uint32;
config false;
description
"Discarded TLV.";
}
leaf unknown-tlv {
type uint32;
config false;
description
"Unknown TLV";
}
leaf aged-out-total {
type uint32;
config false;
description
"Aged out total.";
}
}
container local {
config false;
description
"Port LLDP local data.";
container id {
description
"LLDP port identification.";
uses port-id-group;
}
container specification-802-3 {
config false;
description
"LLDP Specification 802.3.";
container mac-physical-config {
config false;
description
"Mac physical configuration.";
leaf auto-negotiation-support {
type supported-notsupported-enum;
description
"Auto-negotiation support.";
}
leaf auto-negotiation-status {
type cienawstypes:enabled-disabled-enum;
description
"Auto-negotiation status.";
}
leaf pmd-auto-negotiation-advertised-capability {
type lldp-auto-neg-capability;
description
"PMD Auto-negotiation advertised capability.";
}
leaf operational-mau-type {
type lldp-operational-mau-type;
description
"Operational MAU type.";
}
}
container power-via-mdi {
config false;
description
"Power Via MDI.";
leaf port-class {
type lldp-port-class;
description
"Port class";
}
leaf mdi {
type supported-notsupported-enum;
description
"mdi";
}
leaf mdi-power-support {
type cienawstypes:enabled-disabled-enum;
description
"MDI power support.";
}
leaf pair-control {
type lldp-pair-control;
description
"Pair control.";
}
leaf power-pair {
type lldp-power-pair;
description
"Power pair.";
}
leaf power-class {
type lldp-power-class;
description
"Power class.";
}
}
leaf max-frame-size {
type uint16;
description
"Maximum frame size.";
}
}
list local-management-address-table {
key "index";
config false;
max-elements "4";
leaf index {
type uint32;
description
"Unique id, read-only attribute.";
}
uses management-address-group;
uses management-address-interface-group;
}
}
container remote {
config false;
description
"LLDP port level remote data.";
container chassis {
config false;
container chassis-id {
leaf chassis-id {
type chassis-id;
description
"Chassis ID. Read only attribute.";
}
leaf chassis-id-subtype {
type chassis-id-subtype;
description
"Chassis Id subtype.";
}
leaf system-name {
type cienawstypes:string-maxl-256;
description
"System Name. Max string length of 255 characters.";
}
leaf system-description {
type cienawstypes:string-maxl-256;
description
"System escription. Max string length of 255 characters.";
}
}
leaf time-to-live {
type uint16;
config false;
description
"Time to live.";
}
container system-capabilities {
config false;
uses system-capability-group;
}
list management-address-table {
key "index";
config false;
max-elements "4";
leaf index {
type uint32;
description
"Unique id, read-only attribute.";
}
uses management-address-group;
uses management-address-interface-group;
}
}
container port {
config false;
container id {
config false;
description
"LLDP port identification.";
uses port-id-group;
}
container specification-802-3 {
config false;
description
"LLDP Specification 802.3.";
container mac-physical-config {
config false;
description
"Mac physical configuration.";
leaf auto-negotiation-support {
type supported-notsupported-enum;
description
"Auto-negotiation support.";
}
leaf auto-negotiation-status {
type cienawstypes:enabled-disabled-enum;
description
"Auto-negotiation status.";
}
leaf pmd-auto-negotiation-advertised-capability {
type lldp-auto-neg-capability;
description
"PMD Auto-negotiation advertised capability.";
}
leaf operational-mau-type {
type lldp-operational-mau-type;
description
"Operational MAU type.";
}
}
container power-via-mdi {
config false;
description
"Power Via MDI.";
leaf port-class {
type lldp-port-class;
description
"Port class";
}
leaf mdi {
type supported-notsupported-enum;
description
"mdi";
}
leaf mdi-power-support {
type cienawstypes:enabled-disabled-enum;
description
"MDI power support.";
}
leaf pair-control {
type lldp-pair-control;
description
"Pair control.";
}
leaf power-pair {
type lldp-power-pair;
description
"Power pair.";
}
leaf power-class {
type lldp-power-class;
description
"Power class.";
}
}
leaf max-frame-size {
type uint16;
description
"Maximum frame size.";
}
}
list organization-definition-information-table {
key "index";
config false;
description
"Remote organization definition information table.";
leaf index {
type uint32;
description
"Unique id, read-only attribute.";
}
leaf oui {
type cienawstypes:string-maxl-16;
description
"OUI.";
}
leaf subtype {
type uint8;
description
"Sub-Type.";
}
leaf information {
type cienawstypes:string-maxl-256;
description
"Information.";
}
}
list unrecognized-tlv-table {
key "index";
config false;
description
"Remote unrecognized TLV table.";
leaf index {
type uint32;
description
"Unique id, read-only attribute.";
}
leaf type {
type uint8;
description
"Type.";
}
leaf length {
type uint32;
description
"Length.";
}
leaf value {
type cienawstypes:string-maxl-256;
description
"Value.";
}
}
}
}
}
}
rpc waveserver-lldp-clear-statistics {
description
"Clear the LLDP statistics.";
output {
leaf return-code {
type uint32;
description
"return code: 0 is success; non-zero is failure";
}
}
}
rpc waveserver-lldp-clear-port-statistics {
description
"Clear the LLDP statistics for the specified port.";
input {
leaf port-id {
type cienawstypes:port-name;
mandatory true;
description
"The port ID/name string.";
}
}
output {
leaf return-code {
type uint32;
description
"return code: 0 is success; non-zero is failure";
}
}
}
}
| YANG | 5 | meodaiduoi/onos | models/ciena/waveserverai/src/main/yang/[email protected] | [
"Apache-2.0"
] |
#Signature file v4.1
#Version 1.58
CLSS public java.beans.FeatureDescriptor
cons public init()
meth public boolean isExpert()
meth public boolean isHidden()
meth public boolean isPreferred()
meth public java.lang.Object getValue(java.lang.String)
meth public java.lang.String getDisplayName()
meth public java.lang.String getName()
meth public java.lang.String getShortDescription()
meth public java.lang.String toString()
meth public java.util.Enumeration<java.lang.String> attributeNames()
meth public void setDisplayName(java.lang.String)
meth public void setExpert(boolean)
meth public void setHidden(boolean)
meth public void setName(java.lang.String)
meth public void setPreferred(boolean)
meth public void setShortDescription(java.lang.String)
meth public void setValue(java.lang.String,java.lang.Object)
supr java.lang.Object
CLSS public java.lang.Object
cons public init()
meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth protected void finalize() throws java.lang.Throwable
meth public boolean equals(java.lang.Object)
meth public final java.lang.Class<?> getClass()
meth public final void notify()
meth public final void notifyAll()
meth public final void wait() throws java.lang.InterruptedException
meth public final void wait(long) throws java.lang.InterruptedException
meth public final void wait(long,int) throws java.lang.InterruptedException
meth public int hashCode()
meth public java.lang.String toString()
CLSS public abstract interface org.netbeans.api.xml.cookies.CheckXMLCookie
intf org.openide.nodes.Node$Cookie
meth public abstract boolean checkXML(org.netbeans.api.xml.cookies.CookieObserver)
CLSS public final org.netbeans.api.xml.cookies.CookieMessage
cons public init(java.lang.String)
cons public init(java.lang.String,int)
cons public init(java.lang.String,int,java.lang.Object)
cons public init(java.lang.String,int,org.openide.util.Lookup)
cons public init(java.lang.String,java.lang.Object)
fld public final static int ERROR_LEVEL = 2
fld public final static int FATAL_ERROR_LEVEL = 3
fld public final static int INFORMATIONAL_LEVEL = 0
fld public final static int WARNING_LEVEL = 1
meth public <%0 extends java.lang.Object> {%%0} getDetail(java.lang.Class<{%%0}>)
meth public final int getLevel()
meth public java.lang.String getMessage()
meth public org.openide.util.Lookup getDetails()
supr java.lang.Object
hfds details,level,message
CLSS public abstract interface org.netbeans.api.xml.cookies.CookieObserver
meth public abstract void receive(org.netbeans.api.xml.cookies.CookieMessage)
CLSS public abstract interface org.netbeans.api.xml.cookies.TransformableCookie
intf org.openide.nodes.Node$Cookie
meth public abstract void transform(javax.xml.transform.Source,javax.xml.transform.Result,org.netbeans.api.xml.cookies.CookieObserver) throws javax.xml.transform.TransformerException
CLSS public abstract interface org.netbeans.api.xml.cookies.ValidateXMLCookie
intf org.openide.nodes.Node$Cookie
meth public abstract boolean validateXML(org.netbeans.api.xml.cookies.CookieObserver)
CLSS public abstract org.netbeans.api.xml.cookies.XMLProcessorDetail
cons public init()
meth public abstract int getColumnNumber()
meth public abstract int getLineNumber()
meth public abstract java.lang.Exception getException()
meth public abstract java.lang.String getPublicId()
meth public abstract java.lang.String getSystemId()
supr java.lang.Object
CLSS public org.netbeans.spi.xml.cookies.CheckXMLSupport
cons public init(org.xml.sax.InputSource)
cons public init(org.xml.sax.InputSource,int)
fld public final static int CHECK_ENTITY_MODE = 1
fld public final static int CHECK_PARAMETER_ENTITY_MODE = 2
fld public final static int DOCUMENT_MODE = 3
intf org.netbeans.api.xml.cookies.CheckXMLCookie
meth protected org.xml.sax.EntityResolver createEntityResolver()
meth protected org.xml.sax.InputSource createInputSource() throws java.io.IOException
meth protected org.xml.sax.XMLReader createParser(boolean)
meth public boolean checkXML(org.netbeans.api.xml.cookies.CookieObserver)
supr java.lang.Object
CLSS public final org.netbeans.spi.xml.cookies.DataObjectAdapters
meth public static javax.xml.transform.Source source(org.openide.loaders.DataObject)
meth public static org.xml.sax.InputSource inputSource(org.openide.loaders.DataObject)
supr java.lang.Object
hfds SAX_FEATURES_NAMESPACES,saxParserFactory
hcls DataObjectInputSource,DataObjectSAXSource
CLSS public org.netbeans.spi.xml.cookies.DefaultXMLProcessorDetail
cons public init(javax.xml.transform.TransformerException)
cons public init(org.xml.sax.SAXParseException)
meth public int getColumnNumber()
meth public int getLineNumber()
meth public java.lang.Exception getException()
meth public java.lang.String getPublicId()
meth public java.lang.String getSystemId()
supr org.netbeans.api.xml.cookies.XMLProcessorDetail
hfds columnNumber,exception,lineNumber,publicId,systemId
CLSS public final org.netbeans.spi.xml.cookies.TransformableSupport
cons public init(javax.xml.transform.Source)
intf org.netbeans.api.xml.cookies.TransformableCookie
meth public void transform(javax.xml.transform.Source,javax.xml.transform.Result,org.netbeans.api.xml.cookies.CookieObserver) throws javax.xml.transform.TransformerException
supr java.lang.Object
hfds source,transformerFactory
hcls ExceptionWriter,Proxy
CLSS public org.netbeans.spi.xml.cookies.ValidateXMLSupport
cons public init(org.xml.sax.InputSource)
intf org.netbeans.api.xml.cookies.ValidateXMLCookie
meth protected org.xml.sax.EntityResolver createEntityResolver()
meth protected org.xml.sax.InputSource createInputSource() throws java.io.IOException
meth protected org.xml.sax.XMLReader createParser(boolean)
meth public boolean validateXML(org.netbeans.api.xml.cookies.CookieObserver)
supr java.lang.Object
CLSS public abstract org.openide.nodes.Node
cons protected init(org.openide.nodes.Children)
cons protected init(org.openide.nodes.Children,org.openide.util.Lookup)
fld public final static java.lang.String PROP_COOKIE = "cookie"
fld public final static java.lang.String PROP_DISPLAY_NAME = "displayName"
fld public final static java.lang.String PROP_ICON = "icon"
fld public final static java.lang.String PROP_LEAF = "leaf"
fld public final static java.lang.String PROP_NAME = "name"
fld public final static java.lang.String PROP_OPENED_ICON = "openedIcon"
fld public final static java.lang.String PROP_PARENT_NODE = "parentNode"
fld public final static java.lang.String PROP_PROPERTY_SETS = "propertySets"
fld public final static java.lang.String PROP_SHORT_DESCRIPTION = "shortDescription"
fld public final static org.openide.nodes.Node EMPTY
innr public abstract interface static Cookie
innr public abstract interface static Handle
innr public abstract static IndexedProperty
innr public abstract static Property
innr public abstract static PropertySet
intf org.openide.util.HelpCtx$Provider
intf org.openide.util.Lookup$Provider
meth protected final boolean hasPropertyChangeListener()
meth protected final void fireCookieChange()
meth protected final void fireDisplayNameChange(java.lang.String,java.lang.String)
meth protected final void fireIconChange()
meth protected final void fireNameChange(java.lang.String,java.lang.String)
meth protected final void fireNodeDestroyed()
meth protected final void fireOpenedIconChange()
meth protected final void firePropertyChange(java.lang.String,java.lang.Object,java.lang.Object)
meth protected final void firePropertySetsChange(org.openide.nodes.Node$PropertySet[],org.openide.nodes.Node$PropertySet[])
meth protected final void fireShortDescriptionChange(java.lang.String,java.lang.String)
meth protected final void setChildren(org.openide.nodes.Children)
meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth public <%0 extends org.openide.nodes.Node$Cookie> {%%0} getCookie(java.lang.Class<{%%0}>)
meth public abstract boolean canCopy()
meth public abstract boolean canCut()
meth public abstract boolean canDestroy()
meth public abstract boolean canRename()
meth public abstract boolean hasCustomizer()
meth public abstract java.awt.Component getCustomizer()
meth public abstract java.awt.Image getIcon(int)
meth public abstract java.awt.Image getOpenedIcon(int)
meth public abstract java.awt.datatransfer.Transferable clipboardCopy() throws java.io.IOException
meth public abstract java.awt.datatransfer.Transferable clipboardCut() throws java.io.IOException
meth public abstract java.awt.datatransfer.Transferable drag() throws java.io.IOException
meth public abstract org.openide.nodes.Node cloneNode()
meth public abstract org.openide.nodes.Node$Handle getHandle()
meth public abstract org.openide.nodes.Node$PropertySet[] getPropertySets()
meth public abstract org.openide.util.HelpCtx getHelpCtx()
meth public abstract org.openide.util.datatransfer.NewType[] getNewTypes()
meth public abstract org.openide.util.datatransfer.PasteType getDropType(java.awt.datatransfer.Transferable,int,int)
meth public abstract org.openide.util.datatransfer.PasteType[] getPasteTypes(java.awt.datatransfer.Transferable)
meth public boolean equals(java.lang.Object)
meth public final boolean isLeaf()
meth public final javax.swing.JPopupMenu getContextMenu()
meth public final org.openide.nodes.Children getChildren()
meth public final org.openide.nodes.Node getParentNode()
meth public final org.openide.util.Lookup getLookup()
meth public final void addNodeListener(org.openide.nodes.NodeListener)
meth public final void addPropertyChangeListener(java.beans.PropertyChangeListener)
meth public final void removeNodeListener(org.openide.nodes.NodeListener)
meth public final void removePropertyChangeListener(java.beans.PropertyChangeListener)
meth public int hashCode()
meth public java.lang.String getHtmlDisplayName()
meth public java.lang.String toString()
meth public javax.swing.Action getPreferredAction()
meth public javax.swing.Action[] getActions(boolean)
meth public org.openide.util.actions.SystemAction getDefaultAction()
anno 0 java.lang.Deprecated()
meth public org.openide.util.actions.SystemAction[] getActions()
anno 0 java.lang.Deprecated()
meth public org.openide.util.actions.SystemAction[] getContextActions()
anno 0 java.lang.Deprecated()
meth public void destroy() throws java.io.IOException
meth public void setDisplayName(java.lang.String)
meth public void setHidden(boolean)
anno 0 java.lang.Deprecated()
meth public void setName(java.lang.String)
meth public void setShortDescription(java.lang.String)
supr java.beans.FeatureDescriptor
hfds BLOCK_EVENTS,INIT_LOCK,LOCK,TEMPL_COOKIE,err,hierarchy,listeners,lookups,parent,warnedBadProperties
hcls LookupEventList,PropertyEditorRef
CLSS public abstract interface static org.openide.nodes.Node$Cookie
outer org.openide.nodes.Node
CLSS public final org.openide.util.HelpCtx
cons public init(java.lang.Class<?>)
anno 0 java.lang.Deprecated()
cons public init(java.lang.String)
cons public init(java.net.URL)
anno 0 java.lang.Deprecated()
fld public final static org.openide.util.HelpCtx DEFAULT_HELP
innr public abstract interface static Displayer
innr public abstract interface static Provider
meth public boolean display()
meth public boolean equals(java.lang.Object)
meth public int hashCode()
meth public java.lang.String getHelpID()
meth public java.lang.String toString()
meth public java.net.URL getHelp()
meth public static org.openide.util.HelpCtx findHelp(java.awt.Component)
meth public static org.openide.util.HelpCtx findHelp(java.lang.Object)
meth public static void setHelpIDString(javax.swing.JComponent,java.lang.String)
supr java.lang.Object
hfds err,helpCtx,helpID
CLSS public abstract interface static org.openide.util.HelpCtx$Provider
outer org.openide.util.HelpCtx
meth public abstract org.openide.util.HelpCtx getHelpCtx()
CLSS public abstract org.openide.util.Lookup
cons public init()
fld public final static org.openide.util.Lookup EMPTY
innr public abstract interface static Provider
innr public abstract static Item
innr public abstract static Result
innr public final static Template
meth public <%0 extends java.lang.Object> java.util.Collection<? extends {%%0}> lookupAll(java.lang.Class<{%%0}>)
meth public <%0 extends java.lang.Object> org.openide.util.Lookup$Item<{%%0}> lookupItem(org.openide.util.Lookup$Template<{%%0}>)
meth public <%0 extends java.lang.Object> org.openide.util.Lookup$Result<{%%0}> lookupResult(java.lang.Class<{%%0}>)
meth public abstract <%0 extends java.lang.Object> org.openide.util.Lookup$Result<{%%0}> lookup(org.openide.util.Lookup$Template<{%%0}>)
meth public abstract <%0 extends java.lang.Object> {%%0} lookup(java.lang.Class<{%%0}>)
meth public static org.openide.util.Lookup getDefault()
supr java.lang.Object
hfds LOG,defaultLookup,defaultLookupProvider
hcls DefLookup,Empty
CLSS public abstract interface static org.openide.util.Lookup$Provider
outer org.openide.util.Lookup
meth public abstract org.openide.util.Lookup getLookup()
| Standard ML | 2 | timfel/netbeans | ide/api.xml.ui/nbproject/org-netbeans-api-xml-ui.sig | [
"Apache-2.0"
] |
; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.
%ifdef BORINGSSL_PREFIX
%include "boringssl_prefix_symbols_nasm.inc"
%endif
%ifidn __OUTPUT_FORMAT__,obj
section code use32 class=code align=64
%elifidn __OUTPUT_FORMAT__,win32
[email protected] equ 1
section .text code align=64
%else
section .text code
%endif
global _md5_block_asm_data_order
align 16
_md5_block_asm_data_order:
L$_md5_block_asm_data_order_begin:
push esi
push edi
mov edi,DWORD [12+esp]
mov esi,DWORD [16+esp]
mov ecx,DWORD [20+esp]
push ebp
shl ecx,6
push ebx
add ecx,esi
sub ecx,64
mov eax,DWORD [edi]
push ecx
mov ebx,DWORD [4+edi]
mov ecx,DWORD [8+edi]
mov edx,DWORD [12+edi]
L$000start:
;
; R0 section
mov edi,ecx
mov ebp,DWORD [esi]
; R0 0
xor edi,edx
and edi,ebx
lea eax,[3614090360+ebp*1+eax]
xor edi,edx
add eax,edi
mov edi,ebx
rol eax,7
mov ebp,DWORD [4+esi]
add eax,ebx
; R0 1
xor edi,ecx
and edi,eax
lea edx,[3905402710+ebp*1+edx]
xor edi,ecx
add edx,edi
mov edi,eax
rol edx,12
mov ebp,DWORD [8+esi]
add edx,eax
; R0 2
xor edi,ebx
and edi,edx
lea ecx,[606105819+ebp*1+ecx]
xor edi,ebx
add ecx,edi
mov edi,edx
rol ecx,17
mov ebp,DWORD [12+esi]
add ecx,edx
; R0 3
xor edi,eax
and edi,ecx
lea ebx,[3250441966+ebp*1+ebx]
xor edi,eax
add ebx,edi
mov edi,ecx
rol ebx,22
mov ebp,DWORD [16+esi]
add ebx,ecx
; R0 4
xor edi,edx
and edi,ebx
lea eax,[4118548399+ebp*1+eax]
xor edi,edx
add eax,edi
mov edi,ebx
rol eax,7
mov ebp,DWORD [20+esi]
add eax,ebx
; R0 5
xor edi,ecx
and edi,eax
lea edx,[1200080426+ebp*1+edx]
xor edi,ecx
add edx,edi
mov edi,eax
rol edx,12
mov ebp,DWORD [24+esi]
add edx,eax
; R0 6
xor edi,ebx
and edi,edx
lea ecx,[2821735955+ebp*1+ecx]
xor edi,ebx
add ecx,edi
mov edi,edx
rol ecx,17
mov ebp,DWORD [28+esi]
add ecx,edx
; R0 7
xor edi,eax
and edi,ecx
lea ebx,[4249261313+ebp*1+ebx]
xor edi,eax
add ebx,edi
mov edi,ecx
rol ebx,22
mov ebp,DWORD [32+esi]
add ebx,ecx
; R0 8
xor edi,edx
and edi,ebx
lea eax,[1770035416+ebp*1+eax]
xor edi,edx
add eax,edi
mov edi,ebx
rol eax,7
mov ebp,DWORD [36+esi]
add eax,ebx
; R0 9
xor edi,ecx
and edi,eax
lea edx,[2336552879+ebp*1+edx]
xor edi,ecx
add edx,edi
mov edi,eax
rol edx,12
mov ebp,DWORD [40+esi]
add edx,eax
; R0 10
xor edi,ebx
and edi,edx
lea ecx,[4294925233+ebp*1+ecx]
xor edi,ebx
add ecx,edi
mov edi,edx
rol ecx,17
mov ebp,DWORD [44+esi]
add ecx,edx
; R0 11
xor edi,eax
and edi,ecx
lea ebx,[2304563134+ebp*1+ebx]
xor edi,eax
add ebx,edi
mov edi,ecx
rol ebx,22
mov ebp,DWORD [48+esi]
add ebx,ecx
; R0 12
xor edi,edx
and edi,ebx
lea eax,[1804603682+ebp*1+eax]
xor edi,edx
add eax,edi
mov edi,ebx
rol eax,7
mov ebp,DWORD [52+esi]
add eax,ebx
; R0 13
xor edi,ecx
and edi,eax
lea edx,[4254626195+ebp*1+edx]
xor edi,ecx
add edx,edi
mov edi,eax
rol edx,12
mov ebp,DWORD [56+esi]
add edx,eax
; R0 14
xor edi,ebx
and edi,edx
lea ecx,[2792965006+ebp*1+ecx]
xor edi,ebx
add ecx,edi
mov edi,edx
rol ecx,17
mov ebp,DWORD [60+esi]
add ecx,edx
; R0 15
xor edi,eax
and edi,ecx
lea ebx,[1236535329+ebp*1+ebx]
xor edi,eax
add ebx,edi
mov edi,ecx
rol ebx,22
mov ebp,DWORD [4+esi]
add ebx,ecx
;
; R1 section
; R1 16
lea eax,[4129170786+ebp*1+eax]
xor edi,ebx
and edi,edx
mov ebp,DWORD [24+esi]
xor edi,ecx
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 17
lea edx,[3225465664+ebp*1+edx]
xor edi,eax
and edi,ecx
mov ebp,DWORD [44+esi]
xor edi,ebx
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 18
lea ecx,[643717713+ebp*1+ecx]
xor edi,edx
and edi,ebx
mov ebp,DWORD [esi]
xor edi,eax
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 19
lea ebx,[3921069994+ebp*1+ebx]
xor edi,ecx
and edi,eax
mov ebp,DWORD [20+esi]
xor edi,edx
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 20
lea eax,[3593408605+ebp*1+eax]
xor edi,ebx
and edi,edx
mov ebp,DWORD [40+esi]
xor edi,ecx
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 21
lea edx,[38016083+ebp*1+edx]
xor edi,eax
and edi,ecx
mov ebp,DWORD [60+esi]
xor edi,ebx
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 22
lea ecx,[3634488961+ebp*1+ecx]
xor edi,edx
and edi,ebx
mov ebp,DWORD [16+esi]
xor edi,eax
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 23
lea ebx,[3889429448+ebp*1+ebx]
xor edi,ecx
and edi,eax
mov ebp,DWORD [36+esi]
xor edi,edx
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 24
lea eax,[568446438+ebp*1+eax]
xor edi,ebx
and edi,edx
mov ebp,DWORD [56+esi]
xor edi,ecx
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 25
lea edx,[3275163606+ebp*1+edx]
xor edi,eax
and edi,ecx
mov ebp,DWORD [12+esi]
xor edi,ebx
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 26
lea ecx,[4107603335+ebp*1+ecx]
xor edi,edx
and edi,ebx
mov ebp,DWORD [32+esi]
xor edi,eax
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 27
lea ebx,[1163531501+ebp*1+ebx]
xor edi,ecx
and edi,eax
mov ebp,DWORD [52+esi]
xor edi,edx
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 28
lea eax,[2850285829+ebp*1+eax]
xor edi,ebx
and edi,edx
mov ebp,DWORD [8+esi]
xor edi,ecx
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 29
lea edx,[4243563512+ebp*1+edx]
xor edi,eax
and edi,ecx
mov ebp,DWORD [28+esi]
xor edi,ebx
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 30
lea ecx,[1735328473+ebp*1+ecx]
xor edi,edx
and edi,ebx
mov ebp,DWORD [48+esi]
xor edi,eax
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 31
lea ebx,[2368359562+ebp*1+ebx]
xor edi,ecx
and edi,eax
mov ebp,DWORD [20+esi]
xor edi,edx
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
;
; R2 section
; R2 32
xor edi,edx
xor edi,ebx
lea eax,[4294588738+ebp*1+eax]
add eax,edi
rol eax,4
mov ebp,DWORD [32+esi]
mov edi,ebx
; R2 33
lea edx,[2272392833+ebp*1+edx]
add eax,ebx
xor edi,ecx
xor edi,eax
mov ebp,DWORD [44+esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 34
xor edi,ebx
xor edi,edx
lea ecx,[1839030562+ebp*1+ecx]
add ecx,edi
rol ecx,16
mov ebp,DWORD [56+esi]
mov edi,edx
; R2 35
lea ebx,[4259657740+ebp*1+ebx]
add ecx,edx
xor edi,eax
xor edi,ecx
mov ebp,DWORD [4+esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 36
xor edi,edx
xor edi,ebx
lea eax,[2763975236+ebp*1+eax]
add eax,edi
rol eax,4
mov ebp,DWORD [16+esi]
mov edi,ebx
; R2 37
lea edx,[1272893353+ebp*1+edx]
add eax,ebx
xor edi,ecx
xor edi,eax
mov ebp,DWORD [28+esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 38
xor edi,ebx
xor edi,edx
lea ecx,[4139469664+ebp*1+ecx]
add ecx,edi
rol ecx,16
mov ebp,DWORD [40+esi]
mov edi,edx
; R2 39
lea ebx,[3200236656+ebp*1+ebx]
add ecx,edx
xor edi,eax
xor edi,ecx
mov ebp,DWORD [52+esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 40
xor edi,edx
xor edi,ebx
lea eax,[681279174+ebp*1+eax]
add eax,edi
rol eax,4
mov ebp,DWORD [esi]
mov edi,ebx
; R2 41
lea edx,[3936430074+ebp*1+edx]
add eax,ebx
xor edi,ecx
xor edi,eax
mov ebp,DWORD [12+esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 42
xor edi,ebx
xor edi,edx
lea ecx,[3572445317+ebp*1+ecx]
add ecx,edi
rol ecx,16
mov ebp,DWORD [24+esi]
mov edi,edx
; R2 43
lea ebx,[76029189+ebp*1+ebx]
add ecx,edx
xor edi,eax
xor edi,ecx
mov ebp,DWORD [36+esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 44
xor edi,edx
xor edi,ebx
lea eax,[3654602809+ebp*1+eax]
add eax,edi
rol eax,4
mov ebp,DWORD [48+esi]
mov edi,ebx
; R2 45
lea edx,[3873151461+ebp*1+edx]
add eax,ebx
xor edi,ecx
xor edi,eax
mov ebp,DWORD [60+esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 46
xor edi,ebx
xor edi,edx
lea ecx,[530742520+ebp*1+ecx]
add ecx,edi
rol ecx,16
mov ebp,DWORD [8+esi]
mov edi,edx
; R2 47
lea ebx,[3299628645+ebp*1+ebx]
add ecx,edx
xor edi,eax
xor edi,ecx
mov ebp,DWORD [esi]
add ebx,edi
mov edi,-1
rol ebx,23
add ebx,ecx
;
; R3 section
; R3 48
xor edi,edx
or edi,ebx
lea eax,[4096336452+ebp*1+eax]
xor edi,ecx
mov ebp,DWORD [28+esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 49
or edi,eax
lea edx,[1126891415+ebp*1+edx]
xor edi,ebx
mov ebp,DWORD [56+esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 50
or edi,edx
lea ecx,[2878612391+ebp*1+ecx]
xor edi,eax
mov ebp,DWORD [20+esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 51
or edi,ecx
lea ebx,[4237533241+ebp*1+ebx]
xor edi,edx
mov ebp,DWORD [48+esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 52
or edi,ebx
lea eax,[1700485571+ebp*1+eax]
xor edi,ecx
mov ebp,DWORD [12+esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 53
or edi,eax
lea edx,[2399980690+ebp*1+edx]
xor edi,ebx
mov ebp,DWORD [40+esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 54
or edi,edx
lea ecx,[4293915773+ebp*1+ecx]
xor edi,eax
mov ebp,DWORD [4+esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 55
or edi,ecx
lea ebx,[2240044497+ebp*1+ebx]
xor edi,edx
mov ebp,DWORD [32+esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 56
or edi,ebx
lea eax,[1873313359+ebp*1+eax]
xor edi,ecx
mov ebp,DWORD [60+esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 57
or edi,eax
lea edx,[4264355552+ebp*1+edx]
xor edi,ebx
mov ebp,DWORD [24+esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 58
or edi,edx
lea ecx,[2734768916+ebp*1+ecx]
xor edi,eax
mov ebp,DWORD [52+esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 59
or edi,ecx
lea ebx,[1309151649+ebp*1+ebx]
xor edi,edx
mov ebp,DWORD [16+esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 60
or edi,ebx
lea eax,[4149444226+ebp*1+eax]
xor edi,ecx
mov ebp,DWORD [44+esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 61
or edi,eax
lea edx,[3174756917+ebp*1+edx]
xor edi,ebx
mov ebp,DWORD [8+esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 62
or edi,edx
lea ecx,[718787259+ebp*1+ecx]
xor edi,eax
mov ebp,DWORD [36+esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 63
or edi,ecx
lea ebx,[3951481745+ebp*1+ebx]
xor edi,edx
mov ebp,DWORD [24+esp]
add ebx,edi
add esi,64
rol ebx,21
mov edi,DWORD [ebp]
add ebx,ecx
add eax,edi
mov edi,DWORD [4+ebp]
add ebx,edi
mov edi,DWORD [8+ebp]
add ecx,edi
mov edi,DWORD [12+ebp]
add edx,edi
mov DWORD [ebp],eax
mov DWORD [4+ebp],ebx
mov edi,DWORD [esp]
mov DWORD [8+ebp],ecx
mov DWORD [12+ebp],edx
cmp edi,esi
jae NEAR L$000start
pop eax
pop ebx
pop ebp
pop edi
pop esi
ret
| Assembly | 3 | zealoussnow/chromium | third_party/boringssl/win-x86/crypto/fipsmodule/md5-586.asm | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] |
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/osr/osr_view_proxy.h"
#include <memory>
namespace electron {
OffscreenViewProxy::OffscreenViewProxy(views::View* view) : view_(view) {
view_bitmap_ = std::make_unique<SkBitmap>();
}
OffscreenViewProxy::~OffscreenViewProxy() {
if (observer_) {
observer_->ProxyViewDestroyed(this);
}
}
void OffscreenViewProxy::SetObserver(OffscreenViewProxyObserver* observer) {
if (observer_) {
observer_->ProxyViewDestroyed(this);
}
observer_ = observer;
}
void OffscreenViewProxy::RemoveObserver() {
observer_ = nullptr;
}
const SkBitmap* OffscreenViewProxy::GetBitmap() const {
return view_bitmap_.get();
}
void OffscreenViewProxy::SetBitmap(const SkBitmap& bitmap) {
if (view_bounds_.width() == bitmap.width() &&
view_bounds_.height() == bitmap.height() && observer_) {
view_bitmap_ = std::make_unique<SkBitmap>(bitmap);
observer_->OnProxyViewPaint(view_bounds_);
}
}
const gfx::Rect& OffscreenViewProxy::GetBounds() {
return view_bounds_;
}
void OffscreenViewProxy::SetBounds(const gfx::Rect& bounds) {
view_bounds_ = bounds;
}
void OffscreenViewProxy::OnEvent(ui::Event* event) {
if (view_) {
view_->OnEvent(event);
}
}
} // namespace electron
| C++ | 4 | lingxiao-Zhu/electron | shell/browser/osr/osr_view_proxy.cc | [
"MIT"
] |
{#ASda}
========
Evaluation
----------
Evaluation
==========
LiquidHaskell Is For Real
-------------------------
<div class="hidden">
\begin{code}
main = putStrLn "Easter Egg: to force Makefile"
\end{code}
</div>
<br>
**Substantial Code Bases**
10KLoc, 50+ Modules
<br>
**Complex Properties**
Memory Safety, Functional Correctness*, Termination
<br>
<div class="fragment">
**Inference is Crucial**
</div>
Numbers
-------
<div align="center">
**Library** **LOC**
--------------------------- ---------
`Data.List` 814
`Data.Set.Splay` 149
`Data.Vector.Algorithms` 1219
`HsColour` 1047
`Data.Map.Base` 1396
`Data.Text` 3125
`Data.Bytestring` 3501
**Total** **11251**
--------------------------- ---------
</div>
Numbers
-------
<div align="center">
**Library** **LOC** **Time**
--------------------------- --------- ----------
`Data.List` 814 26s
`Data.Set.Splay` 149 27s
`Data.Vector.Algorithms` 1219 89s
`HsColour` 1047 196s
`Data.Map.Base` 1396 174s
`Data.Text` 3125 499s
`Data.Bytestring` 3501 294s
**Total** **11251** **1305s**
--------------------------- --------- ----------
</div>
Recap
-----
1. Refinements: Types + Predicates
2. Subtyping: SMT Implication
3. Measures: Strengthened Constructors
4. Abstract: Refinements over functions and data
5. **Evaluation**
5. <div class="fragment"><a href="12_Conclusion.lhs.slides.html" target="_blank">Conclusion</a></div>
<br>
<br>
<div class="fragment">[[continue...]](12_Conclusion.lhs.slides.html)</div>
| Literate Haskell | 0 | curiousleo/liquidhaskell | docs/slides/ETH14/lhs/11_Evaluation.lhs | [
"MIT",
"BSD-3-Clause"
] |
namespace Alive
{
/**
A Panel with the same height as the floating button of a [Drawer](api:alive/drawer).
*/
public partial class DrawerButtonBackground {}
}
| Uno | 3 | helilabs/fuselibs | Source/Fuse.UXKits.Alive/Docs/DrawerButtonBackground.ux.uno | [
"MIT"
] |
role q {
token stopper { \' }
token escape:sym<\\> { <sym> <item=.backslash> }
token backslash:sym<qq> { <?before 'q'> <quote=.LANG('MAIN','quote')> }
token backslash:sym<\\> { <text=.sym> }
token backslash:sym<stopper> { <text=.stopper> }
token backslash:sym<miscq> { {} . }
method tweak_q($v) { self.panic("Too late for :q") }
method tweak_qq($v) { self.panic("Too late for :qq") }
}
role qq does b1 does c1 does s1 does a1 does h1 does f1 {
token stopper { \" }
token backslash:sym<unrec> { {} (\w) { self.throw_unrecog_backslash_seq: $/[0].Str } }
token backslash:sym<misc> { \W }
method tweak_q($v) { self.panic("Too late for :q") }
method tweak_qq($v) { self.panic("Too late for :qq") }
}
| Perl6 | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/Perl 6/RoleQ.pm6 | [
"MIT"
] |
// MIR for `main` after Inline
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/inline-options.rs:8:11: 8:11
let _1: (); // in scope 0 at $DIR/inline-options.rs:9:5: 9:18
let _2: (); // in scope 0 at $DIR/inline-options.rs:10:5: 10:21
scope 1 (inlined inlined::<u32>) { // at $DIR/inline-options.rs:10:5: 10:21
let _3: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21
let _4: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21
let _5: (); // in scope 1 at $DIR/inline-options.rs:10:5: 10:21
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/inline-options.rs:9:5: 9:18
_1 = not_inlined() -> bb1; // scope 0 at $DIR/inline-options.rs:9:5: 9:18
// mir::Constant
// + span: $DIR/inline-options.rs:9:5: 9:16
// + literal: Const { ty: fn() {not_inlined}, val: Value(Scalar(<ZST>)) }
}
bb1: {
StorageDead(_1); // scope 0 at $DIR/inline-options.rs:9:18: 9:19
StorageLive(_2); // scope 0 at $DIR/inline-options.rs:10:5: 10:21
StorageLive(_3); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
_3 = g() -> bb2; // scope 1 at $DIR/inline-options.rs:10:5: 10:21
// mir::Constant
// + span: $DIR/inline-options.rs:10:5: 10:21
// + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) }
}
bb2: {
StorageDead(_3); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
StorageLive(_4); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
_4 = g() -> bb3; // scope 1 at $DIR/inline-options.rs:10:5: 10:21
// mir::Constant
// + span: $DIR/inline-options.rs:10:5: 10:21
// + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) }
}
bb3: {
StorageDead(_4); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
StorageLive(_5); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
_5 = g() -> bb4; // scope 1 at $DIR/inline-options.rs:10:5: 10:21
// mir::Constant
// + span: $DIR/inline-options.rs:10:5: 10:21
// + literal: Const { ty: fn() {g}, val: Value(Scalar(<ZST>)) }
}
bb4: {
StorageDead(_5); // scope 1 at $DIR/inline-options.rs:10:5: 10:21
StorageDead(_2); // scope 0 at $DIR/inline-options.rs:10:21: 10:22
_0 = const (); // scope 0 at $DIR/inline-options.rs:8:11: 11:2
return; // scope 0 at $DIR/inline-options.rs:11:2: 11:2
}
}
| Mirah | 2 | mbc-git/rust | src/test/mir-opt/inline/inline_options.main.Inline.after.mir | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
if 'asserts' not in config.available_features:
config.unsupported = True
| INI | 3 | gandhi56/swift | test/AutoDiff/compiler_crashers_fixed/lit.local.cfg | [
"Apache-2.0"
] |
Red [
Title: "VID macOS GUI post-processing rules"
Author: "Nenad Rakocevic"
File: %rules.red
Tabs: 4
Rights: "Copyright (C) 2017-2018 Red Foundation. All rights reserved."
License: {
Distributed under the Boost Software License, Version 1.0.
See https://github.com/dockimbel/Red/blob/master/BSL-License.txt
}
]
cancel-captions: ["cancel" "delete" "remove"]
ok-captions: ["ok" "save" "apply"]
Cancel-OK: function [
"Put OK buttons last"
root [object!]
][
foreach-face/with root [
pos-x: face/offset/x
face/offset/x: f/offset/x
f/offset/x: pos-x
][
either all [
face/type = 'button
find ok-captions face/text
][
last-but: none
pos-x: face/offset/x
pos-y: face/offset/y
foreach f face/parent/pane [
all [
f <> face
f/type = 'button
find cancel-captions f/text
5 > absolute f/offset/y - pos-y
pos-x < f/offset/x
pos-x: f/offset/x
last-but: f
]
]
last-but
][no]
]
] | Red | 4 | GalenIvanov/red | modules/view/backends/gtk3/rules.red | [
"BSL-1.0",
"BSD-3-Clause"
] |
- page_title @path.split("/").reverse.map(&:humanize)
- @content_class = "limit-container-width" unless fluid_layout
.documentation.md.gl-mt-3
= markdown @markdown
| Haml | 2 | glimmerhq/glimmerhq | app/views/help/show.html.haml | [
"MIT"
] |
#include "buffer_cache/types.hpp"
#include "debug.hpp"
void debug_print(printf_buffer_t *buf, block_magic_t magic) {
buf->appendf("block_magic{");
char *bytes = magic.bytes;
debug_print_quoted_string(buf, reinterpret_cast<uint8_t *>(bytes), sizeof(magic.bytes));
buf->appendf("}");
}
| C++ | 4 | zadcha/rethinkdb | src/buffer_cache/types.cc | [
"Apache-2.0"
] |
SUITESPARSE = $(CURDIR)
export SUITESPARSE
KIND = -DDINT
all: go
include SuiteSparse_config/SuiteSparse_config.mk
go: run
- ( cd UMFPACK/Source ; ./ucov.di )
- ( cd AMD/Source ; ./acov.di )
run: prog
- ./ut > ut.out
- tail ut.out
prog:
( cd SuiteSparse_config ; $(MAKE) )
( cd AMD ; $(MAKE) library )
( cd UMFPACK ; $(MAKE) library )
$(CC) $(KIND) $(CF) $(UMFPACK_CONFIG) -IUMFPACK/Source -IAMD/Include \
-Iinclude -o ut ut.c UMFPACK/Lib/*.o \
SuiteSparse_config/*.o AMD/Lib/*.o \
-Llib -lcholmod -lcolamd -lmetis -lccolamd -lcamd -lsuitesparseconfig \
$(LDLIBS)
utcov:
- ( cd UMFPACK/Source ; ./ucov.di )
- ( cd AMD/Source ; ./acov.di )
purge:
( cd UMFPACK ; $(MAKE) purge )
( cd AMD ; $(MAKE) purge )
| D | 3 | gabrielfougeron/SuiteSparse | UMFPACK/Tcov/Makefile.di | [
"Apache-2.0"
] |
from manimlib.animation.animation import Animation
from manimlib.animation.composition import Succession
from manimlib.mobject.types.vectorized_mobject import VMobject
from manimlib.mobject.mobject import Group
from manimlib.utils.bezier import integer_interpolate
from manimlib.utils.config_ops import digest_config
from manimlib.utils.rate_functions import linear
from manimlib.utils.rate_functions import double_smooth
from manimlib.utils.rate_functions import smooth
import numpy as np
import itertools as it
class ShowPartial(Animation):
"""
Abstract class for ShowCreation and ShowPassingFlash
"""
CONFIG = {
"should_match_start": False,
}
def begin(self):
super().begin()
if not self.should_match_start:
self.mobject.lock_matching_data(self.mobject, self.starting_mobject)
def finish(self):
super().finish()
self.mobject.unlock_data()
def interpolate_submobject(self, submob, start_submob, alpha):
submob.pointwise_become_partial(
start_submob, *self.get_bounds(alpha)
)
def get_bounds(self, alpha):
raise Exception("Not Implemented")
class ShowCreation(ShowPartial):
CONFIG = {
"lag_ratio": 1,
}
def get_bounds(self, alpha):
return (0, alpha)
class Uncreate(ShowCreation):
CONFIG = {
"rate_func": lambda t: smooth(1 - t),
"remover": True,
"should_match_start": True,
}
class DrawBorderThenFill(Animation):
CONFIG = {
"run_time": 2,
"rate_func": double_smooth,
"stroke_width": 2,
"stroke_color": None,
"draw_border_animation_config": {},
"fill_animation_config": {},
}
def __init__(self, vmobject, **kwargs):
assert(isinstance(vmobject, VMobject))
self.sm_to_index = dict([
(hash(sm), 0)
for sm in vmobject.get_family()
])
super().__init__(vmobject, **kwargs)
def begin(self):
# Trigger triangulation calculation
for submob in self.mobject.get_family():
submob.get_triangulation()
self.outline = self.get_outline()
super().begin()
self.mobject.match_style(self.outline)
self.mobject.lock_matching_data(self.mobject, self.outline)
def finish(self):
super().finish()
self.mobject.unlock_data()
def get_outline(self):
outline = self.mobject.copy()
outline.set_fill(opacity=0)
for sm in outline.get_family():
sm.set_stroke(
color=self.get_stroke_color(sm),
width=float(self.stroke_width)
)
return outline
def get_stroke_color(self, vmobject):
if self.stroke_color:
return self.stroke_color
elif vmobject.get_stroke_width() > 0:
return vmobject.get_stroke_color()
return vmobject.get_color()
def get_all_mobjects(self):
return [*super().get_all_mobjects(), self.outline]
def interpolate_submobject(self, submob, start, outline, alpha):
index, subalpha = integer_interpolate(0, 2, alpha)
if index == 1 and self.sm_to_index[hash(submob)] == 0:
# First time crossing over
submob.set_data(outline.data)
submob.unlock_data()
if not self.mobject.has_updaters:
submob.lock_matching_data(submob, start)
submob.needs_new_triangulation = False
self.sm_to_index[hash(submob)] = 1
if index == 0:
submob.pointwise_become_partial(outline, 0, subalpha)
else:
submob.interpolate(outline, start, subalpha)
class Write(DrawBorderThenFill):
CONFIG = {
# To be figured out in
# set_default_config_from_lengths
"run_time": None,
"lag_ratio": None,
"rate_func": linear,
}
def __init__(self, mobject, **kwargs):
digest_config(self, kwargs)
self.set_default_config_from_length(mobject)
super().__init__(mobject, **kwargs)
def set_default_config_from_length(self, mobject):
length = len(mobject.family_members_with_points())
if self.run_time is None:
if length < 15:
self.run_time = 1
else:
self.run_time = 2
if self.lag_ratio is None:
self.lag_ratio = min(4.0 / length, 0.2)
class ShowIncreasingSubsets(Animation):
CONFIG = {
"suspend_mobject_updating": False,
"int_func": np.round,
}
def __init__(self, group, **kwargs):
self.all_submobs = list(group.submobjects)
super().__init__(group, **kwargs)
def interpolate_mobject(self, alpha):
n_submobs = len(self.all_submobs)
index = int(self.int_func(alpha * n_submobs))
self.update_submobject_list(index)
def update_submobject_list(self, index):
self.mobject.set_submobjects(self.all_submobs[:index])
class ShowSubmobjectsOneByOne(ShowIncreasingSubsets):
CONFIG = {
"int_func": np.ceil,
}
def __init__(self, group, **kwargs):
new_group = Group(*group)
super().__init__(new_group, **kwargs)
def update_submobject_list(self, index):
# N = len(self.all_submobs)
if index == 0:
self.mobject.set_submobjects([])
else:
self.mobject.set_submobjects(self.all_submobs[index - 1])
# TODO, this is broken...
class AddTextWordByWord(Succession):
CONFIG = {
# If given a value for run_time, it will
# override the time_per_char
"run_time": None,
"time_per_char": 0.06,
}
def __init__(self, text_mobject, **kwargs):
digest_config(self, kwargs)
tpc = self.time_per_char
anims = it.chain(*[
[
ShowIncreasingSubsets(word, run_time=tpc * len(word)),
Animation(word, run_time=0.005 * len(word)**1.5),
]
for word in text_mobject
])
super().__init__(*anims, **kwargs)
| Python | 4 | OrKedar/geo-manimgl-app | manimlib/animation/creation.py | [
"MIT"
] |
#%RAML 1.0
title: Example API
securitySchemes:
token_auth:
type: x-my-token
securedBy: token_auth
/posts:
get:
| RAML | 4 | PlaceMe-SAS/osprey | examples/custom-auth/api.raml | [
"Apache-2.0"
] |
= f.label :visibility_level, class: 'label-bold' do
= _('Visibility level')
.js-visibility-level-dropdown{ data: { visibility_level_options: visibility_level_options(@group).to_json, default_level: f.object.visibility_level } }
| Haml | 3 | glimmerhq/glimmerhq | app/views/shared/groups/_visibility_level.html.haml | [
"MIT"
] |
[Exposed=(Window,Worker,Worklet)]
interface ReadableByteStreamController {
readonly attribute ReadableStreamBYOBRequest? byobRequest;
readonly attribute unrestricted double? desiredSize;
undefined close();
undefined enqueue(ArrayBufferView chunk);
undefined error(optional any e);
};
| WebIDL | 3 | saschanaz/streams-1 | reference-implementation/lib/ReadableByteStreamController.webidl | [
"BSD-3-Clause"
] |
<http://example.org/node> <http://example.org/prop> <scheme:\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F%20!\u0022#$%&'()*+,-./0123456789:/%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\u005C]\u005E_\u0060abcdefghijklmnopqrstuvwxyz\u007B\u007C\u007D~\u007F> .
| Turtle | 0 | joshrose/audacity | lib-src/lv2/serd/tests/good/test-uri-escape.ttl | [
"CC-BY-3.0"
] |
import caffe2.python.fakelowp.init_shared_libs # noqa
import numpy as np
from caffe2.python import core, workspace
from caffe2.python.onnx.onnxifi import onnxifi_caffe2_net
from hypothesis import given, strategies as st, settings
from caffe2.python.fakelowp.test_utils import print_test_debug_info
import caffe2.python.serialized_test.serialized_test_util as serial
import datetime
core.GlobalInit(["caffe2",
"--caffe2_log_level=-3",
"--glow_global_fp16=1",
"--glow_clip_quant_range_to_fp16=1",
"--glow_global_fp16_constants=1"
])
class Int8OpsTest(serial.SerializedTestCase):
def _get_scale_zp(self, tensor):
tensor_max = np.max(tensor)
tensor_min = min(0, np.min(tensor))
scale = np.float32(np.float16((tensor_max - tensor_min) / 255.0))
if scale < 1e-6:
scale = np.float32(1e-6)
zero_point = 0 - tensor_min / scale
zero_point = int(round(np.clip(zero_point, 0, 255.0)))
return (scale, zero_point)
@given(
n=st.integers(2, 1024),
rand_seed=st.integers(0, 65534),
non_zero_offset=st.booleans()
)
@settings(deadline=datetime.timedelta(seconds=50))
def test_int8_quantize(self, n, rand_seed, non_zero_offset):
print("n={}, rand_seed={}".format(n, rand_seed))
np.random.seed(rand_seed)
workspace.ResetWorkspace()
if non_zero_offset:
X_fp32 = np.random.uniform(-1, 1, size=(n, n)).astype(np.float16) \
.astype(np.float32)
else:
X_fp32 = np.random.rand(n, n).astype(np.float16).astype(np.float32)
W_fp32 = np.identity(n, dtype=np.float32)
b_fp32 = np.zeros((n,), dtype=np.float32)
X_scale, X_zero_point = self._get_scale_zp(X_fp32)
workspace.FeedBlob("X", X_fp32)
workspace.FeedBlob("W", W_fp32)
workspace.FeedBlob("b", b_fp32)
workspace.RunOperatorOnce(
core.CreateOperator(
"Int8FCPackWeight",
["W"],
["W_int8"],
engine="DNNLOWP",
save_unpacked_weights=True,
in_scale=X_scale,
)
)
ref_net = core.Net("net")
ref_net.Int8QuantizeNNPI(
["X"],
["X_int8"],
Y_scale=X_scale,
Y_zero_point=X_zero_point
)
ref_net.Int8FCFakeAcc32NNPI(
["X_int8", "W_int8", "b"],
["Y_int8"],
Y_scale=X_scale,
Y_zero_point=X_zero_point,
)
ref_net.Int8DequantizeNNPI(
["Y_int8"],
["Y"]
)
ref_net.Proto().external_output.append("Y")
# run ref_net
workspace.RunNetOnce(ref_net)
Y_fbgemm = workspace.FetchBlob("Y")
# run onnxifi net
ref_net.Proto().op[0].type = "Int8Quantize"
ref_net.Proto().op[1].type = "Int8FC"
ref_net.Proto().op[2].type = "Int8Dequantize"
net_onnxified = onnxifi_caffe2_net(
ref_net.Proto(),
{},
debug=True,
adjust_batch=False,
use_onnx=False,
weight_names=["W_int8", "b"],
)
num_onnxified_ops = sum(
1 if o.type == "Onnxifi" else 0 for o in net_onnxified.op
)
np.testing.assert_equal(num_onnxified_ops, 1)
workspace.CreateNet(net_onnxified)
workspace.RunNet(net_onnxified.name)
Y_glow = workspace.FetchBlob("Y")
if not np.allclose(Y_glow, Y_fbgemm):
diff_Y = np.abs(Y_glow - Y_fbgemm)
print_test_debug_info(
"int8_fc",
{
"seed": rand_seed,
"n": n,
"X": X_fp32,
"W": W_fp32,
"b": b_fp32,
"Y_fbgemm": Y_fbgemm,
"Y_glow": Y_glow,
"diff": diff_Y,
"maxdiff": diff_Y.max(axis=1),
},
)
assert 0
@given(
n=st.integers(1, 1024),
m=st.integers(1, 1024),
k=st.integers(1, 1024),
f=st.integers(1, 1), # TODO: figure a safe number to increase
rand_seed=st.integers(0, 65534),
quantize_bias=st.sampled_from([False]),
)
@settings(deadline=datetime.timedelta(seconds=50))
def test_int8_fc(
self, n, m, k, rand_seed, quantize_bias, f
):
print(
f"n={n}, m={m}, k={k}, rand_seed={rand_seed}, quantize_bias={quantize_bias}"
)
np.random.seed(rand_seed)
workspace.ResetWorkspace()
ff = float(f)
X_fp32 = np.random.uniform(-ff, ff, size=(m, k)).astype(np.float32)
W_fp32 = np.random.uniform(-ff, ff, size=(n, k)).astype(np.float32)
b_fp32 = np.random.uniform(-ff, ff, size=(n)).astype(np.float32)
X_scale, X_zero_point = self._get_scale_zp(X_fp32)
Y_fp32 = np.dot(X_fp32, W_fp32.T) + b_fp32
Y_scale, Y_zero_point = self._get_scale_zp(Y_fp32)
workspace.FeedBlob("X", X_fp32)
workspace.FeedBlob("W", W_fp32)
workspace.FeedBlob("b", b_fp32)
workspace.RunOperatorOnce(
core.CreateOperator(
"Int8FCPackWeight",
["W", "b"] if quantize_bias else ["W"],
["W_int8", "b_int32"] if quantize_bias else ["W_int8"],
engine="DNNLOWP",
save_unpacked_weights=True,
in_scale=X_scale,
)
)
ref_net = core.Net("net")
ref_net.Int8QuantizeNNPI(
["X"],
["X_int8"],
Y_scale=X_scale,
Y_zero_point=X_zero_point
)
ref_net.Int8FCFakeAcc32NNPI(
["X_int8", "W_int8", "b_int32" if quantize_bias else "b"],
["Y_int8"],
Y_scale=Y_scale,
Y_zero_point=Y_zero_point,
)
ref_net.Int8DequantizeNNPI(
["Y_int8"],
["Y"]
)
ref_net.Proto().external_output.append("Y")
# run ref_net
workspace.RunNetOnce(ref_net)
Y_fbgemm = workspace.FetchBlob("Y")
# run onnxifi net
ref_net.Proto().op[0].type = "Int8Quantize"
ref_net.Proto().op[1].type = "Int8FC"
ref_net.Proto().op[2].type = "Int8Dequantize"
net_onnxified = onnxifi_caffe2_net(
ref_net.Proto(),
{},
debug=True,
adjust_batch=False,
use_onnx=False,
weight_names=["W_int8", "b_int32"] if quantize_bias else ["W_int8", "b"],
)
num_onnxified_ops = sum(
1 if o.type == "Onnxifi" else 0 for o in net_onnxified.op
)
np.testing.assert_equal(num_onnxified_ops, 1)
workspace.CreateNet(net_onnxified)
workspace.RunNet(net_onnxified.name)
Y_glow = workspace.FetchBlob("Y")
if not np.allclose(Y_glow, Y_fbgemm):
diff_Y = np.abs(Y_glow - Y_fbgemm)
print_test_debug_info(
"int8_fc",
{
"seed": rand_seed,
"n": n,
"m": m,
"k": k,
"X": X_fp32,
"W": W_fp32,
"b": b_fp32,
"Y_fbgemm": Y_fbgemm,
"Y_glow": Y_glow,
"diff": diff_Y,
"maxdiff": diff_Y.max(axis=1),
},
)
assert 0
@given(
n=st.integers(1, 4),
rand_seed=st.integers(0, 65534)
)
@settings(deadline=datetime.timedelta(seconds=10))
def test_int8_small_input(self, n, rand_seed):
print("n={}, rand_seed={}".format(n, rand_seed))
np.random.seed(rand_seed)
workspace.ResetWorkspace()
X_fp32 = np.random.uniform(0.01, 0.03, size=(n, n)).astype(np.float32)
W_fp32 = np.identity(n, dtype=np.float32)
b_fp32 = np.zeros((n,), dtype=np.float32)
X_scale, X_zero_point = self._get_scale_zp(X_fp32)
workspace.FeedBlob("X", X_fp32)
workspace.FeedBlob("W", W_fp32)
workspace.FeedBlob("b", b_fp32)
workspace.RunOperatorOnce(
core.CreateOperator(
"Int8FCPackWeight",
["W"],
["W_int8"],
engine="DNNLOWP",
save_unpacked_weights=True,
in_scale=X_scale,
)
)
ref_net = core.Net("net")
ref_net.Int8QuantizeNNPI(
["X"],
["X_int8"],
Y_scale=X_scale,
Y_zero_point=X_zero_point
)
ref_net.Int8FCFakeAcc32NNPI(
["X_int8", "W_int8", "b"],
["Y_int8"],
Y_scale=X_scale,
Y_zero_point=X_zero_point,
)
ref_net.Int8DequantizeNNPI(
["Y_int8"],
["Y"]
)
ref_net.Proto().external_output.append("Y")
# run ref_net
workspace.RunNetOnce(ref_net)
Y_fbgemm = workspace.FetchBlob("Y")
# run onnxifi net
ref_net.Proto().op[0].type = "Int8Quantize"
ref_net.Proto().op[1].type = "Int8FC"
ref_net.Proto().op[2].type = "Int8Dequantize"
net_onnxified = onnxifi_caffe2_net(
ref_net.Proto(),
{},
debug=True,
adjust_batch=False,
use_onnx=False,
weight_names=["W_int8", "b"],
)
num_onnxified_ops = sum(
1 if o.type == "Onnxifi" else 0 for o in net_onnxified.op
)
np.testing.assert_equal(num_onnxified_ops, 1)
workspace.CreateNet(net_onnxified)
workspace.RunNet(net_onnxified.name)
Y_glow = workspace.FetchBlob("Y")
if not np.allclose(Y_glow, Y_fbgemm):
diff_Y = np.abs(Y_glow - Y_fbgemm)
print_test_debug_info(
"int8_fc",
{
"seed": rand_seed,
"n": n,
"X": X_fp32,
"W": W_fp32,
"b": b_fp32,
"Y_fbgemm": Y_fbgemm,
"Y_glow": Y_glow,
"diff": diff_Y,
"maxdiff": diff_Y.max(axis=1),
},
)
assert 0
| Python | 5 | Hacky-DH/pytorch | caffe2/contrib/fakelowp/test/test_int8_ops_nnpi.py | [
"Intel"
] |
- name: "Andorra"
flag: "ad"
- name: "United Arab Emirates"
flag: "ae"
- name: "Afghanistan"
flag: "af"
- name: "Antigua"
flag: "ag"
- name: "Anguilla"
flag: "ai"
- name: "Armenia"
flag: "am"
- name: "Angolan"
flag: "ao"
- name: "Antarctica"
flag: "aq"
- name: "Argentina"
flag: "ar"
- name: "American Samoa"
flag: "as"
- name: "Austria"
flag: "at"
- name: "Australia"
flag: "au"
- name: "Aruba"
flag: "aw"
- name: "Aslan Islands"
flag: "ax"
- name: "Azerbaijan"
flag: "az"
- name: "Bosnian"
flag: "ba"
- name: "Barbados"
flag: "bb"
- name: "Belgium"
flag: "be"
- name: "Burkina Faso"
flag: "bf"
- name: "Bulgaria"
flag: "bg"
- name: "Bahrain"
flag: "bh"
- name: "Burundi"
flag: "bi"
- name: "Benin"
flag: "bj"
- name: "Saint-Barthélemy"
flag: "bl"
- name: "Bermuda"
flag: "bm"
- name: "Bruneian"
flag: "bn"
- name: "Bolivia"
flag: "bo"
- name: "Bonaire"
flag: "bq"
- name: "Brazil"
flag: "br"
- name: "Bahamas"
flag: "bs"
- name: "Bhutan"
flag: "bt"
- name: "Bouvet Island"
flag: "bv"
- name: "Batswana"
flag: "bw"
- name: "Belarus"
flag: "by"
- name: "Belize"
flag: "bz"
- name: "Canada"
flag: "ca"
- name: "Cocos Island"
flag: "cc"
- name: "Democratic Republic of Congo"
flag: "cd"
- name: "Central African Republic"
flag: "cf"
- name: "Republic of the Congo"
flag: "cg"
- name: "Switzerland"
flag: "ch"
- name: "Ivory Coast"
flag: "ci"
- name: "Cook Island"
flag: "ck"
- name: "Chile"
flag: "cl"
- name: "Cameroon"
flag: "cm"
- name: "China"
flag: "cn"
- name: "Colombia"
flag: "co"
- name: "Costa Rica"
flag: "cr"
- name: "Cuba"
flag: "cu"
- name: "Cape Verde"
flag: "cv"
- name: "Curacao"
flag: "cw"
- name: "Christmas Island"
flag: "cx"
- name: "Cyprus"
flag: "cy"
- name: "Czech Republic"
flag: "cz"
- name: "Germany"
flag: "de"
- name: "Djibouti"
flag: "dj"
- name: "Denmark"
flag: "dk"
- name: "Dominica"
flag: "dm"
- name: "Dominican Republic"
flag: "do"
- name: "Algeria"
flag: "dz"
- name: "Ecuador"
flag: "ec"
- name: "Estonia"
flag: "ee"
- name: "Egypt"
flag: "eg"
- name: "Sahrawi"
flag: "eh"
- name: "Eritrea"
flag: "er"
- name: "Spain"
flag: "es"
- name: "Catalonia"
flag: "es-ct"
- name: "Ethiopia"
flag: "et"
- name: "European Union"
flag: "eu"
- name: "Finland"
flag: "fi"
- name: "Fiji"
flag: "fj"
- name: "Falkland Islands"
flag: "fk"
- name: "Federate States of Micronesia"
flag: "fm"
- name: "Faroe Islands"
flag: "fo"
- name: "France"
flag: "fr"
- name: "Gabon"
flag: "ga"
- name: "Great Britain"
flag: "gb"
- name: "England"
flag: "gb-eng"
- name: "Nothern Ireland"
flag: "gb-nir"
- name: "Scotland"
flag: "gb-sct"
- name: "Wales"
flag: "gb-wls"
- name: "Grenada"
flag: "gd"
- name: "Georgia"
flag: "ge"
- name: "Guyana"
flag: "gf"
- name: "Guernsey"
flag: "gg"
- name: "Ghana"
flag: "gh"
- name: "Gibraltar"
flag: "gi"
- name: "Greenland"
flag: "gl"
- name: "Gambia"
flag: "gm"
- name: "Guinea"
flag: "gn"
- name: "Guadeloupe"
flag: "gp"
- name: "Equatorial Guinea"
flag: "gq"
- name: "Greece"
flag: "gr"
- name: "South Georgia"
flag: "gs"
- name: "Guatemala"
flag: "gt"
- name: "Guam"
flag: "gu"
- name: "Guinea-Bissau"
flag: "gw"
- name: "Guyana"
flag: "gy"
- name: "Hong Kong"
flag: "hk"
- name: "Heard and McDonald Islands"
flag: "hm"
- name: "Honduras"
flag: "hn"
- name: "Croatia"
flag: "hr"
- name: "Haiti"
flag: "ht"
- name: "Hungary"
flag: "hu"
- name: "Indonesia"
flag: "id"
- name: "Ireland"
flag: "ie"
- name: "Israel"
flag: "il"
- name: "Isle of Man"
flag: "im"
- name: "India"
flag: "in"
- name: "British Indian Ocean Territory"
flag: "io"
- name: "Iraq"
flag: "iq"
- name: "Iran"
flag: "ir"
- name: "Iceland"
flag: "is"
- name: "Italy"
flag: "it"
- name: "Jersey"
flag: "je"
- name: "Jamaica"
flag: "jm"
- name: "Jordan"
flag: "jo"
- name: "Japan"
flag: "jp"
- name: "Kenya"
flag: "ke"
- name: "Kyrgyzstan"
flag: "kg"
- name: "Cambodia"
flag: "kh"
- name: "Kiribati"
flag: "ki"
- name: "Comoros"
flag: "km"
- name: "Saint Kitts and Nevis"
flag: "kn"
- name: "North Korea"
flag: "kp"
- name: "South Korea"
flag: "kr"
- name: "Kuwait"
flag: "kw"
- name: "Cayman Islands"
flag: "ky"
- name: "Kazakhstan"
flag: "kz"
- name: "Laos"
flag: "la"
- name: "Lebanese"
flag: "lb"
- name: "Saint Lucia"
flag: "lc"
- name: "Liechtenstein"
flag: "li"
- name: "Sri Lanka"
flag: "lk"
- name: "Liberia"
flag: "lr"
- name: "Lesotho"
flag: "ls"
- name: "Lithuania"
flag: "lt"
- name: "Luxembourg"
flag: "lu"
- name: "Latvia"
flag: "lv"
- name: "Libya"
flag: "ly"
- name: "Morocco"
flag: "ma"
- name: "Monaco"
flag: "mc"
- name: "Moldova"
flag: "md"
- name: "Montenegro"
flag: "me"
- name: "Saint Martin"
flag: "mf"
- name: "Madagascar"
flag: "mg"
- name: "Marshall Islands"
flag: "mh"
- name: "Macedonia"
flag: "mk"
- name: "Mali"
flag: "ml"
- name: "Myanmar"
flag: "mm"
- name: "Mongolia"
flag: "mn"
- name: "Macao"
flag: "mo"
- name: "Nothern Mariana Islands"
flag: "mp"
- name: "Martinique"
flag: "mq"
- name: "Mauritania"
flag: "mr"
- name: "Montserrat"
flag: "ms"
- name: "Malta"
flag: "mt"
- name: "Mauritius"
flag: "mu"
- name: "Maldives"
flag: "mv"
- name: "Malawi"
flag: "mw"
- name: "Mexico"
flag: "mx"
- name: "Malaysia"
flag: "my"
- name: "Mozambique"
flag: "mz"
- name: "Namibia"
flag: "na"
- name: "New Caledonia"
flag: "nc"
- name: "Niger"
flag: "ne"
- name: "Norfolk Island"
flag: "nf"
- name: "Nigeria"
flag: "ng"
- name: "Nicaragua"
flag: "ni"
- name: "Norway"
flag: "no"
- name: "Nepal"
flag: "np"
- name: "Nauruan"
flag: "nr"
- name: "Niger"
flag: "nu"
- name: "New Zeland"
flag: "nz"
- name: "Oman"
flag: "om"
- name: "Panama"
flag: "pa"
- name: "Peru"
flag: "pe"
- name: "French Polynesia"
flag: "pf"
- name: "Papua New Guinea"
flag: "pg"
- name: "Philippines"
flag: "ph"
- name: "Pakistan"
flag: "pk"
- name: "Poland"
flag: "pl"
- name: "Saint Pierre"
flag: "pm"
- name: "Pitcairn Islands"
flag: "pn"
- name: "Puerto Rico"
flag: "pr"
- name: "Palestine"
flag: "ps"
- name: "Portugal"
flag: "pt"
- name: "Palau"
flag: "pw"
- name: "Paraguay"
flag: "py"
- name: "Qatar"
flag: "qa"
- name: "Reunion Island"
flag: "re"
- name: "Romania"
flag: "ro"
- name: "Serbia"
flag: "rs"
- name: "Russia"
flag: "ru"
- name: "Rwanda"
flag: "rw"
- name: "Saudi Arabia"
flag: "sa"
- name: "Solomon Islands"
flag: "sb"
- name: "Seychelles"
flag: "sc"
- name: "Sudan"
flag: "sd"
- name: "Sweden"
flag: "se"
- name: "Singapore"
flag: "sg"
- name: "Saint Helena"
flag: "sh"
- name: "Slovenia"
flag: "si"
- name: "Svalbard Island"
flag: "sj"
- name: "Slovakia"
flag: "sk"
- name: "Sierra Leone"
flag: "sl"
- name: "San Marino"
flag: "sm"
- name: "Senegal"
flag: "sn"
- name: "Somalia"
flag: "so"
- name: "Suriname"
flag: "sr"
- name: "South Sudan"
flag: "ss"
- name: "Sao Tome"
flag: "st"
- name: "El Salvador"
flag: "sv"
- name: "Sint Maarten"
flag: "sx"
- name: "Syria"
flag: "sy"
- name: "Swaziland"
flag: "sz"
- name: "Turks and Caicos"
flag: "tc"
- name: "Chad"
flag: "td"
- name: "French Southern and Antarctic Lands"
flag: "tf"
- name: "Togo"
flag: "tg"
- name: "Thailand"
flag: "th"
- name: "Tajikistan"
flag: "tj"
- name: "Tokelau"
flag: "tk"
- name: "Timor Leste"
flag: "tl"
- name: "Turkmenistan"
flag: "tm"
- name: "Tunisia"
flag: "tn"
- name: "Tonga"
flag: "to"
- name: "Turkey"
flag: "tr"
- name: "Trinidad and Tobago"
flag: "tt"
- name: "Tuvalu"
flag: "tv"
- name: "Tanzania"
flag: "tz"
- name: "Ukraine"
flag: "ua"
- name: "Uganda"
flag: "ug"
- name: "United States Minor Islands"
flag: "um"
- name: "United Nations"
flag: "un"
- name: "United States of America"
flag: "us"
- name: "Uruguay"
flag: "uy"
- name: "Uzbekistan"
flag: "uz"
- name: "Vatican City"
flag: "va"
- name: "Saint Vincent"
flag: "vc"
- name: "Venezuela"
flag: "ve"
- name: "British Virgin Islands"
flag: "vg"
- name: "Virgiin Islands"
flag: "vi"
- name: "Vietnam"
flag: "vn"
- name: "Vanuatu"
flag: "vu"
- name: "Wallis and Futuna"
flag: "wf"
- name: "Samoa"
flag: "ws"
- name: "Yemen"
flag: "ye"
- name: "South Africa"
flag: "za"
- name: "Zambia"
flag: "zm"
- name: "Zimbabwe"
flag: "zw"
| YAML | 2 | muhginanjar/tabler | src/pages/_data/flags.yml | [
"MIT"
] |
server {
listen 69.50.225.155:9000;
listen 127.0.0.1;
server_name .example.com;
server_name example.*;
}
| DIGITAL Command Language | 2 | tsrivishnu/certbot | certbot-nginx/certbot_nginx/tests/testdata/etc_nginx/sites-enabled/example.com | [
"Apache-2.0"
] |
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = 'regional';
@endpointMap = {
ap-northeast-1 = 'ice.aliyuncs.com',
ap-northeast-2-pop = 'ice.aliyuncs.com',
ap-south-1 = 'ice.aliyuncs.com',
ap-southeast-1 = 'ice.aliyuncs.com',
ap-southeast-2 = 'ice.aliyuncs.com',
ap-southeast-3 = 'ice.aliyuncs.com',
ap-southeast-5 = 'ice.aliyuncs.com',
cn-beijing = 'ice.aliyuncs.com',
cn-beijing-finance-1 = 'ice.aliyuncs.com',
cn-beijing-finance-pop = 'ice.aliyuncs.com',
cn-beijing-gov-1 = 'ice.aliyuncs.com',
cn-beijing-nu16-b01 = 'ice.aliyuncs.com',
cn-chengdu = 'ice.aliyuncs.com',
cn-edge-1 = 'ice.aliyuncs.com',
cn-fujian = 'ice.aliyuncs.com',
cn-haidian-cm12-c01 = 'ice.aliyuncs.com',
cn-hangzhou = 'ice.aliyuncs.com',
cn-hangzhou-bj-b01 = 'ice.aliyuncs.com',
cn-hangzhou-finance = 'ice.aliyuncs.com',
cn-hangzhou-internal-prod-1 = 'ice.aliyuncs.com',
cn-hangzhou-internal-test-1 = 'ice.aliyuncs.com',
cn-hangzhou-internal-test-2 = 'ice.aliyuncs.com',
cn-hangzhou-internal-test-3 = 'ice.aliyuncs.com',
cn-hangzhou-test-306 = 'ice.aliyuncs.com',
cn-hongkong = 'ice.aliyuncs.com',
cn-hongkong-finance-pop = 'ice.aliyuncs.com',
cn-huhehaote = 'ice.aliyuncs.com',
cn-huhehaote-nebula-1 = 'ice.aliyuncs.com',
cn-north-2-gov-1 = 'ice.aliyuncs.com',
cn-qingdao = 'ice.aliyuncs.com',
cn-qingdao-nebula = 'ice.aliyuncs.com',
cn-shanghai-et15-b01 = 'ice.aliyuncs.com',
cn-shanghai-et2-b01 = 'ice.aliyuncs.com',
cn-shanghai-finance-1 = 'ice.aliyuncs.com',
cn-shanghai-inner = 'ice.aliyuncs.com',
cn-shanghai-internal-test-1 = 'ice.aliyuncs.com',
cn-shenzhen = 'ice.aliyuncs.com',
cn-shenzhen-finance-1 = 'ice.aliyuncs.com',
cn-shenzhen-inner = 'ice.aliyuncs.com',
cn-shenzhen-st4-d01 = 'ice.aliyuncs.com',
cn-shenzhen-su18-b01 = 'ice.aliyuncs.com',
cn-wuhan = 'ice.aliyuncs.com',
cn-wulanchabu = 'ice.aliyuncs.com',
cn-yushanfang = 'ice.aliyuncs.com',
cn-zhangbei = 'ice.aliyuncs.com',
cn-zhangbei-na61-b01 = 'ice.aliyuncs.com',
cn-zhangjiakou = 'ice.aliyuncs.com',
cn-zhangjiakou-na62-a01 = 'ice.aliyuncs.com',
cn-zhengzhou-nebula-1 = 'ice.aliyuncs.com',
eu-central-1 = 'ice.aliyuncs.com',
eu-west-1 = 'ice.aliyuncs.com',
eu-west-1-oxs = 'ice.aliyuncs.com',
me-east-1 = 'ice.aliyuncs.com',
rus-west-1-pop = 'ice.aliyuncs.com',
us-east-1 = 'ice.aliyuncs.com',
us-west-1 = 'ice.aliyuncs.com',
};
checkConfig(config);
@endpoint = getEndpoint('ice', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model ListSmartJobsRequest {
status?: long(name='Status'),
nextToken?: string(name='NextToken'),
maxResults?: long(name='MaxResults'),
pageNo?: long(name='PageNo'),
pageSize?: long(name='PageSize'),
jobType?: string(name='JobType'),
sortBy?: string(name='SortBy'),
jobState?: string(name='JobState'),
}
model ListSmartJobsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
smartJobList?: [
{
jobId?: string(name='JobId'),
title?: string(name='Title'),
description?: string(name='Description'),
userId?: long(name='UserId'),
jobType?: string(name='JobType'),
editingConfig?: string(name='EditingConfig'),
userData?: string(name='UserData'),
jobState?: string(name='JobState'),
createTime?: string(name='CreateTime'),
modifiedTime?: string(name='ModifiedTime'),
inputConfig?: {
inputFile?: string(name='InputFile'),
keyword?: string(name='Keyword'),
}(name='InputConfig'),
outputConfig?: {
bucket?: string(name='Bucket'),
object?: string(name='Object'),
}(name='OutputConfig'),
}
](name='SmartJobList'),
nextToken?: string(name='NextToken'),
maxResults?: string(name='MaxResults'),
totalCount?: string(name='TotalCount'),
}
model ListSmartJobsResponse = {
headers: map[string]string(name='headers'),
body: ListSmartJobsResponseBody(name='body'),
}
async function listSmartJobsWithOptions(request: ListSmartJobsRequest, runtime: Util.RuntimeOptions): ListSmartJobsResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('ListSmartJobs', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function listSmartJobs(request: ListSmartJobsRequest): ListSmartJobsResponse {
var runtime = new Util.RuntimeOptions{};
return listSmartJobsWithOptions(request, runtime);
}
model GetLiveEditingJobRequest {
jobId?: string(name='JobId'),
}
model GetLiveEditingJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
liveEditingJob?: {
jobId?: string(name='JobId'),
projectId?: string(name='ProjectId'),
status?: string(name='Status'),
clips?: string(name='Clips'),
userData?: string(name='UserData'),
creationTime?: string(name='CreationTime'),
modifiedTime?: string(name='ModifiedTime'),
completeTime?: string(name='CompleteTime'),
mediaId?: string(name='MediaId'),
mediaURL?: string(name='MediaURL'),
code?: string(name='Code'),
message?: string(name='Message'),
liveStreamConfig?: {
appName?: string(name='AppName'),
domainName?: string(name='DomainName'),
streamName?: string(name='StreamName'),
}(name='LiveStreamConfig'),
mediaProduceConfig?: {
mode?: string(name='Mode'),
}(name='MediaProduceConfig'),
outputMediaConfig?: {
mediaURL?: string(name='MediaURL'),
storageLocation?: string(name='StorageLocation'),
fileName?: string(name='FileName'),
width?: int32(name='Width'),
height?: int32(name='Height'),
bitrate?: long(name='Bitrate'),
vodTemplateGroupId?: string(name='VodTemplateGroupId'),
}(name='OutputMediaConfig'),
}(name='LiveEditingJob'),
}
model GetLiveEditingJobResponse = {
headers: map[string]string(name='headers'),
body: GetLiveEditingJobResponseBody(name='body'),
}
async function getLiveEditingJobWithOptions(request: GetLiveEditingJobRequest, runtime: Util.RuntimeOptions): GetLiveEditingJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('GetLiveEditingJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function getLiveEditingJob(request: GetLiveEditingJobRequest): GetLiveEditingJobResponse {
var runtime = new Util.RuntimeOptions{};
return getLiveEditingJobWithOptions(request, runtime);
}
model DescribeRelatedAuthorizationStatusResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
OSSAuthorized?: boolean(name='OSSAuthorized'),
MTSAuthorized?: boolean(name='MTSAuthorized'),
MNSAuthorized?: boolean(name='MNSAuthorized'),
authorized?: boolean(name='Authorized'),
}
model DescribeRelatedAuthorizationStatusResponse = {
headers: map[string]string(name='headers'),
body: DescribeRelatedAuthorizationStatusResponseBody(name='body'),
}
async function describeRelatedAuthorizationStatusWithOptions(runtime: Util.RuntimeOptions): DescribeRelatedAuthorizationStatusResponse {
var req = new OpenApi.OpenApiRequest{};
return doRPCRequest('DescribeRelatedAuthorizationStatus', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function describeRelatedAuthorizationStatus(): DescribeRelatedAuthorizationStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeRelatedAuthorizationStatusWithOptions(runtime);
}
model DeleteSmartJobRequest {
jobId?: string(name='JobId'),
}
model DeleteSmartJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
state?: string(name='State'),
jobId?: string(name='JobId'),
}
model DeleteSmartJobResponse = {
headers: map[string]string(name='headers'),
body: DeleteSmartJobResponseBody(name='body'),
}
async function deleteSmartJobWithOptions(request: DeleteSmartJobRequest, runtime: Util.RuntimeOptions): DeleteSmartJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('DeleteSmartJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function deleteSmartJob(request: DeleteSmartJobRequest): DeleteSmartJobResponse {
var runtime = new Util.RuntimeOptions{};
return deleteSmartJobWithOptions(request, runtime);
}
model AddTemplateRequest {
name?: string(name='Name', description='模板名称'),
type?: string(name='Type', description='模板类型,取值范围:Timeline'),
config?: string(name='Config', description='参见Timeline模板Config文档'),
coverUrl?: string(name='CoverUrl', description='模板封面'),
previewMedia?: string(name='PreviewMedia', description='预览视频媒资id'),
status?: string(name='Status', description='模板状态'),
source?: string(name='Source', description='模板创建来源,默认OpenAPI'),
relatedMediaids?: string(name='RelatedMediaids', description='模板相关素材,模板编辑器使用'),
}
model AddTemplateResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
template?: {
templateId?: string(name='TemplateId', description='模板Id'),
name?: string(name='Name', description='模板名称'),
type?: string(name='Type', description='模板类型'),
config?: string(name='Config', description='参见Timeline模板Config文档'),
coverUrl?: string(name='CoverUrl', description='模板封面'),
previewMedia?: string(name='PreviewMedia', description='预览视频媒资id'),
status?: string(name='Status', description='模板状态'),
createSource?: string(name='CreateSource', description='模板创建来源'),
modifiedSource?: string(name='ModifiedSource', description='模板修改来源'),
}(name='Template', description='模板信息'),
}
model AddTemplateResponse = {
headers: map[string]string(name='headers'),
body: AddTemplateResponseBody(name='body'),
}
async function addTemplateWithOptions(request: AddTemplateRequest, runtime: Util.RuntimeOptions): AddTemplateResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('AddTemplate', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function addTemplate(request: AddTemplateRequest): AddTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return addTemplateWithOptions(request, runtime);
}
model UpdateEditingProjectRequest {
title?: string(name='Title', description='云剪辑工程标题'),
description?: string(name='Description', description='云剪辑工程描述'),
timeline?: string(name='Timeline', description='云剪辑工程时间线,Json格式'),
coverURL?: string(name='CoverURL', description='云剪辑工程封面'),
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
businessStatus?: string(name='BusinessStatus'),
}
model UpdateEditingProjectResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
}
model UpdateEditingProjectResponse = {
headers: map[string]string(name='headers'),
body: UpdateEditingProjectResponseBody(name='body'),
}
async function updateEditingProjectWithOptions(request: UpdateEditingProjectRequest, runtime: Util.RuntimeOptions): UpdateEditingProjectResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('UpdateEditingProject', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function updateEditingProject(request: UpdateEditingProjectRequest): UpdateEditingProjectResponse {
var runtime = new Util.RuntimeOptions{};
return updateEditingProjectWithOptions(request, runtime);
}
model ListMediaProducingJobsRequest {
status?: string(name='Status', description='查询以下状态的合成任务,支持多值,以英文逗号分隔'),
}
model ListMediaProducingJobsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
mediaProducingJobList?: [
{
jobId?: string(name='JobId'),
projectId?: string(name='ProjectId'),
mediaId?: string(name='MediaId'),
mediaURL?: string(name='MediaURL'),
templateId?: string(name='TemplateId'),
clipsParam?: string(name='ClipsParam'),
duration?: float(name='Duration'),
createTime?: string(name='CreateTime'),
completeTime?: string(name='CompleteTime'),
modifiedTime?: string(name='ModifiedTime'),
status?: string(name='Status'),
code?: string(name='Code'),
message?: string(name='Message'),
}
](name='MediaProducingJobList'),
}
model ListMediaProducingJobsResponse = {
headers: map[string]string(name='headers'),
body: ListMediaProducingJobsResponseBody(name='body'),
}
async function listMediaProducingJobsWithOptions(request: ListMediaProducingJobsRequest, runtime: Util.RuntimeOptions): ListMediaProducingJobsResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('ListMediaProducingJobs', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function listMediaProducingJobs(request: ListMediaProducingJobsRequest): ListMediaProducingJobsResponse {
var runtime = new Util.RuntimeOptions{};
return listMediaProducingJobsWithOptions(request, runtime);
}
model GetEditingProjectMaterialsRequest {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
}
model GetEditingProjectMaterialsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
projectId?: string(name='ProjectId'),
mediaInfos?: [
{
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
snapshots?: string(name='Snapshots', description='截图'),
status?: string(name='Status', description='资源状态'),
transcodeStatus?: string(name='TranscodeStatus', description='转码状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
spriteImages?: string(name='SpriteImages', description='雪碧图'),
}(name='MediaBasicInfo', description='BasicInfo'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
}
](name='FileInfoList', description='FileInfos'),
}
](name='MediaInfos', description='符合要求的媒资集合'),
liveMaterials?: [
{
appName?: string(name='AppName'),
streamName?: string(name='StreamName'),
domainName?: string(name='DomainName'),
liveUrl?: string(name='LiveUrl'),
}
](name='LiveMaterials'),
projectMaterials?: string(name='ProjectMaterials'),
}
model GetEditingProjectMaterialsResponse = {
headers: map[string]string(name='headers'),
body: GetEditingProjectMaterialsResponseBody(name='body'),
}
async function getEditingProjectMaterialsWithOptions(request: GetEditingProjectMaterialsRequest, runtime: Util.RuntimeOptions): GetEditingProjectMaterialsResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetEditingProjectMaterials', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getEditingProjectMaterials(request: GetEditingProjectMaterialsRequest): GetEditingProjectMaterialsResponse {
var runtime = new Util.RuntimeOptions{};
return getEditingProjectMaterialsWithOptions(request, runtime);
}
model GetDefaultStorageLocationResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
storageType?: string(name='StorageType', description='存储类型'),
bucket?: string(name='Bucket', description='oss bucket 名称'),
path?: string(name='Path', description='路径'),
status?: string(name='Status', description='状态'),
}
model GetDefaultStorageLocationResponse = {
headers: map[string]string(name='headers'),
body: GetDefaultStorageLocationResponseBody(name='body'),
}
async function getDefaultStorageLocationWithOptions(runtime: Util.RuntimeOptions): GetDefaultStorageLocationResponse {
var req = new OpenApi.OpenApiRequest{};
return doRPCRequest('GetDefaultStorageLocation', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function getDefaultStorageLocation(): GetDefaultStorageLocationResponse {
var runtime = new Util.RuntimeOptions{};
return getDefaultStorageLocationWithOptions(runtime);
}
model DeleteMediaInfosRequest {
mediaIds?: string(name='MediaIds', description='ICE 媒资ID'),
inputURLs?: string(name='InputURLs', description='待注册的媒资在相应系统中的地址'),
}
model DeleteMediaInfosResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
ignoredList?: [ string ](name='IgnoredList', description='出现获取错误的ID或inputUr'),
}
model DeleteMediaInfosResponse = {
headers: map[string]string(name='headers'),
body: DeleteMediaInfosResponseBody(name='body'),
}
async function deleteMediaInfosWithOptions(request: DeleteMediaInfosRequest, runtime: Util.RuntimeOptions): DeleteMediaInfosResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('DeleteMediaInfos', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function deleteMediaInfos(request: DeleteMediaInfosRequest): DeleteMediaInfosResponse {
var runtime = new Util.RuntimeOptions{};
return deleteMediaInfosWithOptions(request, runtime);
}
model SetEventCallbackRequest {
callbackQueueName?: string(name='CallbackQueueName'),
eventTypeList?: string(name='EventTypeList'),
}
model SetEventCallbackResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
success?: boolean(name='Success', description='是否设置成功'),
}
model SetEventCallbackResponse = {
headers: map[string]string(name='headers'),
body: SetEventCallbackResponseBody(name='body'),
}
async function setEventCallbackWithOptions(request: SetEventCallbackRequest, runtime: Util.RuntimeOptions): SetEventCallbackResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SetEventCallback', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function setEventCallback(request: SetEventCallbackRequest): SetEventCallbackResponse {
var runtime = new Util.RuntimeOptions{};
return setEventCallbackWithOptions(request, runtime);
}
model GetTemplateRequest {
templateId?: string(name='TemplateId', description='模板Id'),
}
model GetTemplateResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
template?: {
templateId?: string(name='TemplateId', description='模板ID'),
name?: string(name='Name', description='模板名称'),
type?: string(name='Type', description='模板类型'),
config?: string(name='Config', description='模板配置'),
previewMedia?: string(name='PreviewMedia', description='预览素材'),
status?: string(name='Status', description='模板状态'),
createSource?: string(name='CreateSource', description='创建来源'),
modifiedSource?: string(name='ModifiedSource', description='修改来源'),
previewMediaStatus?: string(name='PreviewMediaStatus', description='预览素材状态'),
creationTime?: string(name='CreationTime', description='创建时间'),
modifiedTime?: string(name='ModifiedTime', description='修改时间'),
coverURL?: string(name='CoverURL', description='封面URL'),
clipsParam?: string(name='ClipsParam', description='提交合成任务的ClipsParam参数'),
}(name='Template'),
}
model GetTemplateResponse = {
headers: map[string]string(name='headers'),
body: GetTemplateResponseBody(name='body'),
}
async function getTemplateWithOptions(request: GetTemplateRequest, runtime: Util.RuntimeOptions): GetTemplateResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetTemplate', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getTemplate(request: GetTemplateRequest): GetTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return getTemplateWithOptions(request, runtime);
}
model RegisterMediaInfoRequest {
inputURL?: string(name='InputURL', description='媒资媒体url'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签,如果有多个标签用逗号隔开'),
coverURL?: string(name='CoverURL', description='封面图,仅视频媒资有效'),
dynamicMetaDataList?: string(name='DynamicMetaDataList', description='用户自定义元数据'),
userData?: string(name='UserData', description='用户数据,最大1024字节'),
overwrite?: boolean(name='Overwrite', description='是否覆盖已有媒资'),
clientToken?: string(name='ClientToken', description='客户端token'),
registerConfig?: string(name='RegisterConfig', description='注册媒资的配置'),
}
model RegisterMediaInfoResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
mediaId?: string(name='MediaId', description='ICE媒资ID'),
}
model RegisterMediaInfoResponse = {
headers: map[string]string(name='headers'),
body: RegisterMediaInfoResponseBody(name='body'),
}
async function registerMediaInfoWithOptions(request: RegisterMediaInfoRequest, runtime: Util.RuntimeOptions): RegisterMediaInfoResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('RegisterMediaInfo', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function registerMediaInfo(request: RegisterMediaInfoRequest): RegisterMediaInfoResponse {
var runtime = new Util.RuntimeOptions{};
return registerMediaInfoWithOptions(request, runtime);
}
model CreateEditingProjectRequest {
title?: string(name='Title', description='云剪辑工程标题'),
description?: string(name='Description', description='云剪辑工程描述'),
timeline?: string(name='Timeline', description='云剪辑工程时间线,Json格式'),
coverURL?: string(name='CoverURL', description='云剪辑工程封面'),
materialMaps?: string(name='MaterialMaps', description='工程关联素材,多个素材以逗号(,)分隔;每种类型最多支持10个素材ID'),
businessConfig?: string(name='BusinessConfig', description='工程业务配置。如果是直播剪辑工程必填OutputMediaConfig.StorageLocation, Path 不填默认合成的直播片段存储在根路径下 OutputMediaTarget 不填默认oss-object,可以填vod-media 表示存储到vod OutputMediaTarget 为vod-media 时,Path不生效。'),
projectType?: string(name='ProjectType', description='剪辑工程类型,EditingProject: 普通剪辑工程;LiveEditingProject: 直播剪辑工程'),
}
model CreateEditingProjectResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
project?: {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
title?: string(name='Title', description='云剪辑工程标题'),
description?: string(name='Description', description='云剪辑工程描述'),
timeline?: string(name='Timeline', description='云剪辑工程时间线,Json格式'),
coverURL?: string(name='CoverURL', description='云剪辑工程封面。'),
status?: long(name='Status', description='云剪辑工程状态。 所有云剪辑工程状态列表: -1:Draft -2:Editing -3:Producing -4:Produced -5:ProduceFailed -7:Deleted'),
statusName?: string(name='StatusName', description='云剪辑状态名称,对应状态列表中状态名称。'),
createTime?: string(name='CreateTime', description='云剪辑工程创建时间'),
modifiedTime?: string(name='ModifiedTime', description='云剪辑工程编辑时间'),
duration?: float(name='Duration', description='云剪辑工程时长'),
createSource?: string(name='CreateSource', description='云剪辑工程创建方式 -OpenAPI -AliyunConsole -WebSDK -LiveEditingOpenAPI -LiveEditingConsole'),
modifiedSource?: string(name='ModifiedSource', description='云剪辑工程创建方式 -OpenAPI -AliyunConsole -WebSDK -LiveEditingOpenAPI -LiveEditingConsole'),
templateType?: string(name='TemplateType'),
businessConfig?: string(name='BusinessConfig', description='工程业务配置'),
projectType?: string(name='ProjectType', description='剪辑工程类型,EditingProject: 普通剪辑工程;LiveEditingProject: 直播剪辑工程'),
businessStatus?: string(name='BusinessStatus', description='业务状态,业务状态 /** 预约中 **/ RESERVING(0, "Reserving"), /** 预约取消 **/ RESERVATION_CANCELED(1, "ReservationCanceled"), /** 直播中 **/ BROADCASTING(3, "BroadCasting"), /** 加载失败 **/ LOADING_FAILED(4, "LoadingFailed"), /** 直播结束 **/ LIVE_FINISHED(5, "LiveFinished");'),
}(name='Project'),
}
model CreateEditingProjectResponse = {
headers: map[string]string(name='headers'),
body: CreateEditingProjectResponseBody(name='body'),
}
async function createEditingProjectWithOptions(request: CreateEditingProjectRequest, runtime: Util.RuntimeOptions): CreateEditingProjectResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('CreateEditingProject', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function createEditingProject(request: CreateEditingProjectRequest): CreateEditingProjectResponse {
var runtime = new Util.RuntimeOptions{};
return createEditingProjectWithOptions(request, runtime);
}
model BatchGetMediaInfosRequest {
mediaIds?: string(name='MediaIds'),
additionType?: string(name='AdditionType'),
}
model BatchGetMediaInfosResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
mediaInfos?: [
{
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
snapshots?: string(name='Snapshots', description='截图'),
status?: string(name='Status', description='资源状态'),
transcodeStatus?: string(name='TranscodeStatus', description='转码状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
spriteImages?: string(name='SpriteImages', description='雪碧图'),
}(name='MediaBasicInfo', description='BasicInfo'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
}
](name='FileInfoList', description='FileInfos'),
}
](name='MediaInfos', description='符合要求的媒资集合'),
}
model BatchGetMediaInfosResponse = {
headers: map[string]string(name='headers'),
body: BatchGetMediaInfosResponseBody(name='body'),
}
async function batchGetMediaInfosWithOptions(request: BatchGetMediaInfosRequest, runtime: Util.RuntimeOptions): BatchGetMediaInfosResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('BatchGetMediaInfos', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function batchGetMediaInfos(request: BatchGetMediaInfosRequest): BatchGetMediaInfosResponse {
var runtime = new Util.RuntimeOptions{};
return batchGetMediaInfosWithOptions(request, runtime);
}
model SetDefaultStorageLocationRequest {
storageType?: string(name='StorageType'),
bucket?: string(name='Bucket'),
path?: string(name='Path'),
}
model SetDefaultStorageLocationResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
success?: boolean(name='Success'),
}
model SetDefaultStorageLocationResponse = {
headers: map[string]string(name='headers'),
body: SetDefaultStorageLocationResponseBody(name='body'),
}
async function setDefaultStorageLocationWithOptions(request: SetDefaultStorageLocationRequest, runtime: Util.RuntimeOptions): SetDefaultStorageLocationResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SetDefaultStorageLocation', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function setDefaultStorageLocation(request: SetDefaultStorageLocationRequest): SetDefaultStorageLocationResponse {
var runtime = new Util.RuntimeOptions{};
return setDefaultStorageLocationWithOptions(request, runtime);
}
model UpdateMediaInfoRequest {
mediaId?: string(name='MediaId', description='媒资Id'),
inputURL?: string(name='InputURL', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签,如果有多个标签用逗号隔开'),
coverURL?: string(name='CoverURL', description='封面图,仅视频媒资有效'),
dynamicMetaDataList?: string(name='DynamicMetaDataList', description='用户自定义元数据'),
userData?: string(name='UserData', description='用户数据,最大1024字节'),
appendTags?: boolean(name='AppendTags', description='是否以append的形式更新Tags字段'),
appendDynamicMeta?: boolean(name='AppendDynamicMeta', description='是否以append的形式更新DynamicMetaDataList字段'),
}
model UpdateMediaInfoResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
mediaId?: string(name='MediaId', description='ICE媒资ID'),
}
model UpdateMediaInfoResponse = {
headers: map[string]string(name='headers'),
body: UpdateMediaInfoResponseBody(name='body'),
}
async function updateMediaInfoWithOptions(request: UpdateMediaInfoRequest, runtime: Util.RuntimeOptions): UpdateMediaInfoResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('UpdateMediaInfo', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function updateMediaInfo(request: UpdateMediaInfoRequest): UpdateMediaInfoResponse {
var runtime = new Util.RuntimeOptions{};
return updateMediaInfoWithOptions(request, runtime);
}
model GetMediaProducingJobRequest {
jobId?: string(name='JobId'),
}
model GetMediaProducingJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
mediaProducingJob?: {
jobId?: string(name='JobId'),
projectId?: string(name='ProjectId'),
mediaId?: string(name='MediaId'),
mediaURL?: string(name='MediaURL'),
timeline?: string(name='Timeline'),
templateId?: string(name='TemplateId'),
clipsParam?: string(name='ClipsParam'),
duration?: float(name='Duration'),
createTime?: string(name='CreateTime'),
completeTime?: string(name='CompleteTime'),
modifiedTime?: string(name='ModifiedTime'),
status?: string(name='Status'),
code?: string(name='Code'),
message?: string(name='Message'),
}(name='MediaProducingJob'),
}
model GetMediaProducingJobResponse = {
headers: map[string]string(name='headers'),
body: GetMediaProducingJobResponseBody(name='body'),
}
async function getMediaProducingJobWithOptions(request: GetMediaProducingJobRequest, runtime: Util.RuntimeOptions): GetMediaProducingJobResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetMediaProducingJob', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getMediaProducingJob(request: GetMediaProducingJobRequest): GetMediaProducingJobResponse {
var runtime = new Util.RuntimeOptions{};
return getMediaProducingJobWithOptions(request, runtime);
}
model DescribeIceProductStatusResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
ICEServiceAvaliable?: boolean(name='ICEServiceAvaliable'),
}
model DescribeIceProductStatusResponse = {
headers: map[string]string(name='headers'),
body: DescribeIceProductStatusResponseBody(name='body'),
}
async function describeIceProductStatusWithOptions(runtime: Util.RuntimeOptions): DescribeIceProductStatusResponse {
var req = new OpenApi.OpenApiRequest{};
return doRPCRequest('DescribeIceProductStatus', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function describeIceProductStatus(): DescribeIceProductStatusResponse {
var runtime = new Util.RuntimeOptions{};
return describeIceProductStatusWithOptions(runtime);
}
model GetLiveEditingIndexFileRequest {
appName?: string(name='AppName'),
domainName?: string(name='DomainName'),
streamName?: string(name='StreamName'),
projectId?: string(name='ProjectId'),
}
model GetLiveEditingIndexFileResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
indexFile?: string(name='IndexFile'),
}
model GetLiveEditingIndexFileResponse = {
headers: map[string]string(name='headers'),
body: GetLiveEditingIndexFileResponseBody(name='body'),
}
async function getLiveEditingIndexFileWithOptions(request: GetLiveEditingIndexFileRequest, runtime: Util.RuntimeOptions): GetLiveEditingIndexFileResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetLiveEditingIndexFile', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getLiveEditingIndexFile(request: GetLiveEditingIndexFileRequest): GetLiveEditingIndexFileResponse {
var runtime = new Util.RuntimeOptions{};
return getLiveEditingIndexFileWithOptions(request, runtime);
}
model ListMediaBasicInfosRequest {
startTime?: string(name='StartTime', description='创建时间'),
endTime?: string(name='EndTime', description='结束时间'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
category?: string(name='Category', description='分类'),
status?: string(name='Status', description='资源状态'),
nextToken?: string(name='NextToken', description='页号'),
maxResults?: int32(name='MaxResults', description='分页大小'),
sortBy?: string(name='SortBy', description='排序'),
includeFileBasicInfo?: boolean(name='IncludeFileBasicInfo', description='返回值中是否包含文件基础信息'),
}
model ListMediaBasicInfosResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
totalCount?: long(name='TotalCount', description='符合要求的媒资总数'),
mediaInfos?: [
{
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
snapshots?: string(name='Snapshots', description='截图'),
status?: string(name='Status', description='资源状态'),
transcodeStatus?: string(name='TranscodeStatus', description='转码状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
spriteImages?: string(name='SpriteImages', description='雪碧图'),
}(name='MediaBasicInfo', description='BasicInfo'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
}
](name='FileInfoList', description='FileInfos'),
}
](name='MediaInfos', description='符合要求的媒资集合'),
nextToken?: string(name='NextToken'),
maxResults?: int32(name='MaxResults'),
}
model ListMediaBasicInfosResponse = {
headers: map[string]string(name='headers'),
body: ListMediaBasicInfosResponseBody(name='body'),
}
async function listMediaBasicInfosWithOptions(request: ListMediaBasicInfosRequest, runtime: Util.RuntimeOptions): ListMediaBasicInfosResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('ListMediaBasicInfos', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function listMediaBasicInfos(request: ListMediaBasicInfosRequest): ListMediaBasicInfosResponse {
var runtime = new Util.RuntimeOptions{};
return listMediaBasicInfosWithOptions(request, runtime);
}
model SubmitSubtitleProduceJobRequest {
editingConfig?: string(name='EditingConfig'),
type?: string(name='Type'),
outputConfig?: string(name='OutputConfig'),
inputConfig?: string(name='InputConfig'),
isAsync?: long(name='IsAsync'),
title?: string(name='Title'),
description?: string(name='Description'),
userData?: string(name='UserData'),
}
model SubmitSubtitleProduceJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
}
model SubmitSubtitleProduceJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitSubtitleProduceJobResponseBody(name='body'),
}
async function submitSubtitleProduceJobWithOptions(request: SubmitSubtitleProduceJobRequest, runtime: Util.RuntimeOptions): SubmitSubtitleProduceJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitSubtitleProduceJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitSubtitleProduceJob(request: SubmitSubtitleProduceJobRequest): SubmitSubtitleProduceJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitSubtitleProduceJobWithOptions(request, runtime);
}
model SubmitKeyWordCutJobRequest {
keyword?: string(name='Keyword'),
inputFile?: string(name='InputFile'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
}
model SubmitKeyWordCutJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitKeyWordCutJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitKeyWordCutJobResponseBody(name='body'),
}
async function submitKeyWordCutJobWithOptions(request: SubmitKeyWordCutJobRequest, runtime: Util.RuntimeOptions): SubmitKeyWordCutJobResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('SubmitKeyWordCutJob', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function submitKeyWordCutJob(request: SubmitKeyWordCutJobRequest): SubmitKeyWordCutJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitKeyWordCutJobWithOptions(request, runtime);
}
model AddEditingProjectMaterialsRequest {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
materialMaps?: string(name='MaterialMaps', description='素材ID'),
}
model AddEditingProjectMaterialsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
projectId?: string(name='ProjectId'),
mediaInfos?: [
{
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
snapshots?: string(name='Snapshots', description='截图'),
status?: string(name='Status', description='资源状态'),
transcodeStatus?: string(name='TranscodeStatus', description='转码状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
spriteImages?: string(name='SpriteImages', description='雪碧图'),
}(name='MediaBasicInfo', description='BasicInfo'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
}
](name='FileInfoList', description='FileInfos'),
}
](name='MediaInfos', description='符合要求的媒资集合'),
liveMaterials?: [
{
appName?: string(name='AppName'),
streamName?: string(name='StreamName'),
domainName?: string(name='DomainName'),
liveUrl?: string(name='LiveUrl'),
}
](name='LiveMaterials'),
projectMaterials?: string(name='ProjectMaterials'),
}
model AddEditingProjectMaterialsResponse = {
headers: map[string]string(name='headers'),
body: AddEditingProjectMaterialsResponseBody(name='body'),
}
async function addEditingProjectMaterialsWithOptions(request: AddEditingProjectMaterialsRequest, runtime: Util.RuntimeOptions): AddEditingProjectMaterialsResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('AddEditingProjectMaterials', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function addEditingProjectMaterials(request: AddEditingProjectMaterialsRequest): AddEditingProjectMaterialsResponse {
var runtime = new Util.RuntimeOptions{};
return addEditingProjectMaterialsWithOptions(request, runtime);
}
model SubmitASRJobRequest {
inputFile?: string(name='InputFile'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
startTime?: string(name='StartTime', description='开始时间'),
duration?: string(name='Duration', description='持续时间'),
}
model SubmitASRJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitASRJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitASRJobResponseBody(name='body'),
}
async function submitASRJobWithOptions(request: SubmitASRJobRequest, runtime: Util.RuntimeOptions): SubmitASRJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitASRJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitASRJob(request: SubmitASRJobRequest): SubmitASRJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitASRJobWithOptions(request, runtime);
}
model GetEditingProjectRequest {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
}
model GetEditingProjectResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
project?: {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
title?: string(name='Title', description='云剪辑工程标题'),
timeline?: string(name='Timeline', description='云剪辑工程时间线'),
description?: string(name='Description', description='云剪辑工程描述'),
coverURL?: string(name='CoverURL', description='云剪辑工程封面'),
createTime?: string(name='CreateTime', description='云剪辑工程创建时间'),
modifiedTime?: string(name='ModifiedTime', description='云剪辑工程最新修改时间'),
duration?: long(name='Duration', description='云剪辑工程总时长'),
status?: string(name='Status', description='云剪辑工程状态'),
createSource?: string(name='CreateSource', description='云剪辑工程创建来源'),
templateType?: string(name='TemplateType', description='云剪辑工程模板类型'),
modifiedSource?: string(name='ModifiedSource', description='云剪辑工程修改来源'),
projectType?: string(name='ProjectType'),
businessConfig?: string(name='BusinessConfig'),
businessStatus?: string(name='BusinessStatus'),
}(name='Project'),
}
model GetEditingProjectResponse = {
headers: map[string]string(name='headers'),
body: GetEditingProjectResponseBody(name='body'),
}
async function getEditingProjectWithOptions(request: GetEditingProjectRequest, runtime: Util.RuntimeOptions): GetEditingProjectResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetEditingProject', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getEditingProject(request: GetEditingProjectRequest): GetEditingProjectResponse {
var runtime = new Util.RuntimeOptions{};
return getEditingProjectWithOptions(request, runtime);
}
model ListSysTemplatesRequest {
nextToken?: string(name='NextToken', description='标记当前开始读取的位置,置空表示从头开始'),
maxResults?: int32(name='MaxResults', description='本次读取的最大数据记录数量'),
type?: string(name='Type'),
}
model ListSysTemplatesResponseBody = {
totalCount?: int32(name='TotalCount', description='TotalCount本次请求条件下的数据总量,此参数为可选参数,默认可不返回'),
requestId?: string(name='RequestId', description='Id of the request'),
nextToken?: string(name='NextToken', description='表示当前调用返回读取到的位置,空代表数据已经读取完毕'),
maxResults?: int32(name='MaxResults', description='MaxResults本次请求所返回的最大记录条数'),
templates?: [
{
templateId?: string(name='TemplateId'),
name?: string(name='Name'),
type?: string(name='Type'),
config?: string(name='Config'),
}
](name='Templates'),
}
model ListSysTemplatesResponse = {
headers: map[string]string(name='headers'),
body: ListSysTemplatesResponseBody(name='body'),
}
async function listSysTemplatesWithOptions(request: ListSysTemplatesRequest, runtime: Util.RuntimeOptions): ListSysTemplatesResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('ListSysTemplates', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function listSysTemplates(request: ListSysTemplatesRequest): ListSysTemplatesResponse {
var runtime = new Util.RuntimeOptions{};
return listSysTemplatesWithOptions(request, runtime);
}
model DeleteTemplateRequest {
templateIds?: string(name='TemplateIds', description='模板id,多个id用英文逗号隔开'),
}
model DeleteTemplateResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
}
model DeleteTemplateResponse = {
headers: map[string]string(name='headers'),
body: DeleteTemplateResponseBody(name='body'),
}
async function deleteTemplateWithOptions(request: DeleteTemplateRequest, runtime: Util.RuntimeOptions): DeleteTemplateResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('DeleteTemplate', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function deleteTemplate(request: DeleteTemplateRequest): DeleteTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return deleteTemplateWithOptions(request, runtime);
}
model SubmitIRJobRequest {
inputFile?: string(name='InputFile'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
}
model SubmitIRJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitIRJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitIRJobResponseBody(name='body'),
}
async function submitIRJobWithOptions(request: SubmitIRJobRequest, runtime: Util.RuntimeOptions): SubmitIRJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitIRJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitIRJob(request: SubmitIRJobRequest): SubmitIRJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitIRJobWithOptions(request, runtime);
}
model DeleteEditingProjectMaterialsRequest {
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
materialIds?: string(name='MaterialIds', description='素材ID'),
materialType?: string(name='MaterialType', description='素材类型'),
}
model DeleteEditingProjectMaterialsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
}
model DeleteEditingProjectMaterialsResponse = {
headers: map[string]string(name='headers'),
body: DeleteEditingProjectMaterialsResponseBody(name='body'),
}
async function deleteEditingProjectMaterialsWithOptions(request: DeleteEditingProjectMaterialsRequest, runtime: Util.RuntimeOptions): DeleteEditingProjectMaterialsResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('DeleteEditingProjectMaterials', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function deleteEditingProjectMaterials(request: DeleteEditingProjectMaterialsRequest): DeleteEditingProjectMaterialsResponse {
var runtime = new Util.RuntimeOptions{};
return deleteEditingProjectMaterialsWithOptions(request, runtime);
}
model SearchEditingProjectRequest {
startTime?: string(name='StartTime', description='CreateTime(创建时间)的开始时间'),
endTime?: string(name='EndTime', description='CreationTime(创建时间)的结束时间'),
status?: string(name='Status', description='云剪辑工程状态。多个用逗号分隔'),
sortBy?: string(name='SortBy', description='结果排序方式'),
nextToken?: string(name='NextToken', description='分页参数'),
maxResults?: long(name='MaxResults', description='分页参数'),
createSource?: string(name='CreateSource', description='创建来源'),
templateType?: string(name='TemplateType', description='模板类型'),
projectType?: string(name='ProjectType'),
}
model SearchEditingProjectResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
projectList?: [
{
projectId?: string(name='ProjectId', description='云剪辑工程ID'),
title?: string(name='Title', description='云剪辑工程标题'),
timeline?: string(name='Timeline', description='云剪辑工程时间线'),
description?: string(name='Description', description='云剪辑工程描述'),
coverURL?: string(name='CoverURL', description='云剪辑工程封面'),
createTime?: string(name='CreateTime', description='云剪辑工程创建时间'),
modifiedTime?: string(name='ModifiedTime', description='云剪辑工程最新修改时间'),
duration?: long(name='Duration', description='云剪辑工程总时长'),
status?: string(name='Status', description='云剪辑工程状态'),
errorCode?: string(name='ErrorCode', description='云剪辑工程合成失败的错误码'),
errorMessage?: string(name='ErrorMessage', description='云剪辑工程合成失败的消息'),
createSource?: string(name='CreateSource', description='创建来源'),
modifiedSource?: string(name='ModifiedSource', description='最后一次修改来源'),
templateType?: string(name='TemplateType', description='模板类型'),
projectType?: string(name='ProjectType'),
businessConfig?: string(name='BusinessConfig'),
businessStatus?: string(name='BusinessStatus'),
}
](name='ProjectList', description='云剪辑工程列表'),
maxResults?: long(name='MaxResults', description='云剪辑工程总数'),
totalCount?: long(name='TotalCount'),
nextToken?: string(name='NextToken'),
}
model SearchEditingProjectResponse = {
headers: map[string]string(name='headers'),
body: SearchEditingProjectResponseBody(name='body'),
}
async function searchEditingProjectWithOptions(request: SearchEditingProjectRequest, runtime: Util.RuntimeOptions): SearchEditingProjectResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SearchEditingProject', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function searchEditingProject(request: SearchEditingProjectRequest): SearchEditingProjectResponse {
var runtime = new Util.RuntimeOptions{};
return searchEditingProjectWithOptions(request, runtime);
}
model ListTemplatesRequest {
type?: string(name='Type', description='模板类型'),
status?: string(name='Status', description='模板状态'),
createSource?: string(name='CreateSource', description='创建来源'),
keyword?: string(name='Keyword', description='搜索关键词,可以根据模板id和title搜索'),
sortType?: string(name='SortType', description='排序参数,默认根据创建时间倒序'),
}
model ListTemplatesResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。'),
templates?: [
{
templateId?: string(name='TemplateId', description='模板ID'),
name?: string(name='Name', description='模板名称'),
type?: string(name='Type', description='模板类型'),
config?: string(name='Config', description='模板配置'),
previewMedia?: string(name='PreviewMedia', description='预览素材'),
status?: string(name='Status', description='模板状态'),
createSource?: string(name='CreateSource', description='创建来源'),
modifiedSource?: string(name='ModifiedSource', description='修改来源'),
previewMediaStatus?: string(name='PreviewMediaStatus', description='预览素材状态'),
creationTime?: string(name='CreationTime', description='创建时间'),
modifiedTime?: string(name='ModifiedTime', description='修改时间'),
coverURL?: string(name='CoverURL', description='封面URL'),
clipsParam?: string(name='ClipsParam', description='ClipsParam'),
}
](name='Templates'),
}
model ListTemplatesResponse = {
headers: map[string]string(name='headers'),
body: ListTemplatesResponseBody(name='body'),
}
async function listTemplatesWithOptions(request: ListTemplatesRequest, runtime: Util.RuntimeOptions): ListTemplatesResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('ListTemplates', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function listTemplates(request: ListTemplatesRequest): ListTemplatesResponse {
var runtime = new Util.RuntimeOptions{};
return listTemplatesWithOptions(request, runtime);
}
model DeleteEditingProjectsRequest {
projectIds?: string(name='ProjectIds', description='云剪辑工程ID。支持多个云剪辑工程,以逗号分隔。'),
}
model DeleteEditingProjectsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
}
model DeleteEditingProjectsResponse = {
headers: map[string]string(name='headers'),
body: DeleteEditingProjectsResponseBody(name='body'),
}
async function deleteEditingProjectsWithOptions(request: DeleteEditingProjectsRequest, runtime: Util.RuntimeOptions): DeleteEditingProjectsResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('DeleteEditingProjects', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function deleteEditingProjects(request: DeleteEditingProjectsRequest): DeleteEditingProjectsResponse {
var runtime = new Util.RuntimeOptions{};
return deleteEditingProjectsWithOptions(request, runtime);
}
model GetMediaInfoRequest {
mediaId?: string(name='MediaId'),
inputURL?: string(name='InputURL'),
outputType?: string(name='OutputType'),
}
model GetMediaInfoResponseBody = {
requestId?: string(name='RequestId', description='RequestId'),
mediaInfo?: {
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
status?: string(name='Status', description='资源状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
spriteImages?: string(name='SpriteImages', description='雪碧图'),
}(name='MediaBasicInfo', description='BasicInfo'),
dynamicMetaDataList?: [
{
in?: float(name='In', description='开始时间'),
out?: float(name='Out', description='结束时间'),
type?: string(name='Type', description='类型'),
data?: string(name='Data', description='元数据json string'),
}
](name='DynamicMetaDataList', description='其他元数据'),
aiRoughDataList?: [
{
type?: string(name='Type', description='AI类型'),
result?: string(name='Result', description='AI原始结果'),
}
](name='AiRoughDataList', description='AIMetadata'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
audioStreamInfoList?: [
{
index?: string(name='Index', description='音频流序号'),
codecName?: string(name='CodecName', description='编码格式简述名'),
codecLongName?: string(name='CodecLongName', description='编码格式长述名'),
codecTimeBase?: string(name='CodecTimeBase', description='编码时基'),
codecTagString?: string(name='CodecTagString', description='编码格式标记文本'),
codecTag?: string(name='CodecTag', description='编码格式标记'),
profile?: string(name='Profile', description='编码预置'),
sampleFmt?: string(name='SampleFmt', description='采样格式'),
sampleRate?: string(name='SampleRate', description='采样率'),
channels?: string(name='Channels', description='声道数'),
channelLayout?: string(name='ChannelLayout', description='声道输出样式'),
timebase?: string(name='Timebase', description='时基'),
startTime?: string(name='StartTime', description='起始时间'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
fps?: string(name='Fps', description='音频帧率'),
numFrames?: string(name='NumFrames', description='总帧数'),
lang?: string(name='Lang', description='语言'),
}
](name='AudioStreamInfoList', description='音频流信息,一个媒资可能有多条音频流'),
videoStreamInfoList?: [
{
index?: string(name='Index', description='视频流序号'),
codecName?: string(name='CodecName', description='编码格式简述名'),
codecLongName?: string(name='CodecLongName', description='编码格式长述名'),
profile?: string(name='Profile', description='编码预置'),
codecTimeBase?: string(name='CodecTimeBase', description='编码时基'),
codecTagString?: string(name='CodecTagString', description='编码格式标记文本'),
codecTag?: string(name='CodecTag', description='编码格式标记'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
hasBFrames?: string(name='HasBFrames', description='是否有B帧'),
sar?: string(name='Sar', description='编码信号分辨率比'),
dar?: string(name='Dar', description='编码显示分辨率比'),
pixFmt?: string(name='PixFmt', description='像素格式'),
level?: string(name='Level', description='编码等级'),
fps?: string(name='Fps', description='视频帧率'),
avgFPS?: string(name='AvgFPS', description='平均帧率'),
timebase?: string(name='Timebase', description='时基'),
startTime?: string(name='StartTime', description='起始时间'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
numFrames?: string(name='NumFrames', description='总帧数'),
lang?: string(name='Lang', description='语言'),
rotate?: string(name='Rotate', description='旋转'),
nbFrames?: string(name='Nb_frames', description='总帧数'),
}
](name='VideoStreamInfoList', description='视频流信息,一个媒资可能有多条视频流'),
subtitleStreamInfoList?: [
{
index?: string(name='Index', description='音频流序号'),
codecName?: string(name='CodecName', description='编码格式简述名'),
codecLongName?: string(name='CodecLongName', description='编码格式长述名'),
codecTimeBase?: string(name='CodecTimeBase', description='编码时基'),
codecTagString?: string(name='CodecTagString', description='编码格式标记文本'),
codecTag?: string(name='CodecTag', description='编码格式标记'),
timebase?: string(name='Timebase', description='时基'),
startTime?: string(name='StartTime', description='起始时间'),
duration?: string(name='Duration', description='时长'),
lang?: string(name='Lang', description='语言'),
}
](name='SubtitleStreamInfoList', description='字幕流信息,一个媒资可能有多条字幕流'),
}
](name='FileInfoList', description='FileInfos'),
}(name='MediaInfo'),
}
model GetMediaInfoResponse = {
headers: map[string]string(name='headers'),
body: GetMediaInfoResponseBody(name='body'),
}
async function getMediaInfoWithOptions(request: GetMediaInfoRequest, runtime: Util.RuntimeOptions): GetMediaInfoResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('GetMediaInfo', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function getMediaInfo(request: GetMediaInfoRequest): GetMediaInfoResponse {
var runtime = new Util.RuntimeOptions{};
return getMediaInfoWithOptions(request, runtime);
}
model SubmitSmartJobRequest {
editingConfig?: string(name='EditingConfig'),
outputConfig?: string(name='OutputConfig'),
inputConfig?: string(name='InputConfig'),
title?: string(name='Title'),
description?: string(name='Description'),
userData?: string(name='UserData'),
jobType?: string(name='JobType'),
}
model SubmitSmartJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
}
model SubmitSmartJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitSmartJobResponseBody(name='body'),
}
async function submitSmartJobWithOptions(request: SubmitSmartJobRequest, runtime: Util.RuntimeOptions): SubmitSmartJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitSmartJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitSmartJob(request: SubmitSmartJobRequest): SubmitSmartJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitSmartJobWithOptions(request, runtime);
}
model SubmitDelogoJobRequest {
inputFile?: string(name='InputFile', description='输入文件'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
outputConfig?: string(name='OutputConfig', description='输出bucket'),
inputType?: string(name='InputType', description='输入文件类型'),
overwrite?: boolean(name='Overwrite', description='是否强制覆盖现有OSS文件'),
outputMediaTarget?: string(name='OutputMediaTarget', description='输出类型'),
}
model SubmitDelogoJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitDelogoJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitDelogoJobResponseBody(name='body'),
}
async function submitDelogoJobWithOptions(request: SubmitDelogoJobRequest, runtime: Util.RuntimeOptions): SubmitDelogoJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitDelogoJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitDelogoJob(request: SubmitDelogoJobRequest): SubmitDelogoJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitDelogoJobWithOptions(request, runtime);
}
model UpdateTemplateRequest {
templateId?: string(name='TemplateId', description='模板ID'),
name?: string(name='Name', description='模板名称'),
config?: string(name='Config', description='参见Timeline模板Config文档'),
coverUrl?: string(name='CoverUrl', description='模板封面'),
previewMedia?: string(name='PreviewMedia', description='预览视频媒资id'),
status?: string(name='Status', description='模板状态'),
source?: string(name='Source', description='修改来源,默认OpenAPI'),
}
model UpdateTemplateResponseBody = {
requestId?: string(name='RequestId', description='请求ID'),
}
model UpdateTemplateResponse = {
headers: map[string]string(name='headers'),
body: UpdateTemplateResponseBody(name='body'),
}
async function updateTemplateWithOptions(request: UpdateTemplateRequest, runtime: Util.RuntimeOptions): UpdateTemplateResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('UpdateTemplate', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function updateTemplate(request: UpdateTemplateRequest): UpdateTemplateResponse {
var runtime = new Util.RuntimeOptions{};
return updateTemplateWithOptions(request, runtime);
}
model SubmitAudioProduceJobRequest {
editingConfig?: string(name='EditingConfig'),
outputConfig?: string(name='OutputConfig'),
inputConfig?: string(name='InputConfig'),
title?: string(name='Title'),
description?: string(name='Description'),
userData?: string(name='UserData'),
overwrite?: boolean(name='Overwrite'),
}
model SubmitAudioProduceJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId', description='任务ID'),
state?: string(name='State', description='任务状态'),
}
model SubmitAudioProduceJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitAudioProduceJobResponseBody(name='body'),
}
async function submitAudioProduceJobWithOptions(request: SubmitAudioProduceJobRequest, runtime: Util.RuntimeOptions): SubmitAudioProduceJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitAudioProduceJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitAudioProduceJob(request: SubmitAudioProduceJobRequest): SubmitAudioProduceJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitAudioProduceJobWithOptions(request, runtime);
}
model SubmitMediaProducingJobRequest {
projectId?: string(name='ProjectId'),
timeline?: string(name='Timeline'),
templateId?: string(name='TemplateId'),
clipsParam?: string(name='ClipsParam'),
projectMetadata?: string(name='ProjectMetadata'),
outputMediaTarget?: string(name='OutputMediaTarget'),
outputMediaConfig?: string(name='OutputMediaConfig'),
userData?: string(name='UserData'),
clientToken?: string(name='ClientToken'),
source?: string(name='Source'),
}
model SubmitMediaProducingJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
projectId?: string(name='ProjectId', description='剪辑工程Id'),
jobId?: string(name='JobId', description='合成作业Id'),
mediaId?: string(name='MediaId', description='合成媒资Id'),
}
model SubmitMediaProducingJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitMediaProducingJobResponseBody(name='body'),
}
async function submitMediaProducingJobWithOptions(request: SubmitMediaProducingJobRequest, runtime: Util.RuntimeOptions): SubmitMediaProducingJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitMediaProducingJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitMediaProducingJob(request: SubmitMediaProducingJobRequest): SubmitMediaProducingJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitMediaProducingJobWithOptions(request, runtime);
}
model UpdateSmartJobRequest {
jobId?: string(name='JobId'),
FEExtend?: string(name='FEExtend'),
}
model UpdateSmartJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
FEExtend?: string(name='FEExtend'),
}
model UpdateSmartJobResponse = {
headers: map[string]string(name='headers'),
body: UpdateSmartJobResponseBody(name='body'),
}
async function updateSmartJobWithOptions(request: UpdateSmartJobRequest, runtime: Util.RuntimeOptions): UpdateSmartJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('UpdateSmartJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function updateSmartJob(request: UpdateSmartJobRequest): UpdateSmartJobResponse {
var runtime = new Util.RuntimeOptions{};
return updateSmartJobWithOptions(request, runtime);
}
model ListAllPublicMediaTagsRequest {
businessType?: string(name='BusinessType', description='媒资业务类型'),
}
model ListAllPublicMediaTagsResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
mediaTagList?: [
{
mediaTagId?: string(name='MediaTagId', description='素材标签id'),
mediaTagNameChinese?: string(name='MediaTagNameChinese', description='素材标签中文名'),
mediaTagNameEnglish?: string(name='MediaTagNameEnglish', description='素材标签英文名'),
}
](name='MediaTagList', description='公共素材库标签列表'),
}
model ListAllPublicMediaTagsResponse = {
headers: map[string]string(name='headers'),
body: ListAllPublicMediaTagsResponseBody(name='body'),
}
async function listAllPublicMediaTagsWithOptions(request: ListAllPublicMediaTagsRequest, runtime: Util.RuntimeOptions): ListAllPublicMediaTagsResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('ListAllPublicMediaTags', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function listAllPublicMediaTags(request: ListAllPublicMediaTagsRequest): ListAllPublicMediaTagsResponse {
var runtime = new Util.RuntimeOptions{};
return listAllPublicMediaTagsWithOptions(request, runtime);
}
model SubmitMattingJobRequest {
inputFile?: string(name='InputFile', description='输入文件'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
outputConfig?: string(name='OutputConfig', description='输出bucket'),
inputType?: string(name='InputType', description='输入文件类型'),
overwrite?: string(name='Overwrite', description='是否强制覆盖现有OSS文件'),
outputMediaTarget?: string(name='OutputMediaTarget', description='输出类型'),
}
model SubmitMattingJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitMattingJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitMattingJobResponseBody(name='body'),
}
async function submitMattingJobWithOptions(request: SubmitMattingJobRequest, runtime: Util.RuntimeOptions): SubmitMattingJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitMattingJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitMattingJob(request: SubmitMattingJobRequest): SubmitMattingJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitMattingJobWithOptions(request, runtime);
}
model GetEventCallbackResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
callbackQueueName?: string(name='CallbackQueueName'),
eventTypeList?: string(name='EventTypeList'),
}
model GetEventCallbackResponse = {
headers: map[string]string(name='headers'),
body: GetEventCallbackResponseBody(name='body'),
}
async function getEventCallbackWithOptions(runtime: Util.RuntimeOptions): GetEventCallbackResponse {
var req = new OpenApi.OpenApiRequest{};
return doRPCRequest('GetEventCallback', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function getEventCallback(): GetEventCallbackResponse {
var runtime = new Util.RuntimeOptions{};
return getEventCallbackWithOptions(runtime);
}
model ListPublicMediaBasicInfosRequest {
mediaTagId?: string(name='MediaTagId', description='标签'),
nextToken?: string(name='NextToken', description='下一次读取的位置'),
maxResults?: int32(name='MaxResults', description='分页大小'),
includeFileBasicInfo?: boolean(name='IncludeFileBasicInfo', description='返回值中是否包含文件基础信息'),
}
model ListPublicMediaBasicInfosResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
totalCount?: long(name='TotalCount', description='符合要求的媒资总数'),
mediaInfos?: [
{
mediaId?: string(name='MediaId', description='媒资ID'),
mediaBasicInfo?: {
mediaId?: string(name='MediaId', description='MediaId'),
inputURL?: string(name='InputURL', description='待注册的媒资在相应系统中的地址'),
mediaType?: string(name='MediaType', description='媒资媒体类型'),
businessType?: string(name='BusinessType', description='媒资业务类型'),
source?: string(name='Source', description='来源'),
title?: string(name='Title', description='标题'),
description?: string(name='Description', description='内容描述'),
category?: string(name='Category', description='分类'),
mediaTags?: string(name='MediaTags', description='标签'),
coverURL?: string(name='CoverURL', description='封面地址'),
userData?: string(name='UserData', description='用户数据'),
snapshots?: string(name='Snapshots', description='截图'),
status?: string(name='Status', description='资源状态'),
transcodeStatus?: string(name='TranscodeStatus', description='转码状态'),
createTime?: string(name='CreateTime', description='媒资创建时间'),
modifiedTime?: string(name='ModifiedTime', description='媒资修改时间'),
deletedTime?: string(name='DeletedTime', description='媒资删除时间'),
}(name='MediaBasicInfo', description='BasicInfo'),
fileInfoList?: [
{
fileBasicInfo?: {
fileName?: string(name='FileName', description='文件名'),
fileStatus?: string(name='FileStatus', description='文件状态'),
fileType?: string(name='FileType', description='文件类型'),
fileSize?: string(name='FileSize', description='文件大小(字节)'),
fileUrl?: string(name='FileUrl', description='文件oss地址'),
region?: string(name='Region', description='文件存储区域'),
formatName?: string(name='FormatName', description='封装格式'),
duration?: string(name='Duration', description='时长'),
bitrate?: string(name='Bitrate', description='码率'),
width?: string(name='Width', description='宽'),
height?: string(name='Height', description='高'),
}(name='FileBasicInfo', description='文件基础信息,包含时长,大小等'),
}
](name='FileInfoList', description='FileInfos'),
}
](name='MediaInfos', description='符合要求的媒资集合'),
nextToken?: string(name='NextToken'),
maxResults?: int32(name='MaxResults'),
}
model ListPublicMediaBasicInfosResponse = {
headers: map[string]string(name='headers'),
body: ListPublicMediaBasicInfosResponseBody(name='body'),
}
async function listPublicMediaBasicInfosWithOptions(request: ListPublicMediaBasicInfosRequest, runtime: Util.RuntimeOptions): ListPublicMediaBasicInfosResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('ListPublicMediaBasicInfos', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function listPublicMediaBasicInfos(request: ListPublicMediaBasicInfosRequest): ListPublicMediaBasicInfosResponse {
var runtime = new Util.RuntimeOptions{};
return listPublicMediaBasicInfosWithOptions(request, runtime);
}
model SubmitCoverJobRequest {
inputFile?: string(name='InputFile', description='输入文件'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
outputConfig?: string(name='OutputConfig', description='输出bucket'),
}
model SubmitCoverJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitCoverJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitCoverJobResponseBody(name='body'),
}
async function submitCoverJobWithOptions(request: SubmitCoverJobRequest, runtime: Util.RuntimeOptions): SubmitCoverJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitCoverJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitCoverJob(request: SubmitCoverJobRequest): SubmitCoverJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitCoverJobWithOptions(request, runtime);
}
model GetSmartHandleJobRequest {
jobId?: string(name='JobId'),
withAiResult?: string(name='WithAiResult'),
}
model GetSmartHandleJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
FEExtend?: string(name='FEExtend'),
smartJobInfo?: {
title?: string(name='Title'),
description?: string(name='Description'),
userId?: string(name='UserId'),
editingConfig?: string(name='EditingConfig'),
inputConfig?: {
inputFile?: string(name='InputFile'),
jobParameters?: string(name='JobParameters'),
}(name='InputConfig'),
outputConfig?: {
bucket?: string(name='Bucket'),
object?: string(name='Object'),
}(name='OutputConfig'),
createTime?: string(name='CreateTime'),
modifiedTime?: string(name='ModifiedTime'),
jobType?: string(name='JobType'),
}(name='SmartJobInfo'),
}
model GetSmartHandleJobResponse = {
headers: map[string]string(name='headers'),
body: GetSmartHandleJobResponseBody(name='body'),
}
async function getSmartHandleJobWithOptions(request: GetSmartHandleJobRequest, runtime: Util.RuntimeOptions): GetSmartHandleJobResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('GetSmartHandleJob', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function getSmartHandleJob(request: GetSmartHandleJobRequest): GetSmartHandleJobResponse {
var runtime = new Util.RuntimeOptions{};
return getSmartHandleJobWithOptions(request, runtime);
}
model SubmitH2VJobRequest {
inputFile?: string(name='InputFile', description='输入文件'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
outputConfig?: string(name='OutputConfig', description='输出bucket'),
inputType?: string(name='InputType', description='输入文件类型'),
overwrite?: boolean(name='Overwrite', description='是否强制覆盖现有OSS文件'),
outputMediaTarget?: string(name='OutputMediaTarget', description='输出类型'),
}
model SubmitH2VJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitH2VJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitH2VJobResponseBody(name='body'),
}
async function submitH2VJobWithOptions(request: SubmitH2VJobRequest, runtime: Util.RuntimeOptions): SubmitH2VJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitH2VJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitH2VJob(request: SubmitH2VJobRequest): SubmitH2VJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitH2VJobWithOptions(request, runtime);
}
model SubmitLiveEditingJobRequest {
clips?: string(name='Clips'),
projectId?: string(name='ProjectId'),
liveStreamConfig?: string(name='LiveStreamConfig'),
outputMediaConfig?: string(name='OutputMediaConfig'),
mediaProduceConfig?: string(name='MediaProduceConfig'),
userData?: string(name='UserData'),
outputMediaTarget?: string(name='OutputMediaTarget'),
}
model SubmitLiveEditingJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
projectId?: string(name='ProjectId'),
jobId?: string(name='JobId'),
mediaId?: string(name='MediaId'),
mediaURL?: string(name='MediaURL'),
}
model SubmitLiveEditingJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitLiveEditingJobResponseBody(name='body'),
}
async function submitLiveEditingJobWithOptions(request: SubmitLiveEditingJobRequest, runtime: Util.RuntimeOptions): SubmitLiveEditingJobResponse {
Util.validateModel(request);
var req = new OpenApi.OpenApiRequest{
body = Util.toMap(request),
};
return doRPCRequest('SubmitLiveEditingJob', '2020-11-09', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}
async function submitLiveEditingJob(request: SubmitLiveEditingJobRequest): SubmitLiveEditingJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitLiveEditingJobWithOptions(request, runtime);
}
model SubmitPPTCutJobRequest {
inputFile?: string(name='InputFile'),
userData?: string(name='UserData'),
title?: string(name='Title'),
description?: string(name='Description'),
}
model SubmitPPTCutJobResponseBody = {
requestId?: string(name='RequestId', description='Id of the request'),
jobId?: string(name='JobId'),
output?: string(name='Output'),
state?: string(name='State'),
userData?: string(name='UserData'),
}
model SubmitPPTCutJobResponse = {
headers: map[string]string(name='headers'),
body: SubmitPPTCutJobResponseBody(name='body'),
}
async function submitPPTCutJobWithOptions(request: SubmitPPTCutJobRequest, runtime: Util.RuntimeOptions): SubmitPPTCutJobResponse {
Util.validateModel(request);
var query = OpenApiUtil.query(Util.toMap(request));
var req = new OpenApi.OpenApiRequest{
query = query,
};
return doRPCRequest('SubmitPPTCutJob', '2020-11-09', 'HTTPS', 'GET', 'AK', 'json', req, runtime);
}
async function submitPPTCutJob(request: SubmitPPTCutJobRequest): SubmitPPTCutJobResponse {
var runtime = new Util.RuntimeOptions{};
return submitPPTCutJobWithOptions(request, runtime);
}
| Tea | 5 | aliyun/alibabacloud-sdk | ice-20201109/main.tea | [
"Apache-2.0"
] |
oauth.consumerKey=//TODO
oauth.consumerSecret=//TODO
oauth.accessToken=//TODO
oauth.accessTokenSecret=//TODO
| INI | 0 | zeesh49/tutorials | Twitter4J/src/main/resources/twitter4j.properties | [
"MIT"
] |
ruleset io.picolabs.execution-order2 {
meta {
shares getOrder
}
global {
getOrder = function(){
ent:order;
}
}
rule reset_order {
select when execution_order reset_order
send_directive("2 - reset_order");
always {
ent:order := []
}
}
rule foo_or_bar {
select when execution_order foo
or
execution_order bar
send_directive("2 - foo_or_bar");
always {
ent:order := ent:order.append("2 - foo_or_bar")
}
}
rule foo {
select when execution_order foo
send_directive("2 - foo");
always {
ent:order := ent:order.append("2 - foo")
}
}
rule bar {
select when execution_order bar
send_directive("2 - bar");
always {
ent:order := ent:order.append("2 - bar")
}
}
}
| KRL | 4 | CambodianCoder/pico-engine | test-rulesets/execution-order2.krl | [
"MIT"
] |
#import <ATen/native/metal/MetalCommandBuffer.h>
#import <ATen/native/metal/MetalTensorUtils.h>
#import <ATen/native/metal/MetalContext.h>
#import <ATen/native/metal/mpscnn/MPSCNNUtils.h>
#import <ATen/native/metal/mpscnn/MPSImage+Tensor.h>
#import <ATen/native/metal/mpscnn/MPSImageUtils.h>
#import <ATen/native/metal/mpscnn/MPSImageWrapper.h>
using namespace at::native::metal;
@interface MPSImageWrapperTrampoline : NSObject<PTMetalCommandBuffer>
+ (instancetype)newWithMPSImageWrapper:(MPSImageWrapper*)wrapper;
@end
@implementation MPSImageWrapperTrampoline {
MPSImageWrapper* _imageWrapper;
}
+ (instancetype)newWithMPSImageWrapper:(MPSImageWrapper*)wrapper {
MPSImageWrapperTrampoline* trampoline = [MPSImageWrapperTrampoline new];
trampoline->_imageWrapper = wrapper;
return trampoline;
}
- (void)dealloc {
_imageWrapper = nullptr;
}
- (void)beginSynchronization {
if (_imageWrapper) {
_imageWrapper->prepare();
}
}
- (void)endSynchronization:(NSError*)error {
if (error) {
if (_imageWrapper) {
_imageWrapper->release();
}
// throw exceptions if we failed to flush the command buffer
TORCH_CHECK(error);
}
}
@end
namespace at {
namespace native {
namespace metal {
MPSImageWrapper::MPSImageWrapper(IntArrayRef sizes) {
_imageSizes = computeImageSize(sizes);
_delegate = [MPSImageWrapperTrampoline newWithMPSImageWrapper:this];
}
MPSImageWrapper::~MPSImageWrapper() {
release();
}
void MPSImageWrapper::copyDataFromHost(const float* inputData) {
TORCH_CHECK(inputData);
_commandBuffer = [MetalCommandBuffer currentBuffer];
[_commandBuffer addSubscriber:_delegate];
_image = createTemporaryImage(_commandBuffer, _imageSizes, inputData);
}
void MPSImageWrapper::copyDataToHost(float* hostData) {
TORCH_CHECK(_image);
synchronize();
TORCH_CHECK(_buffer);
memcpy(hostData, _buffer.contents, _buffer.length);
}
MPSImage* MPSImageWrapper::image() const {
return _image;
}
id<MTLBuffer> MPSImageWrapper::buffer() const {
return _buffer;
}
void MPSImageWrapper::setCommandBuffer(MetalCommandBuffer* commandBuffer) {
TORCH_CHECK(commandBuffer && commandBuffer.valid);
_commandBuffer = commandBuffer;
[_commandBuffer addSubscriber:_delegate];
}
MetalCommandBuffer* MPSImageWrapper::commandBuffer() const {
return _commandBuffer;
}
void MPSImageWrapper::allocateStorage(IntArrayRef sizes) {
_imageSizes = computeImageSize(sizes);
_image = createStaticImage(_imageSizes);
}
void MPSImageWrapper::allocateTemporaryStorage(
IntArrayRef sizes,
MetalCommandBuffer* commandBuffer) {
setCommandBuffer(commandBuffer);
_imageSizes = computeImageSize(sizes);
_image = createTemporaryImage(commandBuffer, _imageSizes);
}
void MPSImageWrapper::setImage(MPSImage* image) {
TORCH_CHECK(image);
if (image.isTemporaryImage) {
TORCH_CHECK(_commandBuffer && _commandBuffer.valid);
}
_image = image;
}
void MPSImageWrapper::prepare() {
if (!_buffer) {
int64_t size_bytes = c10::multiply_integers([_image sizes]) * sizeof(float);
_buffer = [[MetalContext sharedInstance].device
newBufferWithLength:size_bytes
options:MTLResourceCPUCacheModeWriteCombined];
TORCH_CHECK(_buffer, "Allocate GPU memory failed!");
}
copyImageToMetalBuffer(_commandBuffer, _buffer, _image);
if (_image.isTemporaryImage && _image.readCount != 0) {
_image =
createStaticImage((MPSTemporaryImage*)_image, _commandBuffer, false);
}
}
void MPSImageWrapper::synchronize() {
if (_commandBuffer && _commandBuffer.valid) {
[_commandBuffer commit];
}
}
void MPSImageWrapper::release() {
[_image recycle];
[_commandBuffer remove:(MPSTemporaryImage*)_image];
[_commandBuffer removeSubscriber:_delegate];
_delegate = nil;
_commandBuffer = nil;
_image = nil;
_buffer = nil;
}
}
}
}
| Objective-C++ | 4 | Hacky-DH/pytorch | aten/src/ATen/native/metal/mpscnn/MPSImageWrapper.mm | [
"Intel"
] |
--TEST--
Bug #41970 (call_user_func_*() leaks on failure)
--FILE--
<?php
$a = array(4,3,2);
var_dump(call_user_func_array("sort", array($a)));
try {
var_dump(call_user_func_array("strlen", array($a)));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
var_dump(call_user_func("sort", $a));
try {
var_dump(call_user_func("strlen", $a));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
echo "Done\n";
?>
--EXPECTF--
Warning: sort(): Argument #1 ($array) must be passed by reference, value given in %s on line %d
bool(true)
strlen(): Argument #1 ($string) must be of type string, array given
Warning: sort(): Argument #1 ($array) must be passed by reference, value given in %s on line %d
bool(true)
strlen(): Argument #1 ($string) must be of type string, array given
Done
| PHP | 3 | NathanFreeman/php-src | ext/standard/tests/general_functions/bug41970.phpt | [
"PHP-3.01"
] |
from moto.redshift import responses as redshift_responses
from localstack import config
from localstack.services.infra import start_moto_server
from localstack.utils.common import recurse_object
def apply_patches():
# patch itemize() to return proper XML response tags
def itemize(data, parent_key=None, *args, **kwargs):
# TODO: potentially add additional required tags here!
list_parent_tags = ["ClusterSubnetGroups"]
def fix_keys(o, **kwargs):
if isinstance(o, dict):
for k, v in o.items():
if k in list_parent_tags:
if isinstance(v, dict) and "item" in v:
v[k[:-1]] = v.pop("item")
return o
result = itemize_orig(data, *args, **kwargs)
recurse_object(result, fix_keys)
return result
itemize_orig = redshift_responses.itemize
redshift_responses.itemize = itemize
def start_redshift(port=None, asynchronous=False):
port = port or config.PORT_REDSHIFT
apply_patches()
return start_moto_server("redshift", port, name="Redshift", asynchronous=asynchronous)
| Python | 4 | jorges119/localstack | localstack/services/redshift/redshift_starter.py | [
"Apache-2.0"
] |
package com.baeldung.find
import org.junit.Test
import static org.junit.Assert.assertTrue
class SetFindUnitTest {
@Test
void whenSetContainsElement_thenCheckReturnsTrue() {
def set = ['a', 'b', 'c'] as Set
assertTrue(set.contains('a'))
assertTrue('a' in set)
}
} | Groovy | 3 | DBatOWL/tutorials | core-groovy-collections/src/test/groovy/com/baeldung/find/SetFindUnitTest.groovy | [
"MIT"
] |
parameters, Context.Request, "{{paramName}}", {{>innerParameterType}} | HTML+Django | 1 | MalcolmScoffable/openapi-generator | modules/openapi-generator/src/main/resources/csharp-nancyfx/innerParameterValueOfArgs.mustache | [
"Apache-2.0"
] |
{{ value|super_reverse }}
| HTML | 2 | sharad16j/flask | tests/templates/template_filter.html | [
"BSD-3-Clause"
] |
exec("swigtest.start", -1);
if add(7, 9) <> 16 then swigtesterror(); end
if do_op(7, 9, funcvar_get()) <> 16 then swigtesterror(); end
exec("swigtest.quit", -1);
| Scilab | 2 | kyletanyag/LL-Smartcard | cacreader/swig-4.0.2/Examples/test-suite/scilab/funcptr_runme.sci | [
"BSD-3-Clause"
] |
f1(const &v) {
#pragma unused v
}
f2(const ...) { }
f3(const v) {
#pragma unused v
}
f4(...) { }
f5(v) {
#pragma unused v
}
f6(&v) {
#pragma unused v
}
main() {
new a;
f1(a);
f2(a);
f3(a);
f4(a);
f5(a);
f6(a);
}
| PAWN | 1 | pawn-lang/pawn | source/compiler/tests/meaningless_class_specifiers_gh_172.pwn | [
"Zlib"
] |
#!/bin/sh /usr/share/dpatch/dpatch-run
## 03-kfreebsd.dpatch by Petr Salinger <[email protected]>
##
## DP: FTBFS on GNU/kFreeBSD (Closes: #374841).
@DPATCH@
diff -Naurp dvd+rw-tools-7.1.orig/Makefile.m4 dvd+rw-tools-7.1/Makefile.m4
--- dvd+rw-tools-7.1.orig/Makefile.m4 2008-03-02 17:17:09.000000000 +0000
+++ dvd+rw-tools-7.1/Makefile.m4 2008-04-01 09:03:41.000000000 +0000
@@ -14,6 +14,7 @@ ifelse(substr(OS,0,7),[MINGW32],[define(
ifelse(OS,NetBSD,[define([OS],[BSD])CXXFLAGS+=-D__unix])
ifelse(OS,OpenBSD,[define([OS],[BSD])])
ifelse(OS,FreeBSD,[define([OS],[BSD])LDLIBS=-lcam])
+ifelse(OS,GNU/kFreeBSD,[define([OS],[Linux])LDLIBS=-lcam])
ifelse(OS,IRIX64,[define([OS],[IRIX])])
ifelse(OS,Darwin,[
@@ -188,7 +189,7 @@ CC =gcc
CFLAGS +=$(WARN) -O2 -D_REENTRANT
CXX =g++
CXXFLAGS+=$(WARN) -O2 -fno-exceptions -D_REENTRANT
-LDLIBS =-lpthread
+LDLIBS +=-lpthread
LINK.o =$(LINK.cc)
prefix?=/usr/local
diff -Naurp dvd+rw-tools-7.1.orig/growisofs.c dvd+rw-tools-7.1/growisofs.c
--- dvd+rw-tools-7.1.orig/growisofs.c 2008-03-04 09:15:03.000000000 +0000
+++ dvd+rw-tools-7.1/growisofs.c 2008-04-01 09:03:41.000000000 +0000
@@ -403,7 +403,7 @@
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
-#if defined(__linux)
+#if defined(__linux) || defined(__GLIBC__)
/* ... and "engage" glibc large file support */
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
@@ -459,7 +459,7 @@
# define FATAL_START(e) (0x80|(e))
# define FATAL_MASK 0x7F
-#ifdef __FreeBSD__
+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
# include <sys/syscall.h>
# ifndef SYS_mlockall
# define SYS_mlockall 324
@@ -995,7 +995,7 @@ char *setup_fds (char *device)
goto open_rw;
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
#include <sys/cdio.h>
#include <camlib.h>
@@ -2937,7 +2937,7 @@ int main (int argc, char *argv[])
if (setrlimit(RLIMIT_MEMLOCK,&rlim)) break;
}
# endif
-# ifdef __FreeBSD__
+# if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
syscall(SYS_mlockall,3);
# else
mlockall(MCL_CURRENT|MCL_FUTURE);
diff -Naurp dvd+rw-tools-7.1.orig/transport.hxx dvd+rw-tools-7.1/transport.hxx
--- dvd+rw-tools-7.1.orig/transport.hxx 2008-03-01 10:34:43.000000000 +0000
+++ dvd+rw-tools-7.1/transport.hxx 2008-04-01 09:03:41.000000000 +0000
@@ -483,7 +483,7 @@ public:
{ return 1; }
};
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/ioctl.h>
#include <camlib.h>
| Darcs Patch | 3 | mtdcr/opendreambox | meta-opendreambox/recipes-multimedia/dvd+rw-tools/files/04-kfreebsd.dpatch | [
"MIT"
] |
query MyQuery @directive(
arg: 5
) {
field
@skip(if: true) @nope
otherField
...fragmentSpread, @include(if: ["this isn't even a boolean", "wow, that's really odd",,,,,])
}
fragment YouCanHaveDirectivesHereToo on SomeType @yesReally(what: "yes") {
fields
... on AType @what(sup: "yo") @otherDirective { goodbye}
... @notEvenATypeHere(args: [1, 2, 3]) {
hello
}
thisFieldHasALotOfDirectives @thisIsthefirst @thisIsTheSecond @thisIsTheThird @thisIstheFourthWillBeTooLongForSure (and: "it has arguments as well")
}
query QueryWVars($x: String) @directive { hey }
| GraphQL | 2 | fuelingtheweb/prettier | tests/graphql_directives/directives.graphql | [
"MIT"
] |
set location;
set geo;
param coord{i in location, j in geo};
param dist{i in location, j in location};
data;
set location := BNA LAX;
set geo := LAT LON;
param coord:
LAT LON :=
BNA 36.12 -86.67
LAX 33.94 -118.4
;
let dist['BNA','LAX'] := 2 * 6372.8 * asin (sqrt(sin(atan(1)/45*(coord['LAX','LAT']-coord['BNA','LAT'])/2)^2 + cos(atan(1)/45*coord['BNA','LAT']) * cos(atan(1)/45*coord['LAX','LAT']) * sin(atan(1)/45*(coord['LAX','LON'] - coord
['BNA','LON'])/2)^2));
printf "The distance between the two points is approximately %f km.\n", dist['BNA','LAX'];
| AMPL | 3 | LaudateCorpus1/RosettaCodeData | Task/Haversine-formula/AMPL/haversine-formula.ampl | [
"Info-ZIP"
] |
discard """
output: '''@["aaa", "bbb", "ccc"]'''
"""
const
foo = @["aaa", "bbb", "ccc"]
proc myTuple: tuple[n: int, bar: seq[string]] =
result.n = 42
result.bar = newSeqOfCap[string](foo.len)
for f in foo:
result.bar.add(f)
# It works if you change the below `const` to `let`
const
(n, bar) = myTuple()
echo bar | Nimrod | 4 | JohnAD/Nim | tests/vm/tnewseqofcap.nim | [
"MIT"
] |
(ns hu.lib.collection
(:require
[hu.lib.type :refer [object? array? empty? iterable? not-empty?]]
[hu.lib.object :refer [keys filter]]))
(defcurry ^void each
"Iterates over elements of an iterable object,
executing the callback for each element"
[clt cb]
(when (iterable? clt)
(.for-each (keys clt)
(fn [index]
(cb (aget clt index) index clt)))) clt)
(def ^void for-each each)
(defn ^number size
"Gets the size of the given collection"
[clt]
(when (iterable? clt)
(when (object? clt)
(.-length (keys clt))
(.-length clt)) 0))
(defn ^object compact
"Returns a new collection which
contains only the not empty values"
[clt]
(when (array? clt)
(.filter clt not-empty?)
(filter clt not-empty?)))
(def ^mixed clean compact)
| wisp | 5 | h2non/hu | src/collection.wisp | [
"MIT"
] |
#[ #[ Multiline comment in already
commented out code. ]#
proc p[T](x: T) = discard
]#
echo "This is code"
var
p = 0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64
proc getAlphabet(): string =
var accm = ""
for letter in 'a'..'z': # see iterators
accm.add(letter)
return accm
assert("a" * 10 == "aaaaaaaaaa")
| Nimrod | 4 | Thanh090/OnlineCompiler-1337 | public/JAVASCRIPT/ace/demo/kitchen-sink/docs/nim.nim | [
"BSD-3-Clause"
] |
" Tests for :[count]close! command
func Test_close_count()
enew! | only
let wids = [win_getid()]
for i in range(5)
new
call add(wids, win_getid())
endfor
4wincmd w
close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[4], wids[3], wids[1], wids[0]], ids)
1close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1], wids[0]], ids)
$close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1]], ids)
1wincmd w
2close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[1]], ids)
1wincmd w
new
call add(wids, win_getid())
new
call add(wids, win_getid())
2wincmd w
-1close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[6], wids[4], wids[1]], ids)
2wincmd w
+1close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[6], wids[4]], ids)
only!
endfunc
" Tests for :[count]hide command
func Test_hide_count()
enew! | only
let wids = [win_getid()]
for i in range(5)
new
call add(wids, win_getid())
endfor
4wincmd w
.hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[4], wids[3], wids[1], wids[0]], ids)
1hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1], wids[0]], ids)
$hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1]], ids)
1wincmd w
2hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[1]], ids)
1wincmd w
new
call add(wids, win_getid())
new
call add(wids, win_getid())
3wincmd w
-hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[7], wids[4], wids[1]], ids)
2wincmd w
+hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[7], wids[4]], ids)
only!
endfunc
" Tests for :[count]close! command with 'hidden'
func Test_hidden_close_count()
enew! | only
let wids = [win_getid()]
for i in range(5)
new
call add(wids, win_getid())
endfor
set hidden
$ hide
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[4], wids[3], wids[2], wids[1]], ids)
$-1 close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[4], wids[3], wids[1]], ids)
1wincmd w
.+close!
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[3], wids[1]], ids)
set nohidden
only!
endfunc
" Tests for 'CTRL-W c' command to close windows.
func Test_winclose_command()
enew! | only
let wids = [win_getid()]
for i in range(5)
new
call add(wids, win_getid())
endfor
set hidden
4wincmd w
exe "normal \<C-W>c"
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[5], wids[4], wids[3], wids[1], wids[0]], ids)
exe "normal 1\<C-W>c"
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1], wids[0]], ids)
exe "normal 9\<C-W>c"
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[3], wids[1]], ids)
1wincmd w
exe "normal 2\<C-W>c"
let ids = []
windo call add(ids, win_getid())
call assert_equal([wids[4], wids[1]], ids)
set nohidden
only!
endfunc
| VimL | 3 | uga-rosa/neovim | src/nvim/testdir/test_close_count.vim | [
"Vim"
] |
AC_DEFUN([FA_CHECK_CUDA], [
AC_ARG_WITH(cuda,
[AS_HELP_STRING([--with-cuda=<prefix>], [prefix of the CUDA installation])])
AC_ARG_WITH(cuda-arch,
[AS_HELP_STRING([--with-cuda-arch=<gencodes>], [device specific -gencode flags])],
[],
[with_cuda_arch=default])
if test x$with_cuda != xno; then
if test x$with_cuda != x; then
cuda_prefix=$with_cuda
AC_CHECK_PROG(NVCC, [nvcc], [$cuda_prefix/bin/nvcc], [], [$cuda_prefix/bin])
NVCC_CPPFLAGS="-I$cuda_prefix/include"
NVCC_LDFLAGS="-L$cuda_prefix/lib64"
else
AC_CHECK_PROGS(NVCC, [nvcc /usr/local/cuda/bin/nvcc], [])
if test "x$NVCC" == "x/usr/local/cuda/bin/nvcc"; then
cuda_prefix="/usr/local/cuda"
NVCC_CPPFLAGS="-I$cuda_prefix/include"
NVCC_LDFLAGS="-L$cuda_prefix/lib64"
else
cuda_prefix=""
NVCC_CPPFLAGS=""
NVCC_LDFLAGS=""
fi
fi
if test "x$NVCC" == x; then
AC_MSG_ERROR([Couldn't find nvcc])
fi
if test "x$with_cuda_arch" == xdefault; then
with_cuda_arch="-gencode=arch=compute_35,code=compute_35 \\
-gencode=arch=compute_52,code=compute_52 \\
-gencode=arch=compute_60,code=compute_60 \\
-gencode=arch=compute_61,code=compute_61 \\
-gencode=arch=compute_70,code=compute_70 \\
-gencode=arch=compute_75,code=compute_75"
fi
fa_save_CPPFLAGS="$CPPFLAGS"
fa_save_LDFLAGS="$LDFLAGS"
fa_save_LIBS="$LIBS"
CPPFLAGS="$NVCC_CPPFLAGS $CPPFLAGS"
LDFLAGS="$NVCC_LDFLAGS $LDFLAGS"
AC_CHECK_HEADER([cuda.h], [], AC_MSG_FAILURE([Couldn't find cuda.h]))
AC_CHECK_LIB([cublas], [cublasAlloc], [], AC_MSG_FAILURE([Couldn't find libcublas]))
AC_CHECK_LIB([cudart], [cudaSetDevice], [], AC_MSG_FAILURE([Couldn't find libcudart]))
NVCC_LIBS="$LIBS"
NVCC_CPPFLAGS="$CPPFLAGS"
NVCC_LDFLAGS="$LDFLAGS"
CPPFLAGS="$fa_save_CPPFLAGS"
LDFLAGS="$fa_save_LDFLAGS"
LIBS="$fa_save_LIBS"
fi
AC_SUBST(NVCC)
AC_SUBST(NVCC_CPPFLAGS)
AC_SUBST(NVCC_LDFLAGS)
AC_SUBST(NVCC_LIBS)
AC_SUBST(CUDA_PREFIX, $cuda_prefix)
AC_SUBST(CUDA_ARCH, $with_cuda_arch)
])
| M4 | 3 | CyberFlameGO/milvus | internal/core/src/index/thirdparty/faiss/acinclude/fa_check_cuda.m4 | [
"Apache-2.0"
] |
(*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*)
program DelphiServer;
{$APPTYPE CONSOLE}
{$D 'Copyright (c) 2012 The Apache Software Foundation'}
{$Q+} // throws exceptions on numeric overflows
uses
SysUtils,
Generics.Collections,
Thrift in '..\..\..\lib\delphi\src\Thrift.pas',
Thrift.Collections in '..\..\..\lib\delphi\src\Thrift.Collections.pas',
Thrift.Configuration in '..\..\..\lib\delphi\src\Thrift.Configuration.pas',
Thrift.Exception in '..\..\..\lib\delphi\src\Thrift.Exception.pas',
Thrift.Utils in '..\..\..\lib\delphi\src\Thrift.Utils.pas',
Thrift.Stream in '..\..\..\lib\delphi\src\Thrift.Stream.pas',
Thrift.Protocol in '..\..\..\lib\delphi\src\Thrift.Protocol.pas',
Thrift.Server in '..\..\..\lib\delphi\src\Thrift.Server.pas',
Thrift.Transport in '..\..\..\lib\delphi\src\Thrift.Transport.pas',
Thrift.WinHTTP in '..\..\..\lib\delphi\src\Thrift.WinHTTP.pas',
Shared in '..\gen-delphi\Shared.pas',
Tutorial in '..\gen-delphi\Tutorial.pas';
type
TCalculatorHandler = class( TInterfacedObject, TCalculator.Iface)
protected
FLog : TDictionary< Integer, ISharedStruct>;
// TSharedService.Iface
function getStruct(key: Integer): ISharedStruct;
// TCalculator.Iface
procedure ping();
function add(num1: Integer; num2: Integer): Integer;
function calculate(logid: Integer; const w: IWork): Integer;
procedure zip();
public
constructor Create;
destructor Destroy; override;
end;
DelphiTutorialServer = class
public
class procedure Main;
end;
//--- TCalculatorHandler ---------------------------------------------------
constructor TCalculatorHandler.Create;
begin
inherited Create;
FLog := TDictionary< Integer, ISharedStruct>.Create();
end;
destructor TCalculatorHandler.Destroy;
begin
try
FreeAndNil( FLog);
finally
inherited Destroy;
end;
end;
procedure TCalculatorHandler.ping;
begin
WriteLn( 'ping()');
end;
function TCalculatorHandler.add(num1: Integer; num2: Integer): Integer;
begin
WriteLn( Format( 'add( %d, %d)', [num1, num2]));
result := num1 + num2;
end;
function TCalculatorHandler.calculate(logid: Integer; const w: IWork): Integer;
var entry : ISharedStruct;
begin
try
WriteLn( Format('calculate( %d, [%d,%d,%d])', [logid, Ord(w.Op), w.Num1, w.Num2]));
case w.Op of
TOperation.ADD : result := w.Num1 + w.Num2;
TOperation.SUBTRACT : result := w.Num1 - w.Num2;
TOperation.MULTIPLY : result := w.Num1 * w.Num2;
TOperation.DIVIDE : result := Round( w.Num1 / w.Num2);
else
raise TInvalidOperation.Create( Ord(w.Op), 'Unknown operation');
end;
except
on e:Thrift.TException do raise; // let Thrift Exceptions pass through
on e:Exception do raise TInvalidOperation.Create( Ord(w.Op), e.Message); // repackage all other
end;
entry := TSharedStructImpl.Create;
entry.Key := logid;
entry.Value := IntToStr( result);
FLog.AddOrSetValue( logid, entry);
end;
function TCalculatorHandler.getStruct(key: Integer): ISharedStruct;
begin
WriteLn( Format( 'getStruct(%d)', [key]));
result := FLog[key];
end;
procedure TCalculatorHandler.zip;
begin
WriteLn( 'zip()');
end;
//--- DelphiTutorialServer ----------------------------------------------------------------------
class procedure DelphiTutorialServer.Main;
var handler : TCalculator.Iface;
processor : IProcessor;
transport : IServerTransport;
server : IServer;
begin
try
handler := TCalculatorHandler.Create;
processor := TCalculator.TProcessorImpl.Create( handler);
transport := TServerSocketImpl.Create( 9090);
server := TSimpleServer.Create( processor, transport);
WriteLn( 'Starting the server...');
server.Serve();
except
on e: Exception do WriteLn( e.Message);
end;
WriteLn('done.');
end;
begin
try
DelphiTutorialServer.Main;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.
| Pascal | 4 | Jimexist/thrift | tutorial/delphi/DelphiServer/DelphiServer.dpr | [
"Apache-2.0"
] |
(sigil
(sigil_name) @_sigil_name
(quoted_content) @surface
(#eq? @_sigil_name "F"))
(sigil
(sigil_name) @_sigil_name
(quoted_content) @heex
(#eq? @_sigil_name "H"))
(sigil
(sigil_name) @_sigil_name
(quoted_content) @zig
(#eq? @_sigil_name "Z"))
(sigil
(sigil_name) @_sigil_name
(quoted_content) @regex
(#any-of? @_sigil_name "r" "R"))
(comment) @comment
| Scheme | 3 | last-partizan/nvim-treesitter | queries/elixir/injections.scm | [
"Apache-2.0"
] |
// -- IsCrypt.iss --
// Include file with support functions to download encryption support
// Must be included before adding [Files] entries
//
#if FileExists('iscrypt-custom.ico')
#define iscryptico 'iscrypt-custom.ico'
#define iscrypticosizes '[32, 48, 64]'
#else
#define iscryptico 'iscrypt.ico'
#define iscrypticosizes '[32]'
#endif
//
[Files]
Source: "{#iscryptico}"; DestName: "iscrypt.ico"; Flags: dontcopy
Source: "{tmp}\ISCrypt.dll"; DestDir: "{app}"; Flags: ignoreversion external skipifsourcedoesntexist touch
[Code]
const
ISCryptHash = '2f6294f9aa09f59a574b5dcd33be54e16b39377984f3d5658cda44950fa0f8fc';
var
ISCryptPage: TWizardPage;
ISCryptCheckBox: TCheckBox;
procedure CreateCustomOption(Page: TWizardPage; ACheckCaption: String; var CheckBox: TCheckBox; PreviousControl: TControl);
begin
CheckBox := TCheckBox.Create(Page);
with CheckBox do begin
Top := PreviousControl.Top + PreviousControl.Height + ScaleY(12);
Width := Page.SurfaceWidth;
Height := ScaleY(Height);
Anchors := [akLeft, akTop, akRight];
Caption := ACheckCaption;
Parent := Page.Surface;
end;
end;
function CreateCustomOptionPage(AAfterId: Integer; ACaption, ASubCaption, AIconFileName, ALabel1Caption, ALabel2Caption,
ACheckCaption: String; var CheckBox: TCheckBox): TWizardPage;
var
Page: TWizardPage;
BitmapImage: TBitmapImage;
Label1, Label2: TNewStaticText;
begin
Page := CreateCustomPage(AAfterID, ACaption, ASubCaption);
AIconFileName := ExpandConstant('{tmp}\' + AIconFileName);
if not FileExists(AIconFileName) then
ExtractTemporaryFile(ExtractFileName(AIconFileName));
BitmapImage := TBitmapImage.Create(Page);
with BitmapImage do begin
Width := ScaleX(32);
Height := ScaleY(32);
Parent := Page.Surface;
end;
InitializeBitmapImageFromIcon(BitmapImage, AIconFileName, Page.SurfaceColor, {#iscrypticosizes});
Label1 := TNewStaticText.Create(Page);
with Label1 do begin
AutoSize := False;
Left := WizardForm.SelectDirLabel.Left;
Width := Page.SurfaceWidth - Left;
Anchors := [akLeft, akTop, akRight];
WordWrap := True;
Caption := ALabel1Caption;
Parent := Page.Surface;
end;
WizardForm.AdjustLabelHeight(Label1);
Label2 := TNewStaticText.Create(Page);
with Label2 do begin
Top := Label1.Top + Label1.Height + ScaleY(12);
Width := Page.SurfaceWidth;
Anchors := [akLeft, akTop, akRight];
WordWrap := True;
Caption := ALabel2Caption;
Parent := Page.Surface;
end;
WizardForm.AdjustLabelHeight(Label2);
CreateCustomOption(Page, ACheckCaption, CheckBox, Label2);
Result := Page;
end;
<event('InitializeWizard')>
procedure IsCryptInitializeWizard;
var
ExistingFileName, Caption, SubCaption1, IconFileName, Label1Caption, Label2Caption, CheckCaption: String;
begin
if WizardForm.PrevAppDir <> '' then begin
ExistingFileName := AddBackslash(WizardForm.PrevAppDir) + 'ISCrypt.dll';
try
if GetSHA256OfFile(ExistingFileName) = ISCryptHash then
Exit;
except
end;
end;
Caption := 'Encryption Support';
SubCaption1 := 'Would you like to download encryption support?';
IconFileName := 'iscrypt.ico';
Label1Caption :=
'Inno Setup supports encryption. However, because of encryption import/export laws in some countries, encryption support is not included in the main' +
' Inno Setup installer. Instead, it can be downloaded from a server located in the Netherlands now.';
Label2Caption := 'Select whether you would like to download and install encryption support, then click Next.';
CheckCaption := '&Download and install encryption support';
ISCryptPage := CreateCustomOptionPage(wpSelectProgramGroup, Caption, SubCaption1, IconFileName, Label1Caption, Label2Caption, CheckCaption, ISCryptCheckBox);
ISCryptCheckBox.Checked := ExpandConstant('{param:downloadiscrypt|0}') = '1';
end;
<event('NextButtonClick')>
function IsCryptNextButtonClick(CurPageID: Integer): Boolean;
var
DownloadPage: TDownloadWizardPage;
begin
Result := True;
if (CurPageID = wpReady) and (ISCryptCheckBox <> nil) and ISCryptCheckBox.Checked then begin
DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
DownloadPage.Clear;
DownloadPage.Add('https://jrsoftware.org/download.php/iscrypt.dll', 'ISCrypt.dll', ISCryptHash);
DownloadPage.Show;
try
try
DownloadPage.Download;
except
if DownloadPage.AbortedByUser then
Log('Aborted by user.')
else
SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
end;
finally
DownloadPage.Hide;
end;
end;
end; | Inno Setup | 5 | mqt635/issrc | iscrypt.iss | [
"FSFAP"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { rtrim } from 'vs/base/common/strings';
export function normalizeGitHubUrl(url: string): string {
// If the url has a .git suffix, remove it
if (url.endsWith('.git')) {
url = url.substr(0, url.length - 4);
}
// Remove trailing slash
url = rtrim(url, '/');
if (url.endsWith('/new')) {
url = rtrim(url, '/new');
}
if (url.endsWith('/issues')) {
url = rtrim(url, '/issues');
}
return url;
}
| TypeScript | 4 | sbj42/vscode | src/vs/platform/issue/common/issueReporterUtil.ts | [
"MIT"
] |
package scala.tools.eclipse.contribution.weaving.jdt.debug;
import org.eclipse.jdt.internal.debug.ui.BreakpointMarkerUpdater;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.Position;
/**
* We suppress BreakpointMarkerUpdater, which had a habit of either removing
* breakpoints in Scala files or throwing exceptions (see #1901, #1000113)
*/
@SuppressWarnings("restriction")
public privileged aspect SuppressBreakpointMarkerUpdaterAspect {
pointcut updateMarker(BreakpointMarkerUpdater markerUpdater, IMarker marker,
IDocument document, Position position):
args(marker, document, position)
&& execution(boolean BreakpointMarkerUpdater.updateMarker(IMarker, IDocument, Position))
&& target(markerUpdater);
boolean around(BreakpointMarkerUpdater markerUpdater, IMarker marker,
IDocument document, Position position):
updateMarker(markerUpdater, marker, document, position) {
IFile resource = ((IFile) marker.getResource());
if (resource != null && resource.getFileExtension().equals("scala"))
return true;
else
return proceed(markerUpdater, marker, document, position);
}
}
| AspectJ | 3 | elemgee/scala-ide | org.scala-ide.sdt.aspects/src/scala/tools/eclipse/contribution/weaving/jdt/debug/SuppressBreakpointMarkerUpdaterAspect.aj | [
"BSD-3-Clause"
] |
#
# UnZip for VMS - MMS (or MMK) Source Dependency File.
#
# This description file is included by other description files. It is
# not intended to be used alone. Verify proper inclusion.
.IFDEF INCL_DESCRIP_DEPS
.ELSE
$$$$ THIS DESCRIPTION FILE IS NOT INTENDED TO BE USED THIS WAY.
.ENDIF
[.$(DEST)]CRC32.OBJ : []CRC32.C
[.$(DEST)]CRC32.OBJ : []ZIP.H
[.$(DEST)]CRC32.OBJ : []UNZIP.H
[.$(DEST)]CRC32.OBJ : []UNZPRIV.H
[.$(DEST)]CRC32.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]CRC32.OBJ : []GLOBALS.H
[.$(DEST)]CRC32.OBJ : []CRC32.H
[.$(DEST)]CRC32_.OBJ : []CRC32.C
[.$(DEST)]CRC32_.OBJ : []ZIP.H
[.$(DEST)]CRC32_.OBJ : []UNZIP.H
[.$(DEST)]CRC32_.OBJ : []UNZPRIV.H
[.$(DEST)]CRC32_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]CRC32_.OBJ : []GLOBALS.H
[.$(DEST)]CRC32_.OBJ : []CRC32.H
[.$(DEST)]CRYPT.OBJ : []CRYPT.C
[.$(DEST)]CRYPT.OBJ : []ZIP.H
[.$(DEST)]CRYPT.OBJ : []UNZIP.H
[.$(DEST)]CRYPT.OBJ : []UNZPRIV.H
[.$(DEST)]CRYPT.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]CRYPT.OBJ : []GLOBALS.H
[.$(DEST)]CRYPT.OBJ : []CRYPT.H
[.$(DEST)]CRYPT.OBJ : []TTYIO.H
[.$(DEST)]CRYPT.OBJ : []CRC32.H
[.$(DEST)]CRYPT_.OBJ : []CRYPT.C
[.$(DEST)]CRYPT_.OBJ : []ZIP.H
[.$(DEST)]CRYPT_.OBJ : []UNZIP.H
[.$(DEST)]CRYPT_.OBJ : []UNZPRIV.H
[.$(DEST)]CRYPT_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]CRYPT_.OBJ : []GLOBALS.H
[.$(DEST)]CRYPT_.OBJ : []CRYPT.H
[.$(DEST)]CRYPT_.OBJ : []TTYIO.H
[.$(DEST)]CRYPT_.OBJ : []CRC32.H
[.$(DEST)]ENVARGS.OBJ : []ENVARGS.C
[.$(DEST)]ENVARGS.OBJ : []UNZIP.H
[.$(DEST)]ENVARGS.OBJ : []UNZPRIV.H
[.$(DEST)]ENVARGS.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]ENVARGS.OBJ : []GLOBALS.H
[.$(DEST)]EXPLODE.OBJ : []EXPLODE.C
[.$(DEST)]EXPLODE.OBJ : []UNZIP.H
[.$(DEST)]EXPLODE.OBJ : []UNZPRIV.H
[.$(DEST)]EXPLODE.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]EXPLODE.OBJ : []GLOBALS.H
[.$(DEST)]EXTRACT.OBJ : []EXTRACT.C
[.$(DEST)]EXTRACT.OBJ : []UNZIP.H
[.$(DEST)]EXTRACT.OBJ : []UNZPRIV.H
[.$(DEST)]EXTRACT.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]EXTRACT.OBJ : []GLOBALS.H
[.$(DEST)]EXTRACT.OBJ : []CRC32.H
[.$(DEST)]EXTRACT.OBJ : []ZIP.H
[.$(DEST)]EXTRACT.OBJ : []CRYPT.H
[.$(DEST)]EXTRACT_.OBJ : []EXTRACT.C
[.$(DEST)]EXTRACT_.OBJ : []UNZIP.H
[.$(DEST)]EXTRACT_.OBJ : []UNZPRIV.H
[.$(DEST)]EXTRACT_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]EXTRACT_.OBJ : []GLOBALS.H
[.$(DEST)]EXTRACT_.OBJ : []CRC32.H
[.$(DEST)]EXTRACT_.OBJ : []ZIP.H
[.$(DEST)]EXTRACT_.OBJ : []CRYPT.H
[.$(DEST)]FILEIO.OBJ : []FILEIO.C
[.$(DEST)]FILEIO.OBJ : []UNZIP.H
[.$(DEST)]FILEIO.OBJ : []UNZPRIV.H
[.$(DEST)]FILEIO.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]FILEIO.OBJ : []GLOBALS.H
[.$(DEST)]FILEIO.OBJ : []CRC32.H
[.$(DEST)]FILEIO.OBJ : []ZIP.H
[.$(DEST)]FILEIO.OBJ : []CRYPT.H
[.$(DEST)]FILEIO.OBJ : []TTYIO.H
[.$(DEST)]FILEIO.OBJ : []EBCDIC.H
[.$(DEST)]FILEIO_.OBJ : []FILEIO.C
[.$(DEST)]FILEIO_.OBJ : []UNZIP.H
[.$(DEST)]FILEIO_.OBJ : []UNZPRIV.H
[.$(DEST)]FILEIO_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]FILEIO_.OBJ : []GLOBALS.H
[.$(DEST)]FILEIO_.OBJ : []CRC32.H
[.$(DEST)]FILEIO_.OBJ : []ZIP.H
[.$(DEST)]FILEIO_.OBJ : []CRYPT.H
[.$(DEST)]FILEIO_.OBJ : []TTYIO.H
[.$(DEST)]FILEIO_.OBJ : []EBCDIC.H
[.$(DEST)]GLOBALS.OBJ : []GLOBALS.C
[.$(DEST)]GLOBALS.OBJ : []UNZIP.H
[.$(DEST)]GLOBALS.OBJ : []UNZPRIV.H
[.$(DEST)]GLOBALS.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]GLOBALS.OBJ : []GLOBALS.H
[.$(DEST)]GLOBALS_.OBJ : []GLOBALS.C
[.$(DEST)]GLOBALS_.OBJ : []UNZIP.H
[.$(DEST)]GLOBALS_.OBJ : []UNZPRIV.H
[.$(DEST)]GLOBALS_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]GLOBALS_.OBJ : []GLOBALS.H
[.$(DEST)]INFLATE.OBJ : []INFLATE.C
[.$(DEST)]INFLATE.OBJ : []INFLATE.H
[.$(DEST)]INFLATE.OBJ : []UNZIP.H
[.$(DEST)]INFLATE.OBJ : []UNZPRIV.H
[.$(DEST)]INFLATE.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]INFLATE.OBJ : []GLOBALS.H
[.$(DEST)]INFLATE_.OBJ : []INFLATE.C
[.$(DEST)]INFLATE_.OBJ : []INFLATE.H
[.$(DEST)]INFLATE_.OBJ : []UNZIP.H
[.$(DEST)]INFLATE_.OBJ : []UNZPRIV.H
[.$(DEST)]INFLATE_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]INFLATE_.OBJ : []GLOBALS.H
[.$(DEST)]LIST.OBJ : []LIST.C
[.$(DEST)]LIST.OBJ : []UNZIP.H
[.$(DEST)]LIST.OBJ : []UNZPRIV.H
[.$(DEST)]LIST.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]LIST.OBJ : []GLOBALS.H
[.$(DEST)]MATCH.OBJ : []MATCH.C
[.$(DEST)]MATCH.OBJ : []UNZIP.H
[.$(DEST)]MATCH.OBJ : []UNZPRIV.H
[.$(DEST)]MATCH.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]MATCH.OBJ : []GLOBALS.H
[.$(DEST)]MATCH_.OBJ : []MATCH.C
[.$(DEST)]MATCH_.OBJ : []UNZIP.H
[.$(DEST)]MATCH_.OBJ : []UNZPRIV.H
[.$(DEST)]MATCH_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]MATCH_.OBJ : []GLOBALS.H
[.$(DEST)]PROCESS.OBJ : []PROCESS.C
[.$(DEST)]PROCESS.OBJ : []UNZIP.H
[.$(DEST)]PROCESS.OBJ : []UNZPRIV.H
[.$(DEST)]PROCESS.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]PROCESS.OBJ : []GLOBALS.H
[.$(DEST)]PROCESS.OBJ : []CRC32.H
[.$(DEST)]PROCESS.OBJ : []ZIP.H
[.$(DEST)]PROCESS_.OBJ : []PROCESS.C
[.$(DEST)]PROCESS_.OBJ : []UNZIP.H
[.$(DEST)]PROCESS_.OBJ : []UNZPRIV.H
[.$(DEST)]PROCESS_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]PROCESS_.OBJ : []GLOBALS.H
[.$(DEST)]PROCESS_.OBJ : []CRC32.H
[.$(DEST)]PROCESS_.OBJ : []ZIP.H
[.$(DEST)]TTYIO.OBJ : []TTYIO.C
[.$(DEST)]TTYIO.OBJ : []ZIP.H
[.$(DEST)]TTYIO.OBJ : []UNZIP.H
[.$(DEST)]TTYIO.OBJ : []UNZPRIV.H
[.$(DEST)]TTYIO.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]TTYIO.OBJ : []GLOBALS.H
[.$(DEST)]TTYIO.OBJ : []CRYPT.H
[.$(DEST)]TTYIO.OBJ : []TTYIO.H
[.$(DEST)]TTYIO_.OBJ : []TTYIO.C
[.$(DEST)]TTYIO_.OBJ : []ZIP.H
[.$(DEST)]TTYIO_.OBJ : []UNZIP.H
[.$(DEST)]TTYIO_.OBJ : []UNZPRIV.H
[.$(DEST)]TTYIO_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]TTYIO_.OBJ : []GLOBALS.H
[.$(DEST)]TTYIO_.OBJ : []CRYPT.H
[.$(DEST)]TTYIO_.OBJ : []TTYIO.H
[.$(DEST)]UBZ2ERR.OBJ : []UBZ2ERR.C
[.$(DEST)]UBZ2ERR.OBJ : []UNZIP.H
[.$(DEST)]UBZ2ERR.OBJ : []UNZPRIV.H
[.$(DEST)]UBZ2ERR.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UBZ2ERR.OBJ : []GLOBALS.H
[.$(DEST)]UBZ2ERR_.OBJ : []UBZ2ERR.C
[.$(DEST)]UBZ2ERR_.OBJ : []UNZIP.H
[.$(DEST)]UBZ2ERR_.OBJ : []UNZPRIV.H
[.$(DEST)]UBZ2ERR_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UBZ2ERR_.OBJ : []GLOBALS.H
[.$(DEST)]UNREDUCE.OBJ : []UNREDUCE.C
[.$(DEST)]UNREDUCE.OBJ : []UNZIP.H
[.$(DEST)]UNREDUCE.OBJ : []UNZPRIV.H
[.$(DEST)]UNREDUCE.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNREDUCE.OBJ : []GLOBALS.H
[.$(DEST)]UNSHRINK.OBJ : []UNSHRINK.C
[.$(DEST)]UNSHRINK.OBJ : []UNZIP.H
[.$(DEST)]UNSHRINK.OBJ : []UNZPRIV.H
[.$(DEST)]UNSHRINK.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNSHRINK.OBJ : []GLOBALS.H
[.$(DEST)]UNZIP.OBJ : []UNZIP.C
[.$(DEST)]UNZIP.OBJ : []UNZIP.H
[.$(DEST)]UNZIP.OBJ : []UNZPRIV.H
[.$(DEST)]UNZIP.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNZIP.OBJ : []GLOBALS.H
[.$(DEST)]UNZIP.OBJ : []CRYPT.H
[.$(DEST)]UNZIP.OBJ : []UNZVERS.H
[.$(DEST)]UNZIP.OBJ : []CONSTS.H
[.$(DEST)]UNZIPSFX.OBJ : []UNZIP.C
[.$(DEST)]UNZIPSFX.OBJ : []UNZIP.H
[.$(DEST)]UNZIPSFX.OBJ : []UNZPRIV.H
[.$(DEST)]UNZIPSFX.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNZIPSFX.OBJ : []GLOBALS.H
[.$(DEST)]UNZIPSFX.OBJ : []CRYPT.H
[.$(DEST)]UNZIPSFX.OBJ : []UNZVERS.H
[.$(DEST)]UNZIPSFX.OBJ : []CONSTS.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []UNZIP.C
[.$(DEST)]UNZIPSFX_CLI.OBJ : []UNZIP.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []UNZPRIV.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []GLOBALS.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []CRYPT.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []UNZVERS.H
[.$(DEST)]UNZIPSFX_CLI.OBJ : []CONSTS.H
[.$(DEST)]UNZIP_CLI.OBJ : []UNZIP.C
[.$(DEST)]UNZIP_CLI.OBJ : []UNZIP.H
[.$(DEST)]UNZIP_CLI.OBJ : []UNZPRIV.H
[.$(DEST)]UNZIP_CLI.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]UNZIP_CLI.OBJ : []GLOBALS.H
[.$(DEST)]UNZIP_CLI.OBJ : []CRYPT.H
[.$(DEST)]UNZIP_CLI.OBJ : []UNZVERS.H
[.$(DEST)]UNZIP_CLI.OBJ : []CONSTS.H
[.$(DEST)]ZIPINFO.OBJ : []ZIPINFO.C
[.$(DEST)]ZIPINFO.OBJ : []UNZIP.H
[.$(DEST)]ZIPINFO.OBJ : []UNZPRIV.H
[.$(DEST)]ZIPINFO.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]ZIPINFO.OBJ : []GLOBALS.H
[.$(DEST)]CMDLINE.OBJ : [.VMS]CMDLINE.C
[.$(DEST)]CMDLINE.OBJ : []UNZIP.H
[.$(DEST)]CMDLINE.OBJ : []UNZPRIV.H
[.$(DEST)]CMDLINE.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]CMDLINE.OBJ : []GLOBALS.H
[.$(DEST)]CMDLINE.OBJ : []UNZVERS.H
[.$(DEST)]VMS.OBJ : [.VMS]VMS.C
[.$(DEST)]VMS.OBJ : []UNZIP.H
[.$(DEST)]VMS.OBJ : []UNZPRIV.H
[.$(DEST)]VMS.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]VMS.OBJ : []GLOBALS.H
[.$(DEST)]VMS.OBJ : []CRC32.H
[.$(DEST)]VMS.OBJ : []ZIP.H
[.$(DEST)]VMS.OBJ : []UNZIP.H
[.$(DEST)]VMS.OBJ : [.VMS]VMS.H
[.$(DEST)]VMS.OBJ : [.VMS]VMSDEFS.H
[.$(DEST)]VMS_.OBJ : [.VMS]VMS.C
[.$(DEST)]VMS_.OBJ : []UNZIP.H
[.$(DEST)]VMS_.OBJ : []UNZPRIV.H
[.$(DEST)]VMS_.OBJ : [.VMS]VMSCFG.H
[.$(DEST)]VMS_.OBJ : []GLOBALS.H
[.$(DEST)]VMS_.OBJ : []CRC32.H
[.$(DEST)]VMS_.OBJ : []ZIP.H
[.$(DEST)]VMS_.OBJ : []UNZIP.H
[.$(DEST)]VMS_.OBJ : [.VMS]VMS.H
[.$(DEST)]VMS_.OBJ : [.VMS]VMSDEFS.H
| Module Management System | 3 | ThirdProject/android_external_unzip | vms/descrip_deps.mms | [
"Info-ZIP"
] |
KIDS Distribution saved on Feb 04, 2020@11:50:21
Text only version of CTEval report
**KIDS**:SAMI*18.0*4^
**INSTALL NAME**
SAMI*18.0*4
"BLD",11433,0)
SAMI*18.0*4^SAMI^0^3200204^y
"BLD",11433,1,0)
^^1^1^3200202^
"BLD",11433,1,1,0)
CTReport in text format
"BLD",11433,4,0)
^9.64PA^^
"BLD",11433,6.3)
2
"BLD",11433,"KRN",0)
^9.67PA^1.5^24
"BLD",11433,"KRN",.4,0)
.4
"BLD",11433,"KRN",.401,0)
.401
"BLD",11433,"KRN",.402,0)
.402
"BLD",11433,"KRN",.403,0)
.403
"BLD",11433,"KRN",.5,0)
.5
"BLD",11433,"KRN",.84,0)
.84
"BLD",11433,"KRN",1.5,0)
1.5
"BLD",11433,"KRN",1.6,0)
1.6
"BLD",11433,"KRN",1.61,0)
1.61
"BLD",11433,"KRN",1.62,0)
1.62
"BLD",11433,"KRN",3.6,0)
3.6
"BLD",11433,"KRN",3.8,0)
3.8
"BLD",11433,"KRN",9.2,0)
9.2
"BLD",11433,"KRN",9.8,0)
9.8
"BLD",11433,"KRN",9.8,"NM",0)
^9.68A^10^10
"BLD",11433,"KRN",9.8,"NM",1,0)
SAMINOT3^^0^B48541042
"BLD",11433,"KRN",9.8,"NM",2,0)
SAMICTRT^^0^B16024017
"BLD",11433,"KRN",9.8,"NM",3,0)
SAMICTT0^^0^B70496932
"BLD",11433,"KRN",9.8,"NM",4,0)
SAMICTT1^^0^B82363207
"BLD",11433,"KRN",9.8,"NM",5,0)
SAMICTT2^^0^B84755388
"BLD",11433,"KRN",9.8,"NM",6,0)
SAMICTT3^^0^B165906260
"BLD",11433,"KRN",9.8,"NM",7,0)
SAMICTT4^^0^B35570521
"BLD",11433,"KRN",9.8,"NM",8,0)
SAMICTT9^^0^B10292811
"BLD",11433,"KRN",9.8,"NM",9,0)
SAMICTTA^^0^B24206954
"BLD",11433,"KRN",9.8,"NM",10,0)
SAMIHOM4^^0^B462206546
"BLD",11433,"KRN",9.8,"NM","B","SAMICTRT",2)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT0",3)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT1",4)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT2",5)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT3",6)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT4",7)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTT9",8)
"BLD",11433,"KRN",9.8,"NM","B","SAMICTTA",9)
"BLD",11433,"KRN",9.8,"NM","B","SAMIHOM4",10)
"BLD",11433,"KRN",9.8,"NM","B","SAMINOT3",1)
"BLD",11433,"KRN",19,0)
19
"BLD",11433,"KRN",19.1,0)
19.1
"BLD",11433,"KRN",101,0)
101
"BLD",11433,"KRN",409.61,0)
409.61
"BLD",11433,"KRN",771,0)
771
"BLD",11433,"KRN",779.2,0)
779.2
"BLD",11433,"KRN",870,0)
870
"BLD",11433,"KRN",8989.51,0)
8989.51
"BLD",11433,"KRN",8989.52,0)
8989.52
"BLD",11433,"KRN",8994,0)
8994
"BLD",11433,"KRN","B",.4,.4)
"BLD",11433,"KRN","B",.401,.401)
"BLD",11433,"KRN","B",.402,.402)
"BLD",11433,"KRN","B",.403,.403)
"BLD",11433,"KRN","B",.5,.5)
"BLD",11433,"KRN","B",.84,.84)
"BLD",11433,"KRN","B",1.5,1.5)
"BLD",11433,"KRN","B",1.6,1.6)
"BLD",11433,"KRN","B",1.61,1.61)
"BLD",11433,"KRN","B",1.62,1.62)
"BLD",11433,"KRN","B",3.6,3.6)
"BLD",11433,"KRN","B",3.8,3.8)
"BLD",11433,"KRN","B",9.2,9.2)
"BLD",11433,"KRN","B",9.8,9.8)
"BLD",11433,"KRN","B",19,19)
"BLD",11433,"KRN","B",19.1,19.1)
"BLD",11433,"KRN","B",101,101)
"BLD",11433,"KRN","B",409.61,409.61)
"BLD",11433,"KRN","B",771,771)
"BLD",11433,"KRN","B",779.2,779.2)
"BLD",11433,"KRN","B",870,870)
"BLD",11433,"KRN","B",8989.51,8989.51)
"BLD",11433,"KRN","B",8989.52,8989.52)
"BLD",11433,"KRN","B",8994,8994)
"MBREQ")
0
"PKG",230,-1)
1^1
"PKG",230,0)
SAMI^SAMI^SCREENING APPLICATIONS MANAGEMENT - IELCAP
"PKG",230,22,0)
^9.49I^1^1
"PKG",230,22,1,0)
18.0^3191203
"PKG",230,22,1,"PAH",1,0)
4^3200204
"PKG",230,22,1,"PAH",1,1,0)
^^1^1^3200204
"PKG",230,22,1,"PAH",1,1,1,0)
CTReport in text format
"QUES","XPF1",0)
Y
"QUES","XPF1","??")
^D REP^XPDH
"QUES","XPF1","A")
Shall I write over your |FLAG| File
"QUES","XPF1","B")
YES
"QUES","XPF1","M")
D XPF1^XPDIQ
"QUES","XPF2",0)
Y
"QUES","XPF2","??")
^D DTA^XPDH
"QUES","XPF2","A")
Want my data |FLAG| yours
"QUES","XPF2","B")
YES
"QUES","XPF2","M")
D XPF2^XPDIQ
"QUES","XPI1",0)
YO
"QUES","XPI1","??")
^D INHIBIT^XPDH
"QUES","XPI1","A")
Want KIDS to INHIBIT LOGONs during the install
"QUES","XPI1","B")
NO
"QUES","XPI1","M")
D XPI1^XPDIQ
"QUES","XPM1",0)
PO^VA(200,:EM
"QUES","XPM1","??")
^D MG^XPDH
"QUES","XPM1","A")
Enter the Coordinator for Mail Group '|FLAG|'
"QUES","XPM1","B")
"QUES","XPM1","M")
D XPM1^XPDIQ
"QUES","XPO1",0)
Y
"QUES","XPO1","??")
^D MENU^XPDH
"QUES","XPO1","A")
Want KIDS to Rebuild Menu Trees Upon Completion of Install
"QUES","XPO1","B")
NO
"QUES","XPO1","M")
D XPO1^XPDIQ
"QUES","XPZ1",0)
Y
"QUES","XPZ1","??")
^D OPT^XPDH
"QUES","XPZ1","A")
Want to DISABLE Scheduled Options, Menu Options, and Protocols
"QUES","XPZ1","B")
NO
"QUES","XPZ1","M")
D XPZ1^XPDIQ
"QUES","XPZ2",0)
Y
"QUES","XPZ2","??")
^D RTN^XPDH
"QUES","XPZ2","A")
Want to MOVE routines to other CPUs
"QUES","XPZ2","B")
NO
"QUES","XPZ2","M")
D XPZ2^XPDIQ
"RTN")
10
"RTN","SAMICTRT")
0^2^B16024017
"RTN","SAMICTRT",1,0)
SAMICTRT ;ven/gpl - CTReport Test Routine ;2018-03-07T18:48Z
"RTN","SAMICTRT",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTRT",3,0)
;
"RTN","SAMICTRT",4,0)
; This routine is for testing only and should not be distributed
"RTN","SAMICTRT",5,0)
;
"RTN","SAMICTRT",6,0)
quit ; no entry from top
"RTN","SAMICTRT",7,0)
;
"RTN","SAMICTRT",8,0)
wsReport(testout,filter) ; web service
"RTN","SAMICTRT",9,0)
n vapals ; first do vapals report
"RTN","SAMICTRT",10,0)
d WSREPORT^SAMICTR0(.vapals,.filter)
"RTN","SAMICTRT",11,0)
n fglb,fglb1,fn,dir
"RTN","SAMICTRT",12,0)
s fglb=$na(^TMP("SAMITEST",$J))
"RTN","SAMICTRT",13,0)
k @fglb
"RTN","SAMICTRT",14,0)
s fglb1=$na(@fglb@(1))
"RTN","SAMICTRT",15,0)
s fn=$$filename(.filter)
"RTN","SAMICTRT",16,0)
s dir=$$whereIs("/ctvapals")
"RTN","SAMICTRT",17,0)
m @fglb=vapals
"RTN","SAMICTRT",18,0)
d GTF^%ZISH(fglb1,3,dir,"vapals_"_fn_".html")
"RTN","SAMICTRT",19,0)
;
"RTN","SAMICTRT",20,0)
d makeData(fn,.filter) ; data for elcap report generator
"RTN","SAMICTRT",21,0)
l +ctreport:2 e d q ; need to make go.sh
"RTN","SAMICTRT",22,0)
d makeGo(fn,.filter)
"RTN","SAMICTRT",23,0)
zsy "bash /home/osehra/www/ctcontrol/go.sh"
"RTN","SAMICTRT",24,0)
l -ctreport ; all done with go.sh
"RTN","SAMICTRT",25,0)
;
"RTN","SAMICTRT",26,0)
d makeFrame(.testout,fn,.filter)
"RTN","SAMICTRT",27,0)
q
"RTN","SAMICTRT",28,0)
;
"RTN","SAMICTRT",29,0)
filename(filter) ; extrinsic returns the filename for output
"RTN","SAMICTRT",30,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMICTRT",31,0)
n sid
"RTN","SAMICTRT",32,0)
s sid=$g(filter("studyid"))
"RTN","SAMICTRT",33,0)
i sid="" s sid="XXX00102"
"RTN","SAMICTRT",34,0)
n pien s pien=$$SID2NUM^SAMIHOM3(sid)
"RTN","SAMICTRT",35,0)
n fname,lname
"RTN","SAMICTRT",36,0)
s fname=@root@(pien,"sinamef")
"RTN","SAMICTRT",37,0)
s lname=@root@(pien,"sinamel")
"RTN","SAMICTRT",38,0)
q lname_"_"_fname
"RTN","SAMICTRT",39,0)
;
"RTN","SAMICTRT",40,0)
makeGo(fn,filter) ; creates a bash script to run the elcap report
"RTN","SAMICTRT",41,0)
n fglb,fglb1,dir,destdir
"RTN","SAMICTRT",42,0)
s fglb=$na(^TMP("SAMITEST",$J))
"RTN","SAMICTRT",43,0)
k @fglb
"RTN","SAMICTRT",44,0)
s fglb1=$na(@fglb@(1))
"RTN","SAMICTRT",45,0)
s destdir=$$whereIs("/ctelcap")
"RTN","SAMICTRT",46,0)
n fname,lname,sid
"RTN","SAMICTRT",47,0)
s fname=$p(fn,"_",2)
"RTN","SAMICTRT",48,0)
s lname=$p(fn,"_",1)
"RTN","SAMICTRT",49,0)
s sid=$g(filter("studyid"))
"RTN","SAMICTRT",50,0)
i sid="" s sid="XXX00102"
"RTN","SAMICTRT",51,0)
;script run command redacted
"RTN","SAMICTRT",52,0)
s dir="/home/osehra/www/ctcontrol/"
"RTN","SAMICTRT",53,0)
d GTF^%ZISH(fglb1,3,dir,"go.sh")
"RTN","SAMICTRT",54,0)
q
"RTN","SAMICTRT",55,0)
;
"RTN","SAMICTRT",56,0)
makeFrame(out,fn,filter) ; creates an html file with a frame in /ctcompare
"RTN","SAMICTRT",57,0)
n fglb,fglb1,dir
"RTN","SAMICTRT",58,0)
s fglb=$na(^TMP("SAMITEST",$J))
"RTN","SAMICTRT",59,0)
k @fglb
"RTN","SAMICTRT",60,0)
s fglb1=$na(@fglb@(1))
"RTN","SAMICTRT",61,0)
s dir=$$whereIs("/ctcompare")
"RTN","SAMICTRT",62,0)
s @fglb@(1)="<html><head></head>"
"RTN","SAMICTRT",63,0)
s @fglb@(2)=" <frameset cols=""50,50"">"
"RTN","SAMICTRT",64,0)
s @fglb@(3)=" <frame src=""/resources/ctelcap/elcap_"_fn_".html"" name=""ELCAP"">"
"RTN","SAMICTRT",65,0)
s @fglb@(4)=" <frame src=""/resources/ctvapals/vapals_"_fn_".html"" name=""VAPALS"">"
"RTN","SAMICTRT",66,0)
s @fglb@(5)=" </frameset></html>"
"RTN","SAMICTRT",67,0)
d GTF^%ZISH(fglb1,3,dir,fn_".html")
"RTN","SAMICTRT",68,0)
;
"RTN","SAMICTRT",69,0)
s out=fglb
"RTN","SAMICTRT",70,0)
q
"RTN","SAMICTRT",71,0)
;
"RTN","SAMICTRT",72,0)
makeData(fn,filter) ; creates an elcap compatible data file
"RTN","SAMICTRT",73,0)
n sid,form
"RTN","SAMICTRT",74,0)
s sid=$g(filter("studyid"))
"RTN","SAMICTRT",75,0)
q:sid=""
"RTN","SAMICTRT",76,0)
s form=$g(filter("form"))
"RTN","SAMICTRT",77,0)
q:form=""
"RTN","SAMICTRT",78,0)
n fglb s fglb=$na(^TMP("SAMITEST",$J))
"RTN","SAMICTRT",79,0)
n fglb1 s fglb1=$na(@fglb@(1))
"RTN","SAMICTRT",80,0)
;
"RTN","SAMICTRT",81,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMICTRT",82,0)
q:root=""
"RTN","SAMICTRT",83,0)
;
"RTN","SAMICTRT",84,0)
n cnt s cnt=0
"RTN","SAMICTRT",85,0)
n groot s groot=$na(@root@("graph",sid,form))
"RTN","SAMICTRT",86,0)
n zi s zi=""
"RTN","SAMICTRT",87,0)
f s zi=$o(@groot@(zi)) q:zi="" d ;
"RTN","SAMICTRT",88,0)
. q:zi[" "
"RTN","SAMICTRT",89,0)
. s cnt=cnt+1
"RTN","SAMICTRT",90,0)
. n ln
"RTN","SAMICTRT",91,0)
. s ln=zi_"="_$g(@groot@(zi))
"RTN","SAMICTRT",92,0)
. s @fglb@(cnt)=ln
"RTN","SAMICTRT",93,0)
n dir s dir=$$whereIs("/ctdata")
"RTN","SAMICTRT",94,0)
d GTF^%ZISH(fglb1,3,dir,fn_".txt")
"RTN","SAMICTRT",95,0)
k @fglb
"RTN","SAMICTRT",96,0)
q
"RTN","SAMICTRT",97,0)
;
"RTN","SAMICTRT",98,0)
testdata ;
"RTN","SAMICTRT",99,0)
s filter("studyid")="XXX00102"
"RTN","SAMICTRT",100,0)
s filter("form")="ceform-2018-10-09"
"RTN","SAMICTRT",101,0)
s pgraph=$na(^%wd(17.040801,15,102))
"RTN","SAMICTRT",102,0)
s name=@pgraph@("sinamel")_"-"_@pgraph@("sinamef")
"RTN","SAMICTRT",103,0)
d makeData(name,.filter)
"RTN","SAMICTRT",104,0)
q
"RTN","SAMICTRT",105,0)
;
"RTN","SAMICTRT",106,0)
whereIs(dirname) ; extrinsic which returns a directory path
"RTN","SAMICTRT",107,0)
n root s root=$$setroot^%wd("seeGraph")
"RTN","SAMICTRT",108,0)
q:root=""
"RTN","SAMICTRT",109,0)
n dien,dir
"RTN","SAMICTRT",110,0)
s dien=$o(@root@("graph","ops",dirname,"distdir",""))
"RTN","SAMICTRT",111,0)
i $o(@root@("graph",dien,"type",""))'="directory" q ;
"RTN","SAMICTRT",112,0)
s dir=$o(@root@("graph",dien,"localdir",""))
"RTN","SAMICTRT",113,0)
i dir'="" s dir=dir_"/"
"RTN","SAMICTRT",114,0)
q dir
"RTN","SAMICTRT",115,0)
;
"RTN","SAMICTT0")
0^3^B70496932
"RTN","SAMICTT0",1,0)
SAMICTT0 ;ven/gpl - text based ctreport ; 2/14/19 10:29am
"RTN","SAMICTT0",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT0",3,0)
;
"RTN","SAMICTT0",4,0)
;
"RTN","SAMICTT0",5,0)
quit ; no entry from top
"RTN","SAMICTT0",6,0)
;
"RTN","SAMICTT0",7,0)
WSREPORT(return,filter) ; web service which returns an html cteval report
"RTN","SAMICTT0",8,0)
;
"RTN","SAMICTT0",9,0)
s debug=0
"RTN","SAMICTT0",10,0)
n outmode s outmode="go"
"RTN","SAMICTT0",11,0)
n line s line=""
"RTN","SAMICTT0",12,0)
i $g(filter("debug"))=1 s debug=1
"RTN","SAMICTT0",13,0)
;
"RTN","SAMICTT0",14,0)
;s rtn=$na(^TMP("SAMICTT",$J))
"RTN","SAMICTT0",15,0)
s rtn="return"
"RTN","SAMICTT0",16,0)
k @rtn
"RTN","SAMICTT0",17,0)
s HTTPRSP("mime")="text/html"
"RTN","SAMICTT0",18,0)
;
"RTN","SAMICTT0",19,0)
n cnt s cnt=0 ; line number
"RTN","SAMICTT0",20,0)
;
"RTN","SAMICTT0",21,0)
; set up dictionary and patient values
"RTN","SAMICTT0",22,0)
;
"RTN","SAMICTT0",23,0)
n dict,vals
"RTN","SAMICTT0",24,0)
;d INIT^SAMICTD2("dict")
"RTN","SAMICTT0",25,0)
s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT0",26,0)
s dict=$na(@dict@("cteval-dict"))
"RTN","SAMICTT0",27,0)
i $g(@dict@("pet"))="" d INIT2GPH^SAMICTD2 ; initialize the dictionary first time
"RTN","SAMICTT0",28,0)
n si
"RTN","SAMICTT0",29,0)
s si=$g(filter("studyid"))
"RTN","SAMICTT0",30,0)
i si="" d ;
"RTN","SAMICTT0",31,0)
. s si="XXX00102"
"RTN","SAMICTT0",32,0)
q:si=""
"RTN","SAMICTT0",33,0)
n samikey
"RTN","SAMICTT0",34,0)
s samikey=$g(filter("form"))
"RTN","SAMICTT0",35,0)
i samikey="" d ;
"RTN","SAMICTT0",36,0)
. s samikey="ceform-2018-10-09"
"RTN","SAMICTT0",37,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMICTT0",38,0)
i $g(filter("studyid"))="" s root=$$setroot^%wd("vapals-patients")
"RTN","SAMICTT0",39,0)
s vals=$na(@root@("graph",si,samikey))
"RTN","SAMICTT0",40,0)
;W !,vals
"RTN","SAMICTT0",41,0)
;zwr @vals@(*)
"RTN","SAMICTT0",42,0)
i '$d(@vals) d q ;
"RTN","SAMICTT0",43,0)
. w !,"error, patient values not found"
"RTN","SAMICTT0",44,0)
;
"RTN","SAMICTT0",45,0)
; report parameters
"RTN","SAMICTT0",46,0)
;
"RTN","SAMICTT0",47,0)
n nt,sectionheader,dummy,cac,tex,para,legout
"RTN","SAMICTT0",48,0)
;; n lang,lanread
"RTN","SAMICTT0",49,0)
;
"RTN","SAMICTT0",50,0)
s nt=1
"RTN","SAMICTT0",51,0)
s sectionheader=1
"RTN","SAMICTT0",52,0)
;;s dummy="******"
"RTN","SAMICTT0",53,0)
s cac=""
"RTN","SAMICTT0",54,0)
n cacrec s cacrec=""
"RTN","SAMICTT0",55,0)
;;s tex=0
"RTN","SAMICTT0",56,0)
;s para="<p>"
"RTN","SAMICTT0",57,0)
;s para=$char(13,10)
"RTN","SAMICTT0",58,0)
s para=""
"RTN","SAMICTT0",59,0)
;;s legout=0
"RTN","SAMICTT0",60,0)
n qheader s qheader=0
"RTN","SAMICTT0",61,0)
;
"RTN","SAMICTT0",62,0)
n lang s lang=""
"RTN","SAMICTT0",63,0)
n langread s langread=0
"RTN","SAMICTT0",64,0)
;
"RTN","SAMICTT0",65,0)
n auth s auth("perm")="a"
"RTN","SAMICTT0",66,0)
s auth("inst")=$g(filter("auth"))
"RTN","SAMICTT0",67,0)
;
"RTN","SAMICTT0",68,0)
n newct s newct=0
"RTN","SAMICTT0",69,0)
i $$XVAL("ceoppa",vals)'="" s newct=1
"RTN","SAMICTT0",70,0)
;
"RTN","SAMICTT0",71,0)
n registryForm s registryForm=0
"RTN","SAMICTT0",72,0)
i $$XVAL("ceaf",vals)'="" s registryForm=1
"RTN","SAMICTT0",73,0)
;
"RTN","SAMICTT0",74,0)
;d OUT("<HTML>")
"RTN","SAMICTT0",75,0)
;d OUT("<HEAD>")
"RTN","SAMICTT0",76,0)
;d OUT("<!-- Calling TR: CT Evaluation Report -->")
"RTN","SAMICTT0",77,0)
;d OUT("<TITLE>CT Evaluation Report</TITLE>")
"RTN","SAMICTT0",78,0)
;d OUT("<link rel='stylesheet' href='/css/report.css'>")
"RTN","SAMICTT0",79,0)
;d OUT("</HEAD>")
"RTN","SAMICTT0",80,0)
;d OUT("<BODY BGCOLOR=""#ffffff"" TEXT=""#000000"">")
"RTN","SAMICTT0",81,0)
;;d OUT("<TABLE border=""0"" cellspacing=""0"" cellpadding=""3"" WIDTH=""640""><TR><TD>")
"RTN","SAMICTT0",82,0)
;d OUT("<FONT SIZE=""+2""><CENTER>")
"RTN","SAMICTT0",83,0)
;d OUT("<!-- Calling TR: CT Evaluation Report -->")
"RTN","SAMICTT0",84,0)
;d OUT("<B>CT Evaluation Report</B>")
"RTN","SAMICTT0",85,0)
d OUT("CT Evaluation Report")
"RTN","SAMICTT0",86,0)
;d OUT("</CENTER></FONT>")
"RTN","SAMICTT0",87,0)
;d OUT("</TD></TR><TR><TD>")
"RTN","SAMICTT0",88,0)
;d OUT("<HR SIZE=""2"" WIDTH=""100%"" ALIGN=""center"" NOSHADE>")
"RTN","SAMICTT0",89,0)
;d OUT("</TD></TR>")
"RTN","SAMICTT0",90,0)
;
"RTN","SAMICTT0",91,0)
;d OUT("<!-- patient information -->")
"RTN","SAMICTT0",92,0)
;d OUT("<TR><TD><TABLE border=""0"" cellspacing=""0"" cellpadding=""3"" WIDTH=""640"">")
"RTN","SAMICTT0",93,0)
;
"RTN","SAMICTT0",94,0)
; generate header
"RTN","SAMICTT0",95,0)
;
"RTN","SAMICTT0",96,0)
d ;
"RTN","SAMICTT0",97,0)
. n pname
"RTN","SAMICTT0",98,0)
. ;s pname=$$XVAL("sinamel",vals)_", "_$$XVAL("sinamef",vals)
"RTN","SAMICTT0",99,0)
. s pname=$$XVAL("saminame",vals)
"RTN","SAMICTT0",100,0)
. d OUT("Participant Name: "_pname)
"RTN","SAMICTT0",101,0)
;d OUT("<TR><TD WIDTH=""180""><B>Participant Name:</B></TD><TD WIDTH=""365"">")
"RTN","SAMICTT0",102,0)
;d OUT($$XVAL("sinamel",vals)_", "_$$XVAL("sinamef",vals))
"RTN","SAMICTT0",103,0)
;d OUT("</TD>")
"RTN","SAMICTT0",104,0)
;
"RTN","SAMICTT0",105,0)
d ;
"RTN","SAMICTT0",106,0)
. n sid s sid=$$XVAL("sisid",vals)
"RTN","SAMICTT0",107,0)
. d OUT("Study ID: "_sid)
"RTN","SAMICTT0",108,0)
;d OUT("<TD WIDTH=""120""><B>Study ID:</B></TD><TD WIDTH=""75"">")
"RTN","SAMICTT0",109,0)
;d OUT($$XVAL("sisid",vals))
"RTN","SAMICTT0",110,0)
;d OUT("</TD>")
"RTN","SAMICTT0",111,0)
;
"RTN","SAMICTT0",112,0)
d ;
"RTN","SAMICTT0",113,0)
. n etype s etype=$$XSUB("cetex",vals,dict)_" "_$$XSUB("cectp",vals,dict)
"RTN","SAMICTT0",114,0)
. d OUT("Type of Examination: "_etype)
"RTN","SAMICTT0",115,0)
;d OUT("<TR><TD><B>Type of Examination:</B></TD><TD>")
"RTN","SAMICTT0",116,0)
;d OUT($$XSUB("cetex",vals,dict)_" "_$$XSUB("cectp",vals,dict))
"RTN","SAMICTT0",117,0)
;d OUT("</TD>")
"RTN","SAMICTT0",118,0)
;d OUT("<TD> </TD><TD> </TD></TR>")
"RTN","SAMICTT0",119,0)
;
"RTN","SAMICTT0",120,0)
d ;
"RTN","SAMICTT0",121,0)
. n edate s edate=$$XVAL("cedos",vals)
"RTN","SAMICTT0",122,0)
. d OUT("Examination Date: "_edate)
"RTN","SAMICTT0",123,0)
;d OUT("<TR><TD><B>Examination Date:</B></TD><TD>")
"RTN","SAMICTT0",124,0)
;d OUT($$XVAL("cedos",vals))
"RTN","SAMICTT0",125,0)
;
"RTN","SAMICTT0",126,0)
;i $$XVAL("sidob",vals)'=-1 d ;
"RTN","SAMICTT0",127,0)
;. d OUT("<TD><B>Date of Birth:</B></TD><TD>")
"RTN","SAMICTT0",128,0)
;. d OUT($$XVAL("sidob",vals))
"RTN","SAMICTT0",129,0)
;e d OUT("<TD> </TD><TD> </TD></TR>")
"RTN","SAMICTT0",130,0)
;
"RTN","SAMICTT0",131,0)
d ;
"RTN","SAMICTT0",132,0)
. n dob s dob=$$XVAL("sidob",vals)
"RTN","SAMICTT0",133,0)
. i dob>0 d OUT("Date of Birth: "_dob)
"RTN","SAMICTT0",134,0)
. d OUT("")
"RTN","SAMICTT0",135,0)
;i $$XVAL("sidob",vals)>0 d ;
"RTN","SAMICTT0",136,0)
;. d OUT("<TD><B>Date of Birth:</B></TD><TD>")
"RTN","SAMICTT0",137,0)
;. d OUT($$XVAL("sidob",vals))
"RTN","SAMICTT0",138,0)
;. d OUT("</TD></TR>")
"RTN","SAMICTT0",139,0)
;e d ;
"RTN","SAMICTT0",140,0)
;. d OUT("<TD> </TD><TD> </TD></TR>")
"RTN","SAMICTT0",141,0)
;
"RTN","SAMICTT0",142,0)
;# End of Header
"RTN","SAMICTT0",143,0)
;
"RTN","SAMICTT0",144,0)
;d OUT("</TABLE>")
"RTN","SAMICTT0",145,0)
;;d OUT("</TD></TR><TR><TD>")
"RTN","SAMICTT0",146,0)
;d OUT("<HR SIZE=""2"" WIDTH=""100%"" ALIGN=""center"" NOSHADE>")
"RTN","SAMICTT0",147,0)
;d OUT("</TD></TR>")
"RTN","SAMICTT0",148,0)
;d OUT("<!-- report -->")
"RTN","SAMICTT0",149,0)
;d OUT("<TR><TD>")
"RTN","SAMICTT0",150,0)
;d OUT("<FONT SIZE=""+2""><B>")
"RTN","SAMICTT0",151,0)
;d OUT("Report:")
"RTN","SAMICTT0",152,0)
;d OUT("</B></FONT>")
"RTN","SAMICTT0",153,0)
;d OUT("</TD></TR><TR><TD><TABLE><TR><TD WIDTH=20></TD><TD>")
"RTN","SAMICTT0",154,0)
d OUT("Report:")
"RTN","SAMICTT0",155,0)
;
"RTN","SAMICTT0",156,0)
s outmode="hold"
"RTN","SAMICTT0",157,0)
s line=""
"RTN","SAMICTT0",158,0)
i $$XVAL("ceclin",vals)'="" d ;
"RTN","SAMICTT0",159,0)
. d HOUT("Clinical Information: ")
"RTN","SAMICTT0",160,0)
. d OUT($$XVAL("ceclin",vals))
"RTN","SAMICTT0",161,0)
. s outmode="go" d OUT("")
"RTN","SAMICTT0",162,0)
;
"RTN","SAMICTT0",163,0)
s outmode="hold"
"RTN","SAMICTT0",164,0)
n nopri s nopri=1
"RTN","SAMICTT0",165,0)
d HOUT("Comparison CT Scans: ")
"RTN","SAMICTT0",166,0)
if $$XVAL("cedcs",vals)'="" d ;
"RTN","SAMICTT0",167,0)
. d OUT($$XSUB("cetex",vals,dict)_". ")
"RTN","SAMICTT0",168,0)
. d OUT("Comparisons: "_$$XVAL("cedcs",vals))
"RTN","SAMICTT0",169,0)
. s nopri=0
"RTN","SAMICTT0",170,0)
if $$XVAL("cedps",vals)'="" d ;
"RTN","SAMICTT0",171,0)
. d OUT(" "_$$XVAL("cedps",vals))
"RTN","SAMICTT0",172,0)
. s nopri=0
"RTN","SAMICTT0",173,0)
d:nopri OUT("None")
"RTN","SAMICTT0",174,0)
s outmode="go" d OUT("")
"RTN","SAMICTT0",175,0)
;
"RTN","SAMICTT0",176,0)
s outmode="hold"
"RTN","SAMICTT0",177,0)
d HOUT(" Description: ")
"RTN","SAMICTT0",178,0)
i $$XVAL("cectp",vals)="i" d ;
"RTN","SAMICTT0",179,0)
. d OUT("Limited Diagnostic CT examination was performed.")
"RTN","SAMICTT0",180,0)
e d ;
"RTN","SAMICTT0",181,0)
. d OUT("CT examination of the entire thorax was performed at "_$$XSUB("cectp",vals,dict)_" settings.")
"RTN","SAMICTT0",182,0)
;
"RTN","SAMICTT0",183,0)
i $$XVAL("cectrst",vals)'="" d ;
"RTN","SAMICTT0",184,0)
. d OUT(" Images were obtained at "_$$XVAL("cectrst",vals)_" mm slice thickness.")
"RTN","SAMICTT0",185,0)
. d OUT(" Multiplanar reconstructions were performed.")
"RTN","SAMICTT0",186,0)
;
"RTN","SAMICTT0",187,0)
i newct d ;
"RTN","SAMICTT0",188,0)
. n nvadbo s nvadbo=1
"RTN","SAMICTT0",189,0)
. n ii
"RTN","SAMICTT0",190,0)
. f ii="ceoaa","ceaga","ceasa","ceala","ceapa","ceaaa","ceaka" d ;
"RTN","SAMICTT0",191,0)
. . i $$XVAL(ii,vals)="y" set nvadbo=0
"RTN","SAMICTT0",192,0)
. ;
"RTN","SAMICTT0",193,0)
. i nvadbo=1 d ;
"RTN","SAMICTT0",194,0)
. . d OUT("Upper abdominal images were not acquired on the current scan due to its limited nature.")
"RTN","SAMICTT0",195,0)
s outmode="go" d OUT("")
"RTN","SAMICTT0",196,0)
;
"RTN","SAMICTT0",197,0)
; lung nodules
"RTN","SAMICTT0",198,0)
;
"RTN","SAMICTT0",199,0)
;d OUT("")
"RTN","SAMICTT0",200,0)
d HOUT("Lung Nodules:")
"RTN","SAMICTT0",201,0)
;d OUT("")
"RTN","SAMICTT0",202,0)
;
"RTN","SAMICTT0",203,0)
; see if there are any nodules using the cectXch fields
"RTN","SAMICTT0",204,0)
;
"RTN","SAMICTT0",205,0)
n ij,hasnodules s hasnodules=0
"RTN","SAMICTT0",206,0)
f ij=1:1:10 i ($$XVAL("cect"_ij_"ch",vals)'="")&($$XVAL("cect"_ij_"ch",vals)'="-") s hasnodules=1
"RTN","SAMICTT0",207,0)
;
"RTN","SAMICTT0",208,0)
i hasnodules=0 d ;
"RTN","SAMICTT0",209,0)
. d OUT(para)
"RTN","SAMICTT0",210,0)
. d OUT("No pulmonary nodules are seen."_para)
"RTN","SAMICTT0",211,0)
;
"RTN","SAMICTT0",212,0)
;i $$XVAL("cennod",vals)="" d ;
"RTN","SAMICTT0",213,0)
;. d OUT(para)
"RTN","SAMICTT0",214,0)
;. d OUT("No pulmonary nodules are seen."_para)
"RTN","SAMICTT0",215,0)
;e i $$XVAL("ceanod",vals)="n" d ;
"RTN","SAMICTT0",216,0)
;. d OUT(para)
"RTN","SAMICTT0",217,0)
;. d OUT("No pulmonary nodules are seen."_para)
"RTN","SAMICTT0",218,0)
;
"RTN","SAMICTT0",219,0)
d NODULES^SAMICTT1(rtn,.vals,.dict)
"RTN","SAMICTT0",220,0)
;
"RTN","SAMICTT0",221,0)
d OTHRLUNG^SAMICTT2(rtn,.vals,.dict)
"RTN","SAMICTT0",222,0)
;
"RTN","SAMICTT0",223,0)
d EMPHYS^SAMICTT3(rtn,.vals,.dict)
"RTN","SAMICTT0",224,0)
;
"RTN","SAMICTT0",225,0)
d BREAST^SAMICTT4(rtn,.vals,.dict)
"RTN","SAMICTT0",226,0)
;
"RTN","SAMICTT0",227,0)
d IMPRSN^SAMICTT9(rtn,.vals,.dict)
"RTN","SAMICTT0",228,0)
;
"RTN","SAMICTT0",229,0)
d RCMND^SAMICTTA(rtn,.vals,.dict)
"RTN","SAMICTT0",230,0)
;
"RTN","SAMICTT0",231,0)
; etc etc
"RTN","SAMICTT0",232,0)
;
"RTN","SAMICTT0",233,0)
d ;
"RTN","SAMICTT0",234,0)
. d OUT("References:")
"RTN","SAMICTT0",235,0)
. d OUT("Recommendations for nodules and other findings are detailed in the I-ELCAP Protocol.")
"RTN","SAMICTT0",236,0)
. d OUT("A summary and the full I-ELCAP protocol can be viewed at: http://ielcap.org/protocols")
"RTN","SAMICTT0",237,0)
;d OUT("</TABLE>")
"RTN","SAMICTT0",238,0)
;d OUT("<p><br></p><p><b>References:</b><br></p>")
"RTN","SAMICTT0",239,0)
;d OUT("<p>Recommendations for nodules and other findings are detailed in the I-ELCAP Protocol.<BR>")
"RTN","SAMICTT0",240,0)
;d OUT("A summary and the full I-ELCAP protocol can be viewed at: <a href=""http://ielcap.org/protocols"">http://ielcap.org/protocols</a></p>")
"RTN","SAMICTT0",241,0)
;d OUT("</TD></TR></TABLE></TD></TR></TABLE>")
"RTN","SAMICTT0",242,0)
;s debug=1
"RTN","SAMICTT0",243,0)
d:$g(debug) ;
"RTN","SAMICTT0",244,0)
. n zi s zi=""
"RTN","SAMICTT0",245,0)
. f s zi=$o(@vals@(zi)) q:zi="" d ;
"RTN","SAMICTT0",246,0)
. . d OUT(zi_" "_$g(@vals@(zi)))
"RTN","SAMICTT0",247,0)
;d OUT("</BODY></HTML>")
"RTN","SAMICTT0",248,0)
;
"RTN","SAMICTT0",249,0)
q
"RTN","SAMICTT0",250,0)
;
"RTN","SAMICTT0",251,0)
OUT(ln) ;
"RTN","SAMICTT0",252,0)
i outmode="hold" s line=line_ln q ;
"RTN","SAMICTT0",253,0)
s cnt=cnt+1
"RTN","SAMICTT0",254,0)
n lnn
"RTN","SAMICTT0",255,0)
i $g(debug)'=1 s debug=0
"RTN","SAMICTT0",256,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT0",257,0)
i outmode="go" d ;
"RTN","SAMICTT0",258,0)
. s @rtn@(lnn)=line
"RTN","SAMICTT0",259,0)
. s line=""
"RTN","SAMICTT0",260,0)
. s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT0",261,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT0",262,0)
i $g(debug)=1 d ;
"RTN","SAMICTT0",263,0)
. i ln["<" q ; no markup
"RTN","SAMICTT0",264,0)
. n zs s zs=$STACK
"RTN","SAMICTT0",265,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT0",266,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT0",267,0)
q
"RTN","SAMICTT0",268,0)
;
"RTN","SAMICTT0",269,0)
OUTOLD(ln) ;
"RTN","SAMICTT0",270,0)
s cnt=cnt+1
"RTN","SAMICTT0",271,0)
n lnn
"RTN","SAMICTT0",272,0)
;s debug=1
"RTN","SAMICTT0",273,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT0",274,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT0",275,0)
i $g(debug)=1 d ;
"RTN","SAMICTT0",276,0)
. i ln["<" q ; no markup
"RTN","SAMICTT0",277,0)
. n zs s zs=$STACK
"RTN","SAMICTT0",278,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT0",279,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT0",280,0)
q
"RTN","SAMICTT0",281,0)
;
"RTN","SAMICTT0",282,0)
HOUT(ln) ;
"RTN","SAMICTT0",283,0)
d OUT(ln)
"RTN","SAMICTT0",284,0)
;d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT0",285,0)
q
"RTN","SAMICTT0",286,0)
;
"RTN","SAMICTT0",287,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT0",288,0)
; vals is passed by name
"RTN","SAMICTT0",289,0)
n zr
"RTN","SAMICTT0",290,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT0",291,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT0",292,0)
q zr
"RTN","SAMICTT0",293,0)
;
"RTN","SAMICTT0",294,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT0",295,0)
; vals and dict are passed by name
"RTN","SAMICTT0",296,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT0",297,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT0",298,0)
n zr,zv,zdx
"RTN","SAMICTT0",299,0)
s zdx=$g(valdx)
"RTN","SAMICTT0",300,0)
i zdx="" s zdx=var
"RTN","SAMICTT0",301,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT0",302,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT0",303,0)
i zv="" s zr="" q zr
"RTN","SAMICTT0",304,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT0",305,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT0",306,0)
q zr
"RTN","SAMICTT0",307,0)
;
"RTN","SAMICTT0",308,0)
GETFILTR(filter,sid) ; fill in the filter for Ct Eval for sid
"RTN","SAMICTT0",309,0)
s filter("studyid")=sid
"RTN","SAMICTT0",310,0)
n items,zform
"RTN","SAMICTT0",311,0)
d GETITEMS^SAMICASE("items",sid)
"RTN","SAMICTT0",312,0)
s zform=$o(items("ceform"))
"RTN","SAMICTT0",313,0)
s filter("form")=zform
"RTN","SAMICTT0",314,0)
;zwr filter
"RTN","SAMICTT0",315,0)
q
"RTN","SAMICTT0",316,0)
T1(grtn,debug) ;
"RTN","SAMICTT0",317,0)
n filter
"RTN","SAMICTT0",318,0)
;n sid s sid="XXX00333"
"RTN","SAMICTT0",319,0)
;n sid s sid="XXX00484"
"RTN","SAMICTT0",320,0)
n sid s sid="XXX9000001"
"RTN","SAMICTT0",321,0)
d GETFILTR(.filter,sid)
"RTN","SAMICTT0",322,0)
i $g(debug)=1 s filter("debug")=1
"RTN","SAMICTT0",323,0)
d WSNOTE^SAMINOT3(.grtn,.filter)
"RTN","SAMICTT0",324,0)
;d WSREPORT^SAMICTT0(.grtn,.filter)
"RTN","SAMICTT0",325,0)
q
"RTN","SAMICTT0",326,0)
;
"RTN","SAMICTT1")
0^4^B82363207
"RTN","SAMICTT1",1,0)
SAMICTT1 ;ven/gpl - ielcap: forms ; 12/28/18 10:54am
"RTN","SAMICTT1",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT1",3,0)
;
"RTN","SAMICTT1",4,0)
;
"RTN","SAMICTT1",5,0)
quit ; no entry from top
"RTN","SAMICTT1",6,0)
;
"RTN","SAMICTT1",7,0)
NODULES(rtn,vals,dict) ;
"RTN","SAMICTT1",8,0)
;
"RTN","SAMICTT1",9,0)
;
"RTN","SAMICTT1",10,0)
;# Report on Nodules
"RTN","SAMICTT1",11,0)
n firstitem
"RTN","SAMICTT1",12,0)
set firstitem=0
"RTN","SAMICTT1",13,0)
n outmode s outmode="hold"
"RTN","SAMICTT1",14,0)
n line s line=""
"RTN","SAMICTT1",15,0)
n ii set ii=1
"RTN","SAMICTT1",16,0)
;# Information for each nodule
"RTN","SAMICTT1",17,0)
f ii=1:1:10 d ;
"RTN","SAMICTT1",18,0)
. i $$XSUB("cectch",vals,dict,"cect"_ii_"ch")="px" q ;
"RTN","SAMICTT1",19,0)
. i $$XSUB("cectch",vals,dict,"cect"_ii_"ch")="" q ;
"RTN","SAMICTT1",20,0)
. i firstitem=0 d ;
"RTN","SAMICTT1",21,0)
. . ;d OUT("<!-- begin nodule info -->")
"RTN","SAMICTT1",22,0)
. . ;d OUT("<UL TYPE=disc>")
"RTN","SAMICTT1",23,0)
. . set firstitem=1
"RTN","SAMICTT1",24,0)
. ;
"RTN","SAMICTT1",25,0)
. ;d OUT("<LI>")
"RTN","SAMICTT1",26,0)
. n specialcase s specialcase=0
"RTN","SAMICTT1",27,0)
. n ij,ik
"RTN","SAMICTT1",28,0)
. s ik=$$XVAL("cect"_ii_"ch",vals)
"RTN","SAMICTT1",29,0)
. ;f ij="pw","px","pr","pv" i ij=ik s specialcase=1
"RTN","SAMICTT1",30,0)
. i "pwpxprpv"[ik s specialcase=1
"RTN","SAMICTT1",31,0)
. ;
"RTN","SAMICTT1",32,0)
. ;# Example Sentence
"RTN","SAMICTT1",33,0)
. ;# LUL Nodule 1 is non-calcified, non-solid, 6 mm x 6 mm (with 3 x 3) solid component), smooth edge, previously seen and unchanged. (Series 2, Image 65)
"RTN","SAMICTT1",34,0)
. ;# [LOCATION] Nodule [N] is [CALCIFICATION], [SOLID], [L] mm x mm, [SMOOTH], [NEW]. (Series [Series], Image [ImageNum]).
"RTN","SAMICTT1",35,0)
. ;
"RTN","SAMICTT1",36,0)
. n spic s spic=""
"RTN","SAMICTT1",37,0)
. i $$XVAL("cect"_ii_"sp",vals)="y" s spic="spiculated, "
"RTN","SAMICTT1",38,0)
. ;
"RTN","SAMICTT1",39,0)
. n calcification,calcstr,status
"RTN","SAMICTT1",40,0)
. s status=$$XVAL("cect"_ii_"st",vals)
"RTN","SAMICTT1",41,0)
. s @vals@("cect"_ii_"ca")=$s(status="bc":"y",status="pc":"q",1:"n")
"RTN","SAMICTT1",42,0)
. s calcification=$$XSUB("cectca",vals,dict,"cect"_ii_"ca")
"RTN","SAMICTT1",43,0)
. i calcification="" s calcstr="is "_spic_$$XSUB("cectnt",vals,dict,"cect"_ii_"nt")_", "
"RTN","SAMICTT1",44,0)
. e s calcstr="is "_calcification_", "_spic_$$XSUB("cectnt",vals,dict,"cect"_ii_"nt")_", "
"RTN","SAMICTT1",45,0)
. ;
"RTN","SAMICTT1",46,0)
. n scomp
"RTN","SAMICTT1",47,0)
. s scomp=""
"RTN","SAMICTT1",48,0)
. i $$XVAL("cect"_ii_"ssl",vals)'="" d ;
"RTN","SAMICTT1",49,0)
. . s scomp=" (solid component "_$$XVAL("cect"_ii_"ssl",vals)_" mm x "_$$XVAL("cect"_ii_"ssw",vals)_" mm)"
"RTN","SAMICTT1",50,0)
. ;
"RTN","SAMICTT1",51,0)
. s calcstr=calcstr_$$XVAL("cect"_ii_"sl",vals)_" mm x "_$$XVAL("cect"_ii_"sw",vals)_" mm"_scomp_", "
"RTN","SAMICTT1",52,0)
. ;
"RTN","SAMICTT1",53,0)
. n smooth
"RTN","SAMICTT1",54,0)
. ;s smooth=$$XSUB("cectse",vals,dict,"cect"_ii_"se")
"RTN","SAMICTT1",55,0)
. s smooth=$$XVAL("cect"_ii_"se",vals)
"RTN","SAMICTT1",56,0)
. i smooth="y" s calcstr=calcstr_"smooth edges, "
"RTN","SAMICTT1",57,0)
. ;e s calcstr=calcstr_smooth_" edges, " ;nothing if not smooth
"RTN","SAMICTT1",58,0)
. ;
"RTN","SAMICTT1",59,0)
. ; adding distance from costal pleura
"RTN","SAMICTT1",60,0)
. n pldstr
"RTN","SAMICTT1",61,0)
. s pldstr="within "_$$XVAL("cect"_ii_"pld",vals)_" mm of the costal pleura"
"RTN","SAMICTT1",62,0)
. ;
"RTN","SAMICTT1",63,0)
. n skip s skip=0
"RTN","SAMICTT1",64,0)
. ;# 3 cases: parenchymal, endobronchial, and both
"RTN","SAMICTT1",65,0)
. ;
"RTN","SAMICTT1",66,0)
. n en,loc,nloc,endo,ll
"RTN","SAMICTT1",67,0)
. s loc=""
"RTN","SAMICTT1",68,0)
. s nloc=""
"RTN","SAMICTT1",69,0)
. s en=$$XVAL("cect"_ii_"en",vals)
"RTN","SAMICTT1",70,0)
. s ll=$$XVAL("cect"_ii_"ll",vals)
"RTN","SAMICTT1",71,0)
. i ($l(en)<2)!(en="no")!(en="") d ;
"RTN","SAMICTT1",72,0)
. . ;# 1) parenchymal only
"RTN","SAMICTT1",73,0)
. . n X,Y s X=ll
"RTN","SAMICTT1",74,0)
. . X ^%ZOSF("UPPERCASE")
"RTN","SAMICTT1",75,0)
. . s loc=Y
"RTN","SAMICTT1",76,0)
. . s nloc=Y
"RTN","SAMICTT1",77,0)
. . s endo="Nodule"
"RTN","SAMICTT1",78,0)
. e d ;
"RTN","SAMICTT1",79,0)
. . i ll="end" d ;
"RTN","SAMICTT1",80,0)
. . . ;# 2) Endobronchial only
"RTN","SAMICTT1",81,0)
. . . i en="tr" d ;
"RTN","SAMICTT1",82,0)
. . . . s endo="Endotracheal Nodule"
"RTN","SAMICTT1",83,0)
. . . . i specialcase=1 d ;
"RTN","SAMICTT1",84,0)
. . . . . d OUT("Previously seen "_endo_" "_ii_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",85,0)
. . . . e d ;
"RTN","SAMICTT1",86,0)
. . . . . i ($$XVAL("cetex",vals)="b")&($$XVAL("cectch"_ii_"ch",vals)="n") d ;
"RTN","SAMICTT1",87,0)
. . . . . . d OUT(endo_" "_ii_" "_calcstr_" is seen.")
"RTN","SAMICTT1",88,0)
. . . . . e d OUT(endo_" "_ii_" "_calcstr_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",89,0)
. . . . s skip=1
"RTN","SAMICTT1",90,0)
. . . i en="rm" d ;
"RTN","SAMICTT1",91,0)
. . . . s endo="Nodule"
"RTN","SAMICTT1",92,0)
. . . . s nloc=$$XSUB("cecten",vals,dict,"cect"_ii_"en")
"RTN","SAMICTT1",93,0)
. . . . i specialcase=1 d ;
"RTN","SAMICTT1",94,0)
. . . . . ;d OUT("Previously seen "_nloc_" "_endo_" "_ii_" ")
"RTN","SAMICTT1",95,0)
. . . . . d OUT("Previously seen "_endo_" "_ii_" in the "_nloc_" "_calcstr_" ")
"RTN","SAMICTT1",96,0)
. . . . . d OUT($$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",97,0)
. . . . e d ;
"RTN","SAMICTT1",98,0)
. . . . . i ($$XVAL("cetex",vals)="b")&($$XVAL("cect"_ii_"ch",vals)="n") d ;
"RTN","SAMICTT1",99,0)
. . . . . . ;d OUT(nloc_" "_endo_" "_ii_".")
"RTN","SAMICTT1",100,0)
. . . . . . d OUT(endo_" "_ii_" is seen in the "_nloc_" "_calcstr_".")
"RTN","SAMICTT1",101,0)
. . . . . ;e d OUT(nloc_" "_endo_" "_ii_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",102,0)
. . . . . e d OUT(endo_" "_ii_" in the "_nloc_" "_calcstr_", "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",103,0)
. . . . s skip=1
"RTN","SAMICTT1",104,0)
. . . i en="bi" d ;
"RTN","SAMICTT1",105,0)
. . . . s endo="Nodule"
"RTN","SAMICTT1",106,0)
. . . . s loc=$$XSUB("cecten",vals,dict,"cect"_ii_"en")
"RTN","SAMICTT1",107,0)
. . . . i specialcase=1 d ;
"RTN","SAMICTT1",108,0)
. . . . . ;d OUT("Previously seen "_endo_" "_ii_" in the "_loc)
"RTN","SAMICTT1",109,0)
. . . . . d OUT("Previously seen "_endo_" "_ii_" in the "_nloc_" "_calcstr_" ")
"RTN","SAMICTT1",110,0)
. . . . . d OUT($$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",111,0)
. . . . e d ;
"RTN","SAMICTT1",112,0)
. . . . . i ($$XVAL("cetex",vals)="b")&($$XVAL("cect"_ii_"ch",vals)="n") d ;
"RTN","SAMICTT1",113,0)
. . . . . . ;d OUT(endo_" "_ii_" is seen in the "_loc_".")
"RTN","SAMICTT1",114,0)
. . . . . . d OUT(endo_" "_ii_" is seen in the "_loc_" "_calcstr_".")
"RTN","SAMICTT1",115,0)
. . . . . e d OUT(nloc_" "_endo_" "_ii_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",116,0)
. . . . s skip=1
"RTN","SAMICTT1",117,0)
. . . i skip=0 d ; "default"
"RTN","SAMICTT1",118,0)
. . . . s endo="Nodule"
"RTN","SAMICTT1",119,0)
. . . . n X,Y
"RTN","SAMICTT1",120,0)
. . . . s X=$$XVAL("cect"_ii_"en",vals)
"RTN","SAMICTT1",121,0)
. . . . X ^%ZOSF("UPPERCASE")
"RTN","SAMICTT1",122,0)
. . . . s nloc=Y
"RTN","SAMICTT1",123,0)
. . . . i specialcase=1 d ;
"RTN","SAMICTT1",124,0)
. . . . . d OUT(nloc_" "_endo_" "_ii_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_", likely endobronchial.")
"RTN","SAMICTT1",125,0)
. . . . e d ;
"RTN","SAMICTT1",126,0)
. . . . . ;i ($$XVAL("cetex",vals)="b")&($$XSUB("cectch",vals,dict,"cect"_ii_"ch")="n") d ;
"RTN","SAMICTT1",127,0)
. . . . . i (($$XVAL("cetex",vals)="b")&($$XVAL("cect"_ii_"ch",vals)="n")) d ; gpl 1002
"RTN","SAMICTT1",128,0)
. . . . . . d OUT(nloc_" "_endo_" "_ii_" "_calcstr_" likely endobronchial.")
"RTN","SAMICTT1",129,0)
. . . . . e d OUT(nloc_" "_endo_" "_ii_" "_calcstr_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_" likely endobronchial.")
"RTN","SAMICTT1",130,0)
. . . . s skip=1
"RTN","SAMICTT1",131,0)
. . e d ;
"RTN","SAMICTT1",132,0)
. . . s endo="Nodule"
"RTN","SAMICTT1",133,0)
. . . s loc=$$XSUB("cectll",vals,dict,"cect"_ii_"ll")
"RTN","SAMICTT1",134,0)
. . . n X,Y
"RTN","SAMICTT1",135,0)
. . . s X=$$XVAL("cect"_ii_"en",vals)
"RTN","SAMICTT1",136,0)
. . . X ^%ZOSF("UPPERCASE")
"RTN","SAMICTT1",137,0)
. . . s nloc=Y
"RTN","SAMICTT1",138,0)
. . . i specialcase=1 d ;
"RTN","SAMICTT1",139,0)
. . . . d OUT(nloc_" "_endo_" "_ii_" previously seen with possible endobronchial component")
"RTN","SAMICTT1",140,0)
. . . . d OUT($$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",141,0)
. . . e d ;
"RTN","SAMICTT1",142,0)
. . . . ;i ($$XVAL("cetex",vals)="b")&($$XSUB("cectch",vals,dict,"cect"_ii_"ch")="n") d ;
"RTN","SAMICTT1",143,0)
. . . . i (($$XVAL("cetex",vals)="b")&($$XVAL("cect"_ii_"ch",vals)="n")) d ; gpl 1002
"RTN","SAMICTT1",144,0)
. . . . . d OUT(nloc_" "_endo_" "_ii_" "_calcstr_" with possible endobronchial component")
"RTN","SAMICTT1",145,0)
. . . . e d OUT(nloc_" "_endo_" "_ii_" "_calcstr_" with possible endobronchial component "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",146,0)
. . . s skip=1
"RTN","SAMICTT1",147,0)
. i specialcase=1 d ;
"RTN","SAMICTT1",148,0)
. . i skip=0 d ;
"RTN","SAMICTT1",149,0)
. . . d OUT("Previously seen "_nloc_" "_endo_" "_ii_" ")
"RTN","SAMICTT1",150,0)
. . . d OUT($$XSUB("cectch",vals,dict,"cect"_ii_"ch")_".")
"RTN","SAMICTT1",151,0)
. e d ;
"RTN","SAMICTT1",152,0)
. . i skip=0 d ;
"RTN","SAMICTT1",153,0)
. . . ;# pleural distance only goes here
"RTN","SAMICTT1",154,0)
. . . i $$XVAL("cect"_ii_"pld",vals)'="" s calcstr=calcstr_" "_pldstr_","
"RTN","SAMICTT1",155,0)
. . . ;# Special Handling for "newly seen" on baseline
"RTN","SAMICTT1",156,0)
. . . ;i ($$XVAL("cetex",vals)="b")&($$XSUB("cectch",vals,dict,"cect"_ii_"ch")="n") d ;
"RTN","SAMICTT1",157,0)
. . . i (($$XVAL("cetex",vals)="b")&($$XVAL("cect"_ii_"ch",vals)="n")) d ; gpl 1002
"RTN","SAMICTT1",158,0)
. . . . d OUT(nloc_" "_endo_" "_ii_" "_calcstr)
"RTN","SAMICTT1",159,0)
. . . e d OUT(nloc_" "_endo_" "_ii_" "_calcstr_" "_$$XSUB("cectch",vals,dict,"cect"_ii_"ch")_" ")
"RTN","SAMICTT1",160,0)
. . d OUT(" (Series "_$$XVAL("cect"_ii_"sn",vals)_",") ; added from 1114 gpl1
"RTN","SAMICTT1",161,0)
. . ;i $$XVAL("cect"_ii_"inl",vals)=$$XVAL("cect"_ii_"inh",vals) d ;
"RTN","SAMICTT1",162,0)
. . ;. d OUT(" image "_$$XVAL("cect"_ii_"inh",vals)_"). ")
"RTN","SAMICTT1",163,0)
. . ;e d ;
"RTN","SAMICTT1",164,0)
. . ;. d OUT(" image "_$$XVAL("cect"_ii_"inl",vals)_$$XVAL("cect"_ii_"inh",vals)_"). ")
"RTN","SAMICTT1",165,0)
. . i $$XVAL("cect"_ii_"inh",vals)="" d ;
"RTN","SAMICTT1",166,0)
. . . d OUT(" image "_$$XVAL("cect"_ii_"inl",vals)_"). ")
"RTN","SAMICTT1",167,0)
. . e d ;
"RTN","SAMICTT1",168,0)
. . . d OUT(" image "_$$XVAL("cect"_ii_"inl",vals)_"-"_$$XVAL("cect"_ii_"inh",vals)_"). ")
"RTN","SAMICTT1",169,0)
. . i $$XVAL("cect"_ii_"co",vals)'="" d OUT($$XVAL("cect"_ii_"co",vals)_". ") ;1122 gpl1
"RTN","SAMICTT1",170,0)
. . n ac
"RTN","SAMICTT1",171,0)
. . s ac=$$XVAL("cect"_ii_"ac",vals)
"RTN","SAMICTT1",172,0)
. . i ac'="" i (ac'="-") i (ac'="s") d ;
"RTN","SAMICTT1",173,0)
. . . d OUT($$XSUB("cectac",vals,dict,"cect"_ii_"ac")_" recommended.")
"RTN","SAMICTT1",174,0)
. ;
"RTN","SAMICTT1",175,0)
. ; end of nodule processing
"RTN","SAMICTT1",176,0)
. ;
"RTN","SAMICTT1",177,0)
. s outmode="go"
"RTN","SAMICTT1",178,0)
. d OUT("")
"RTN","SAMICTT1",179,0)
. s outmode="hold"
"RTN","SAMICTT1",180,0)
i firstitem'=0 d ;
"RTN","SAMICTT1",181,0)
. ;d OUT("</UL>")
"RTN","SAMICTT1",182,0)
. ;d OUT("<!-- end nodule info -->")
"RTN","SAMICTT1",183,0)
;d OUT("</p>")
"RTN","SAMICTT1",184,0)
;
"RTN","SAMICTT1",185,0)
q
"RTN","SAMICTT1",186,0)
;
"RTN","SAMICTT1",187,0)
OUT(ln) ;
"RTN","SAMICTT1",188,0)
i outmode="hold" s line=line_ln q ;
"RTN","SAMICTT1",189,0)
s cnt=cnt+1
"RTN","SAMICTT1",190,0)
n lnn
"RTN","SAMICTT1",191,0)
;s debug=1
"RTN","SAMICTT1",192,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT1",193,0)
i outmode="go" d ;
"RTN","SAMICTT1",194,0)
. s @rtn@(lnn)=line
"RTN","SAMICTT1",195,0)
. s line=""
"RTN","SAMICTT1",196,0)
. s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT1",197,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT1",198,0)
i $g(debug)=1 d ;
"RTN","SAMICTT1",199,0)
. i ln["<" q ; no markup
"RTN","SAMICTT1",200,0)
. n zs s zs=$STACK
"RTN","SAMICTT1",201,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT1",202,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT1",203,0)
q
"RTN","SAMICTT1",204,0)
;
"RTN","SAMICTT1",205,0)
HOUT(ln) ;
"RTN","SAMICTT1",206,0)
d OUT(ln)
"RTN","SAMICTT1",207,0)
;d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT1",208,0)
q
"RTN","SAMICTT1",209,0)
;
"RTN","SAMICTT1",210,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT1",211,0)
; vals is passed by name
"RTN","SAMICTT1",212,0)
n zr
"RTN","SAMICTT1",213,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT1",214,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT1",215,0)
q zr
"RTN","SAMICTT1",216,0)
;
"RTN","SAMICTT1",217,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT1",218,0)
; vals and dict are passed by name
"RTN","SAMICTT1",219,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT1",220,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT1",221,0)
n zr,zv,zdx
"RTN","SAMICTT1",222,0)
s zdx=$g(valdx)
"RTN","SAMICTT1",223,0)
i zdx="" s zdx=var
"RTN","SAMICTT1",224,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT1",225,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT1",226,0)
i zv="" s zr="" q zr
"RTN","SAMICTT1",227,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT1",228,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT1",229,0)
q zr
"RTN","SAMICTT1",230,0)
;
"RTN","SAMICTT2")
0^5^B84755388
"RTN","SAMICTT2",1,0)
SAMICTT2 ;ven/gpl - ielcap: forms ; 4/22/19 9:04am
"RTN","SAMICTT2",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT2",3,0)
;
"RTN","SAMICTT2",4,0)
;
"RTN","SAMICTT2",5,0)
quit ; no entry from top
"RTN","SAMICTT2",6,0)
;
"RTN","SAMICTT2",7,0)
OTHRLUNG(rtn,vals,dict) ;
"RTN","SAMICTT2",8,0)
; repgen2,repgen3
"RTN","SAMICTT2",9,0)
;
"RTN","SAMICTT2",10,0)
; starts at "Other lung findings:"
"RTN","SAMICTT2",11,0)
;
"RTN","SAMICTT2",12,0)
;#hputs "Other lung findings:"
"RTN","SAMICTT2",13,0)
s outmode="hold"
"RTN","SAMICTT2",14,0)
n line s line=""
"RTN","SAMICTT2",15,0)
;
"RTN","SAMICTT2",16,0)
n sp1 s sp1=" "
"RTN","SAMICTT2",17,0)
n hfind,lfind,yespp,newct
"RTN","SAMICTT2",18,0)
s (hfind,lfind,yespp)=0
"RTN","SAMICTT2",19,0)
s newct=1
"RTN","SAMICTT2",20,0)
;
"RTN","SAMICTT2",21,0)
;# Add handling for new sections
"RTN","SAMICTT2",22,0)
;# ceopp is new, if it doensn't exist skip whole section
"RTN","SAMICTT2",23,0)
;# only then should old fields be included.
"RTN","SAMICTT2",24,0)
;
"RTN","SAMICTT2",25,0)
i $g(newct)=1 d ;
"RTN","SAMICTT2",26,0)
. i "y"="y" d ;
"RTN","SAMICTT2",27,0)
. . s yespp=1
"RTN","SAMICTT2",28,0)
. . i $$XVAL("cecbc",vals)="y" d ;
"RTN","SAMICTT2",29,0)
. . . d HLFIND ;
"RTN","SAMICTT2",30,0)
. . . d OUT(sp1_"Cyst seen in the "_$$LOBESTR("cecbcl1^cecbcl2^cecbcl3^cecbcl4^cecbcl5",0)_".") d OUT("")
"RTN","SAMICTT2",31,0)
. . . ;d OUT($$LOBESTR("cecbcl1^cecbcl2^cecbcl3^cecbcl4^cecbcl5",0)_".")
"RTN","SAMICTT2",32,0)
. . . s yespp=1
"RTN","SAMICTT2",33,0)
. . if $$XVAL("cecbb",vals)="y" d ;
"RTN","SAMICTT2",34,0)
. . . d HLFIND ;
"RTN","SAMICTT2",35,0)
. . . ;d OUT("<br>"_"Bleb or bullae seen in the ")
"RTN","SAMICTT2",36,0)
. . . d OUT(sp1_"Bleb or bullae seen in the "_$$LOBESTR("cecbbl1^cecbbl2^cecbbl3^cecbbl4^cecbbl5",0)_".") d OUT("")
"RTN","SAMICTT2",37,0)
. . . set yespp=1
"RTN","SAMICTT2",38,0)
. . if $$XVAL("cebrsb",vals)="y" d ;
"RTN","SAMICTT2",39,0)
. . . d HLFIND ;
"RTN","SAMICTT2",40,0)
. . . ;d OUT("<br>"_"Bronchiectasis in the ")
"RTN","SAMICTT2",41,0)
. . . d OUT(sp1_"Bronchiectasis in the "_$$LOBESTR("cebrsbl1^cebrsbl2^cebrsbl3^cebrsbl4^cebrsbl5",0)_".") d OUT("")
"RTN","SAMICTT2",42,0)
. . . set yespp=1
"RTN","SAMICTT2",43,0)
. . if $$XVAL("cebrs",vals)="y" d ;
"RTN","SAMICTT2",44,0)
. . . if $$XVAL("cebrsb",vals)'="y" d ;
"RTN","SAMICTT2",45,0)
. . . . if $$XVAL("cebrss",vals)'="y" d ;
"RTN","SAMICTT2",46,0)
. . . . . d HLFIND ;
"RTN","SAMICTT2",47,0)
. . . . . ;d OUT("<br>"_"Small Airways Disease in the ")
"RTN","SAMICTT2",48,0)
. . . . . d OUT(sp1_"Small Airways Disease in the "_$$LOBESTR("cebrsl1^cebrsl2^cebrsl3^cebrsl4^cebrsl5",0)_".") d OUT("")
"RTN","SAMICTT2",49,0)
. . . . . set yespp=1
"RTN","SAMICTT2",50,0)
. . if $$XVAL("cebrss",vals)="y" d ;
"RTN","SAMICTT2",51,0)
. . . d HLFIND ;
"RTN","SAMICTT2",52,0)
. . . ;d OUT("<br>"_"Small Airways Disease/Bronchiolectasis in the ")
"RTN","SAMICTT2",53,0)
. . . d OUT(sp1_"Small Airways Disease/Bronchiolectasis in the "_$$LOBESTR("cebrssl1^cebrssl2^cebrssl3^cebrssl4^cebrssl5",0)_".") d OUT("")
"RTN","SAMICTT2",54,0)
. . . set yespp=1
"RTN","SAMICTT2",55,0)
. . n numl,str
"RTN","SAMICTT2",56,0)
. . s numl=0
"RTN","SAMICTT2",57,0)
. . s str=""
"RTN","SAMICTT2",58,0)
. . if $$XVAL("cebs",vals)="o" d ;
"RTN","SAMICTT2",59,0)
. . . set yespp=1
"RTN","SAMICTT2",60,0)
. . . set numl=0
"RTN","SAMICTT2",61,0)
. . . set str="Normal bronchial resection margin on"
"RTN","SAMICTT2",62,0)
. . . if $$XVAL("cebsrt",vals)="r" d ;
"RTN","SAMICTT2",63,0)
. . . . s str=str_" right"
"RTN","SAMICTT2",64,0)
. . . . s numl=numl+1
"RTN","SAMICTT2",65,0)
. . . if $$XVAL("cebslt",vals)="l" d ;
"RTN","SAMICTT2",66,0)
. . . . if numl>0 d ;
"RTN","SAMICTT2",67,0)
. . . . . s str=str_" and"
"RTN","SAMICTT2",68,0)
. . . . s str=str_" left"
"RTN","SAMICTT2",69,0)
. . . . s numl=numl+1
"RTN","SAMICTT2",70,0)
. . . s str=str_"."
"RTN","SAMICTT2",71,0)
. . . if numl=0 d ;
"RTN","SAMICTT2",72,0)
. . . . set str="Normal bronchial resection margin noted."
"RTN","SAMICTT2",73,0)
. . . d HLFIND ;
"RTN","SAMICTT2",74,0)
. . . d OUT(sp1_str)
"RTN","SAMICTT2",75,0)
. . . ;d OUT("<br>")
"RTN","SAMICTT2",76,0)
. . ;if $$XVAL("cebrsb",vals)="y" d ;
"RTN","SAMICTT2",77,0)
. . ;. d HLFIND
"RTN","SAMICTT2",78,0)
. . ;. d OUT("<br>"_"Bronchiectasis in the ")
"RTN","SAMICTT2",79,0)
. . ;. d OUT($$LOBESTR("cebrsbl1^cebrsbl2^cebrsbl3^cebrsbl4^cebrsbl5",0)_".")
"RTN","SAMICTT2",80,0)
. . ;. set yespp=1
"RTN","SAMICTT2",81,0)
. . if $$XVAL("ceild",vals)="y" d ;
"RTN","SAMICTT2",82,0)
. . . d HLFIND
"RTN","SAMICTT2",83,0)
. . . ;d OUT("<br>"_"Evidence of interstitial lung disease in the ")
"RTN","SAMICTT2",84,0)
. . . d OUT(sp1_"Evidence of interstitial lung disease in the "_$$LOBESTR("ceildl1^ceildl2^ceildl3^ceildl4^ceildl5",0)_".") d OUT("")
"RTN","SAMICTT2",85,0)
. . . set yespp=1
"RTN","SAMICTT2",86,0)
. . if $$XVAL("cerdc",vals)="y" d ;
"RTN","SAMICTT2",87,0)
. . . d HLFIND
"RTN","SAMICTT2",88,0)
. . . ;d OUT("<br>"_"Regional or diffuse consolidation in the ")
"RTN","SAMICTT2",89,0)
. . . d OUT(sp1_"Regional or diffuse consolidation in the "_$$LOBESTR("cerdcl1^cerdcl2^cerdcl3^cerdcl4^cerdcl5",0)_".") d OUT("")
"RTN","SAMICTT2",90,0)
. . . set yespp=1
"RTN","SAMICTT2",91,0)
. . ;# scarring may be more complicated (apical, and bilateral)
"RTN","SAMICTT2",92,0)
. . if $$XVAL("cescr",vals)="y" d ;
"RTN","SAMICTT2",93,0)
. . . d HLFIND
"RTN","SAMICTT2",94,0)
. . . ;# If apical use "unilateral apical scarring", if bilateral use "bilateral apical scarring"
"RTN","SAMICTT2",95,0)
. . . ;# Otherwise use our previouse construct
"RTN","SAMICTT2",96,0)
. . . n done s done=0 ; flag to use for other scarring
"RTN","SAMICTT2",97,0)
. . . if $$XVAL("cescrl6",vals)="au" d ;
"RTN","SAMICTT2",98,0)
. . . . d OUT(sp1_"Unilateral apical scarring.") d OUT("")
"RTN","SAMICTT2",99,0)
. . . . s done=1
"RTN","SAMICTT2",100,0)
. . . else if $$XVAL("cescrl7",vals)="ab" d ;
"RTN","SAMICTT2",101,0)
. . . . d OUT(sp1_"Bilateral apical scarring.") d OUT("")
"RTN","SAMICTT2",102,0)
. . . . s done=1
"RTN","SAMICTT2",103,0)
. . . if done=0 d ;
"RTN","SAMICTT2",104,0)
. . . . ;d OUT("<br>"_"Scarring in the ")
"RTN","SAMICTT2",105,0)
. . . . d OUT(sp1_"Scarring in the "_$$LOBESTR("cescrl1^cescrl2^cescrl3^cescrl4^cescrl5",1)_".") d OUT("")
"RTN","SAMICTT2",106,0)
. . . . set yespp=1
"RTN","SAMICTT2",107,0)
. . if $$XVAL("cebat",vals)="y" d ;
"RTN","SAMICTT2",108,0)
. . . d HLFIND
"RTN","SAMICTT2",109,0)
. . . ;d OUT("<br>"_"Other atelectasis in the ")
"RTN","SAMICTT2",110,0)
. . . d OUT(sp1_"Other atelectasis in the "_$$LOBESTR("cebatl1^cebatl2^cebatl3^cebatl4^cebatl5",0)_".") d OUT("")
"RTN","SAMICTT2",111,0)
. . . set yespp=1
"RTN","SAMICTT2",112,0)
. . if $$XVAL("cerb",vals)="y" d ;
"RTN","SAMICTT2",113,0)
. . . d HLFIND
"RTN","SAMICTT2",114,0)
. . . ;d OUT("<br>"_"Traction bronchiectasis in the ")
"RTN","SAMICTT2",115,0)
. . . d OUT(sp1_"Traction bronchiectasis in the "_$$LOBESTR("cerbl1^cerbl2^cerbl3^cerbl4^cerbl5",0)_".") d OUT("")
"RTN","SAMICTT2",116,0)
. . . set yespp=1
"RTN","SAMICTT2",117,0)
. . if $$XVAL("cepgo",vals)="y" d ;
"RTN","SAMICTT2",118,0)
. . . d HLFIND
"RTN","SAMICTT2",119,0)
. . . ;d OUT("<br>"_"Peripheral Ground-glass Opacities in the ")
"RTN","SAMICTT2",120,0)
. . . d OUT(sp1_"Peripheral Ground-glass Opacities in the "_$$LOBESTR("cepgol1^cepgol2^cepgol3^cepgol4^cepgol5",0)_".") d OUT("")
"RTN","SAMICTT2",121,0)
. . . set yespp=1
"RTN","SAMICTT2",122,0)
. . if $$XVAL("ceret",vals)="y" d ;
"RTN","SAMICTT2",123,0)
. . . d HLFIND
"RTN","SAMICTT2",124,0)
. . . ;d OUT("<br>"_"Reticulations in the ")
"RTN","SAMICTT2",125,0)
. . . d OUT(sp1_"Reticulations in the "_$$LOBESTR("ceretl1^ceretl2^ceretl3^ceretl4^ceretl5",0)_".") d OUT("")
"RTN","SAMICTT2",126,0)
. . . set yespp=1
"RTN","SAMICTT2",127,0)
. . if $$XVAL("cephc",vals)="y" d ;
"RTN","SAMICTT2",128,0)
. . . d HLFIND
"RTN","SAMICTT2",129,0)
. . . ;d OUT("<br>"_"Honeycombing in the ")
"RTN","SAMICTT2",130,0)
. . . d OUT(sp1_"Honeycombing in the "_$$LOBESTR("cephcl1^cephcl2^cephcl3^cephcl4^cephcl5",0)_".") d OUT("")
"RTN","SAMICTT2",131,0)
. . . set yespp=1
"RTN","SAMICTT2",132,0)
. . if $$XVAL("cepp",vals)="y" d ;
"RTN","SAMICTT2",133,0)
. . . set yespp=1
"RTN","SAMICTT2",134,0)
. . . set numl=0
"RTN","SAMICTT2",135,0)
. . . set str="Pleural or fissural plaques in the "
"RTN","SAMICTT2",136,0)
. . . if $$XVAL("cepprt",vals)="r" d ;
"RTN","SAMICTT2",137,0)
. . . . s str=str_"right"
"RTN","SAMICTT2",138,0)
. . . . s numl=numl+1
"RTN","SAMICTT2",139,0)
. . . if $$XVAL("cepplt",vals)="l" d ;
"RTN","SAMICTT2",140,0)
. . . . if numl>0 d ;
"RTN","SAMICTT2",141,0)
. . . . . s str=str_" and"
"RTN","SAMICTT2",142,0)
. . . . s str=str_" left"
"RTN","SAMICTT2",143,0)
. . . . s numl=numl+1
"RTN","SAMICTT2",144,0)
. . . . if numl>1 s str=str_" lobes"
"RTN","SAMICTT2",145,0)
. . . . else s str=str_" lobe"
"RTN","SAMICTT2",146,0)
. . . . if $$XVAL("ceppca",vals)="c" s str=str_" with calcifications"
"RTN","SAMICTT2",147,0)
. . . . s str=str_"."_para
"RTN","SAMICTT2",148,0)
. . . if numl=0 set str="Pleural or fissural plaques are noted."
"RTN","SAMICTT2",149,0)
. . . d HLFIND
"RTN","SAMICTT2",150,0)
. . . d OUT(sp1_str)
"RTN","SAMICTT2",151,0)
. . ;
"RTN","SAMICTT2",152,0)
. . ;# Note: Not used for newer CT Evaluation Forms
"RTN","SAMICTT2",153,0)
. . ;if { 0 == [ string compare y [xval cepc] ] } {
"RTN","SAMICTT2",154,0)
. . ; set yespp 1
"RTN","SAMICTT2",155,0)
. . ; hlfind
"RTN","SAMICTT2",156,0)
. . ; puts "[sidestr {Pleural calcifications} cepcrt cepclt]"
"RTN","SAMICTT2",157,0)
. . ;
"RTN","SAMICTT2",158,0)
. . if $$XVAL("cebs",vals)="y" d ;
"RTN","SAMICTT2",159,0)
. . . set yespp=1
"RTN","SAMICTT2",160,0)
. . . set numl=0
"RTN","SAMICTT2",161,0)
. . . set str="Abnormal bronchial resection margin on"
"RTN","SAMICTT2",162,0)
. . . d ;
"RTN","SAMICTT2",163,0)
. . . . if $$XVAL("cebsrt",vals)="r" d ;
"RTN","SAMICTT2",164,0)
. . . . . s str=str_" right"
"RTN","SAMICTT2",165,0)
. . . . . s numl=numl+1
"RTN","SAMICTT2",166,0)
. . . . if $$XVAL("cebslt",vals)="l" d ;
"RTN","SAMICTT2",167,0)
. . . . . if numl>0 s str=str_" and"
"RTN","SAMICTT2",168,0)
. . . . . s str=str_" left"
"RTN","SAMICTT2",169,0)
. . . . . s numl=numl+1
"RTN","SAMICTT2",170,0)
. . . . s str=str_"."
"RTN","SAMICTT2",171,0)
. . . if numl=0 set str="<br>"_"Abnormal bronchial resection margin noted."
"RTN","SAMICTT2",172,0)
. . . d HLFIND
"RTN","SAMICTT2",173,0)
. . . d OUT(sp1_str)
"RTN","SAMICTT2",174,0)
. . . ;d OUT(para)
"RTN","SAMICTT2",175,0)
. . ;
"RTN","SAMICTT2",176,0)
. . if $L($$XVAL("ceoppa",vals))'=0 d ;
"RTN","SAMICTT2",177,0)
. . . ;# puts "Additional Comments on Parenchymal or Pleural Abnormalities:"
"RTN","SAMICTT2",178,0)
. . . d HLFIND
"RTN","SAMICTT2",179,0)
. . . d OUT(sp1_$$XVAL("ceoppa",vals)_".") d OUT("")
"RTN","SAMICTT2",180,0)
. . . ;d OUT(para)
"RTN","SAMICTT2",181,0)
. . else if yespp=1 ;d OUT(para)
"RTN","SAMICTT2",182,0)
s outmode="go" d OUT("")
"RTN","SAMICTT2",183,0)
q
"RTN","SAMICTT2",184,0)
;
"RTN","SAMICTT2",185,0)
LOBESTR(lst,opt) ; extrinsic returns lobes
"RTN","SAMICTT2",186,0)
; lst is of the for a^b^c where a,b and c are variable names
"RTN","SAMICTT2",187,0)
n rtstr,lln,tary
"RTN","SAMICTT2",188,0)
s tary=""
"RTN","SAMICTT2",189,0)
s rtstr=""
"RTN","SAMICTT2",190,0)
s lln=$l(lst,"^")
"RTN","SAMICTT2",191,0)
f lzi=1:1:lln d ;
"RTN","SAMICTT2",192,0)
. n tval
"RTN","SAMICTT2",193,0)
. s tval=$$XVAL($p(lst,"^",lzi),vals)
"RTN","SAMICTT2",194,0)
. n X,Y S X=tval X ^%ZOSF("UPPERCASE")
"RTN","SAMICTT2",195,0)
. s tval=Y
"RTN","SAMICTT2",196,0)
. i tval'="" s tary($o(tary(""),-1)+1)=tval
"RTN","SAMICTT2",197,0)
n tcnt s tcnt=$o(tary(""),-1)
"RTN","SAMICTT2",198,0)
q:tcnt=0
"RTN","SAMICTT2",199,0)
i tcnt=1 q tary(1)
"RTN","SAMICTT2",200,0)
i tcnt=2 q tary(1)_" and "_tary(2)
"RTN","SAMICTT2",201,0)
f lzi=1:1:tcnt s rtstr=rtstr_tary(lzi)_$s(lzi<tcnt:", ",1:"")
"RTN","SAMICTT2",202,0)
q rtstr
"RTN","SAMICTT2",203,0)
;
"RTN","SAMICTT2",204,0)
HLFIND() ; references and sets lfind in calling routine
"RTN","SAMICTT2",205,0)
i $g(lfind)=0 d ;
"RTN","SAMICTT2",206,0)
. d HOUT("Other lung findings:")
"RTN","SAMICTT2",207,0)
. d OUT("")
"RTN","SAMICTT2",208,0)
. s lfind=1
"RTN","SAMICTT2",209,0)
q
"RTN","SAMICTT2",210,0)
;
"RTN","SAMICTT2",211,0)
OUT(ln) ;
"RTN","SAMICTT2",212,0)
i outmode="hold" s line=line_ln q ;
"RTN","SAMICTT2",213,0)
s cnt=cnt+1
"RTN","SAMICTT2",214,0)
n lnn
"RTN","SAMICTT2",215,0)
i $g(debug)'=1 s debug=0
"RTN","SAMICTT2",216,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT2",217,0)
i outmode="go" d ;
"RTN","SAMICTT2",218,0)
. s @rtn@(lnn)=line
"RTN","SAMICTT2",219,0)
. s line=""
"RTN","SAMICTT2",220,0)
. s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT2",221,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT2",222,0)
i $g(debug)=1 d ;
"RTN","SAMICTT2",223,0)
. i ln["<" q ; no markup
"RTN","SAMICTT2",224,0)
. n zs s zs=$STACK
"RTN","SAMICTT2",225,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT2",226,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT2",227,0)
q
"RTN","SAMICTT2",228,0)
;
"RTN","SAMICTT2",229,0)
OUTold(ln) ;
"RTN","SAMICTT2",230,0)
s cnt=cnt+1
"RTN","SAMICTT2",231,0)
n lnn
"RTN","SAMICTT2",232,0)
;s debug=1
"RTN","SAMICTT2",233,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT2",234,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT2",235,0)
i $g(debug)=1 d ;
"RTN","SAMICTT2",236,0)
. i ln["<" q ; no markup
"RTN","SAMICTT2",237,0)
. n zs s zs=$STACK
"RTN","SAMICTT2",238,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT2",239,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT2",240,0)
q
"RTN","SAMICTT2",241,0)
;
"RTN","SAMICTT2",242,0)
HOUT(ln) ;
"RTN","SAMICTT2",243,0)
d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT2",244,0)
q
"RTN","SAMICTT2",245,0)
;
"RTN","SAMICTT2",246,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT2",247,0)
; vals is passed by name
"RTN","SAMICTT2",248,0)
n zr
"RTN","SAMICTT2",249,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT2",250,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT2",251,0)
q zr
"RTN","SAMICTT2",252,0)
;
"RTN","SAMICTT2",253,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT2",254,0)
; vals and dict are passed by name
"RTN","SAMICTT2",255,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT2",256,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT2",257,0)
n zr,zv,zdx
"RTN","SAMICTT2",258,0)
s zdx=$g(valdx)
"RTN","SAMICTT2",259,0)
i zdx="" s zdx=var
"RTN","SAMICTT2",260,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT2",261,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT2",262,0)
i zv="" s zr="" q zr
"RTN","SAMICTT2",263,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT2",264,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT2",265,0)
q zr
"RTN","SAMICTT2",266,0)
;
"RTN","SAMICTT3")
0^6^B165906260
"RTN","SAMICTT3",1,0)
SAMICTR3 ;ven/gpl - ielcap: forms ; 1/23/19 5:14pm
"RTN","SAMICTT3",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT3",3,0)
;
"RTN","SAMICTT3",4,0)
;@license: see routine SAMIUL
"RTN","SAMICTT3",5,0)
;
"RTN","SAMICTT3",6,0)
quit ; no entry from top
"RTN","SAMICTT3",7,0)
;
"RTN","SAMICTT3",8,0)
EMPHYS(rtn,vals,dict) ;
"RTN","SAMICTT3",9,0)
; repgen4,repgen5
"RTN","SAMICTT3",10,0)
;
"RTN","SAMICTT3",11,0)
;# Emphysema
"RTN","SAMICTT3",12,0)
;
"RTN","SAMICTT3",13,0)
n sp1 s sp1=" "
"RTN","SAMICTT3",14,0)
s outmode="hold" s line=""
"RTN","SAMICTT3",15,0)
;if $$XVAL("ceemv",vals)'="e" d ;
"RTN","SAMICTT3",16,0)
if $$XVAL("ceem",vals)'="" d ;
"RTN","SAMICTT3",17,0)
. if $$XVAL("ceem",vals)="nv" q ;
"RTN","SAMICTT3",18,0)
. if $$XVAL("ceem",vals)="no" q ;
"RTN","SAMICTT3",19,0)
. ;d OUT("")
"RTN","SAMICTT3",20,0)
. D HOUT("Emphysema: ")
"RTN","SAMICTT3",21,0)
. ;d OUT("")
"RTN","SAMICTT3",22,0)
. D OUT(sp1_$$XSUB("ceem",vals,dict))
"RTN","SAMICTT3",23,0)
. s outmode="go" d OUT("")
"RTN","SAMICTT3",24,0)
;
"RTN","SAMICTT3",25,0)
;d OUT("")
"RTN","SAMICTT3",26,0)
s outmode="hold"
"RTN","SAMICTT3",27,0)
D HOUT("Pleura: ")
"RTN","SAMICTT3",28,0)
;d OUT("")
"RTN","SAMICTT3",29,0)
; hputs "Pleura:"
"RTN","SAMICTT3",30,0)
N pe s pe=0
"RTN","SAMICTT3",31,0)
;
"RTN","SAMICTT3",32,0)
; # Pleural Effusion
"RTN","SAMICTT3",33,0)
;
"RTN","SAMICTT3",34,0)
i $$XVAL("cepev",vals)="y" d ;
"RTN","SAMICTT3",35,0)
. if $$XVAL("ceper",vals)="-" d ;
"RTN","SAMICTT3",36,0)
. . if $$XVAL("cepel",vals)="-" d ;
"RTN","SAMICTT3",37,0)
. . . s @vals@("cepev")="e"
"RTN","SAMICTT3",38,0)
. ;
"RTN","SAMICTT3",39,0)
. if $$XVAL("cepev",vals)'="e" d ;
"RTN","SAMICTT3",40,0)
. . if $$XVAL("ceper",vals)'="-" d ;
"RTN","SAMICTT3",41,0)
. . . if $$XVAL("cepel",vals)'="-" d ;
"RTN","SAMICTT3",42,0)
. . . . if $$XVAL("cepel",vals)=$$XVAL("ceper",vals) d ;
"RTN","SAMICTT3",43,0)
. . . . . d OUT(sp1_"Bilateral "_$$XSUB("cepe",vals,dict,"cepel")_" pleural effusions.") d OUT("")
"RTN","SAMICTT3",44,0)
. . . . else d ;
"RTN","SAMICTT3",45,0)
. . . . . d OUT(sp1_"Bilateral pleural effusions ; "_$$XSUB("cepe",vals,dict,"cepel")_" on left, and "_$$XSUB("cepe",vals,dict,"ceper")_" on right.")
"RTN","SAMICTT3",46,0)
. . . . . s pe=1
"RTN","SAMICTT3",47,0)
. . . else d ;
"RTN","SAMICTT3",48,0)
. . . . d OUT(sp1_"On right "_$$XSUB("cepe",vals,dict,"cepr")_" pleural effusion and on left "_$$XSUB("cepe",vals,dict,"cepel")_" pleural effusion.") d OUT("")
"RTN","SAMICTT3",49,0)
. . . . s pe=1
"RTN","SAMICTT3",50,0)
. . else d ;
"RTN","SAMICTT3",51,0)
. . . d OUT(sp1_"On right "_$$XSUB("cepe",vals,dict,"cepr")_" pleural effusion and on left "_$$XSUB("cepe",vals,dict,"cepel")_" pleural effusion.") d OUT("")
"RTN","SAMICTT3",52,0)
. . . s pe=1
"RTN","SAMICTT3",53,0)
. ;
"RTN","SAMICTT3",54,0)
i $$XVAL("cepev",vals)'="y" d ;
"RTN","SAMICTT3",55,0)
. d OUT(sp1_"No pleural effusions.") d OUT("")
"RTN","SAMICTT3",56,0)
; if { $pe == 0 } {
"RTN","SAMICTT3",57,0)
; puts "[tr "No pleural effusions"].${para}"
"RTN","SAMICTT3",58,0)
; }
"RTN","SAMICTT3",59,0)
;
"RTN","SAMICTT3",60,0)
n yespp s yespp=0
"RTN","SAMICTT3",61,0)
;
"RTN","SAMICTT3",62,0)
if $$XVAL("cebatr",vals)="y" d ;
"RTN","SAMICTT3",63,0)
. ;d OUT("Rounded atelectasis in the ")
"RTN","SAMICTT3",64,0)
. d OUT(sp1_"Rounded atelectasis in the "_$$LOBESTR^SAMICTR2("cebatrl1^cebatrl2^cebatrl3^cebatrl4^cebatrl5",0)_".") ;d OUT("")
"RTN","SAMICTT3",65,0)
. s yespp=1
"RTN","SAMICTT3",66,0)
;
"RTN","SAMICTT3",67,0)
if $$XVAL("cept",vals)="y" d ;
"RTN","SAMICTT3",68,0)
. s yespp=1
"RTN","SAMICTT3",69,0)
. s numl=0
"RTN","SAMICTT3",70,0)
. set str=sp1_"Pleural thickening/plaques in the "
"RTN","SAMICTT3",71,0)
. if $$XVAL("ceptrt",vals)="r" d ;
"RTN","SAMICTT3",72,0)
. . s str=str_"right"
"RTN","SAMICTT3",73,0)
. . s numl=numl+1
"RTN","SAMICTT3",74,0)
. if $$XVAL("ceptlt",vals)="l" d ;
"RTN","SAMICTT3",75,0)
. . i numl>0 d ;
"RTN","SAMICTT3",76,0)
. . . s str=str_" and"
"RTN","SAMICTT3",77,0)
. . s str=str_" left"
"RTN","SAMICTT3",78,0)
. . s numl=numl+1
"RTN","SAMICTT3",79,0)
. ;if numl>1 d ;
"RTN","SAMICTT3",80,0)
. ;. s str=str_" lungs."
"RTN","SAMICTT3",81,0)
. ;else d ;
"RTN","SAMICTT3",82,0)
. ;. s str=str_" lung."
"RTN","SAMICTT3",83,0)
. s str=str_"."
"RTN","SAMICTT3",84,0)
. if numl=0 set str=sp1_"Pleural thickening/plaques."
"RTN","SAMICTT3",85,0)
. d OUT(str) ;d OUT("")
"RTN","SAMICTT3",86,0)
;
"RTN","SAMICTT3",87,0)
if $$XVAL("cepu",vals)="y" d ;
"RTN","SAMICTT3",88,0)
. s yespp=1
"RTN","SAMICTT3",89,0)
. if $l($$XVAL("cepus",vals))'=0 d ;
"RTN","SAMICTT3",90,0)
. . d OUT(sp1_"Pleural rumor: "_$$XVAL("cepus",vals))
"RTN","SAMICTT3",91,0)
. e d OUT(sp1_"Pleural tumor.")
"RTN","SAMICTT3",92,0)
. ;d OUT("")
"RTN","SAMICTT3",93,0)
;
"RTN","SAMICTT3",94,0)
i yespp=0 d OUT("")
"RTN","SAMICTT3",95,0)
;
"RTN","SAMICTT3",96,0)
d ;
"RTN","SAMICTT3",97,0)
. if $$XVAL("ceoppab",vals)'="" d OUT(sp1_$$XVAL("ceoppab",vals)_".") ;d OUT("")
"RTN","SAMICTT3",98,0)
. else d
"RTN","SAMICTT3",99,0)
. . if yespp=1 d OUT("")
"RTN","SAMICTT3",100,0)
;
"RTN","SAMICTT3",101,0)
s outmode="go" d OUT("")
"RTN","SAMICTT3",102,0)
;
"RTN","SAMICTT3",103,0)
s outmode="hold"
"RTN","SAMICTT3",104,0)
d OUT("Coronary Artery Calcifications: ")
"RTN","SAMICTT3",105,0)
;# Coronary Calcification
"RTN","SAMICTT3",106,0)
n vcac,cac,cacrec
"RTN","SAMICTT3",107,0)
s (cac,cacrec)=""
"RTN","SAMICTT3",108,0)
;
"RTN","SAMICTT3",109,0)
if $$XVAL("cecccac",vals)'="" d ;
"RTN","SAMICTT3",110,0)
. s @vals@("ceccv")="e"
"RTN","SAMICTT3",111,0)
;
"RTN","SAMICTT3",112,0)
d if $$XVAL("ceccv",vals)'="n" d ;
"RTN","SAMICTT3",113,0)
. set vcac=$$XVAL("cecccac",vals)
"RTN","SAMICTT3",114,0)
. if vcac'="" d ;
"RTN","SAMICTT3",115,0)
. . s cacrec=""
"RTN","SAMICTT3",116,0)
. . s cac="The Visual Coronary Artery Calcium (CAC) Score is "_vcac_". "
"RTN","SAMICTT3",117,0)
. . s cacval=vcac
"RTN","SAMICTT3",118,0)
. . i cacval>3 s cacrec=$g(@dict@("CAC_recommendation"))
"RTN","SAMICTT3",119,0)
;
"RTN","SAMICTT3",120,0)
;
"RTN","SAMICTT3",121,0)
n samicac s samicac=0
"RTN","SAMICTT3",122,0)
i $$XVAL("cecclm",vals)'="no" s samicac=1
"RTN","SAMICTT3",123,0)
i $$XVAL("ceccld",vals)'="no" s samicac=1
"RTN","SAMICTT3",124,0)
;i $$XVAL("cecclf",vals)'="no" s samicac=1
"RTN","SAMICTT3",125,0)
i $$XVAL("cecccf",vals)'="no" s samicac=1
"RTN","SAMICTT3",126,0)
i $$XVAL("ceccrc",vals)'="no" s samicac=1
"RTN","SAMICTT3",127,0)
;
"RTN","SAMICTT3",128,0)
;s outmode="hold" s line=""
"RTN","SAMICTT3",129,0)
i samicac=1 d ;
"RTN","SAMICTT3",130,0)
. d OUT($$XSUB("cecc",vals,dict,"cecclm")_" in left main, ")
"RTN","SAMICTT3",131,0)
. d OUT($$XSUB("cecc",vals,dict,"ceccld")_" in left anterior descending, ")
"RTN","SAMICTT3",132,0)
. ;d OUT($$XSUB("cecc",vals,dict,"cecclf")_" in circumflex, and ")
"RTN","SAMICTT3",133,0)
. d OUT($$XSUB("cecc",vals,dict,"cecccf")_" in circumflex, and ")
"RTN","SAMICTT3",134,0)
. d OUT($$XSUB("cecc",vals,dict,"ceccrc")_" in right coronary. "_cac)
"RTN","SAMICTT3",135,0)
. s outmode="go"
"RTN","SAMICTT3",136,0)
. d OUT("")
"RTN","SAMICTT3",137,0)
;
"RTN","SAMICTT3",138,0)
s outmode="hold"
"RTN","SAMICTT3",139,0)
if $$XVAL("cecca",vals)'="-" d ;
"RTN","SAMICTT3",140,0)
. d HOUT("Aortic Calcifications: ")
"RTN","SAMICTT3",141,0)
. d OUT($$XSUB("cecc",vals,dict,"cecca"))
"RTN","SAMICTT3",142,0)
. s outmode="go" d OUT("")
"RTN","SAMICTT3",143,0)
;
"RTN","SAMICTT3",144,0)
s outmode="hold"
"RTN","SAMICTT3",145,0)
d HOUT("Cardiac Findings: ")
"RTN","SAMICTT3",146,0)
;
"RTN","SAMICTT3",147,0)
;s outmode="hold"
"RTN","SAMICTT3",148,0)
;# Pericardial Effusion
"RTN","SAMICTT3",149,0)
if $$XVAL("ceprevm",vals)'="-" d ;
"RTN","SAMICTT3",150,0)
. if $$XVAL("ceprevm",vals)'="no" d ;
"RTN","SAMICTT3",151,0)
. . if $$XVAL("ceprevm",vals)'="" d
"RTN","SAMICTT3",152,0)
. . . d OUT("A "_$$XSUB("ceprevm",vals,dict,"ceprevm")_" pericardial effusion"_".") d OUT("")
"RTN","SAMICTT3",153,0)
. . . s pe=1
"RTN","SAMICTT3",154,0)
. . else d OUT("No pericardial effusion.") d OUT("")
"RTN","SAMICTT3",155,0)
;
"RTN","SAMICTT3",156,0)
;
"RTN","SAMICTT3",157,0)
;;# Pulmonary and Aortic Diameter
"RTN","SAMICTT3",158,0)
i $$XVAL("cepaw",vals)'="" d ;
"RTN","SAMICTT3",159,0)
. d OUT("Widest main pulmonary artery diameter is "_$$XVAL("cepaw",vals)_" mm. ")
"RTN","SAMICTT3",160,0)
. if $$XVAL("ceaow",vals)'="" d ;
"RTN","SAMICTT3",161,0)
. . d OUT("Widest ascending aortic diameter at the same level is "_$$XVAL("ceaow",vals)_" mm. ")
"RTN","SAMICTT3",162,0)
. . if $$XVAL("cepar",vals)'="" d ;
"RTN","SAMICTT3",163,0)
. . . d OUT("The ratio is "_$$XVAL("cepar",vals)_". ")
"RTN","SAMICTT3",164,0)
. d OUT("")
"RTN","SAMICTT3",165,0)
;
"RTN","SAMICTT3",166,0)
; #"Additional Comments on Cardiac Abnormalities:"
"RTN","SAMICTT3",167,0)
if $$XVAL("cecommca",vals)'="" d ;
"RTN","SAMICTT3",168,0)
. d OUT($$XVAL("cecommca",vals)_".")
"RTN","SAMICTT3",169,0)
s outmode="go"
"RTN","SAMICTT3",170,0)
d OUT("")
"RTN","SAMICTT3",171,0)
;
"RTN","SAMICTT3",172,0)
;
"RTN","SAMICTT3",173,0)
s outmode="hold"
"RTN","SAMICTT3",174,0)
d HOUT("Mediastinum: ")
"RTN","SAMICTT3",175,0)
n yesmm s yesmm=0
"RTN","SAMICTT3",176,0)
n abn
"RTN","SAMICTT3",177,0)
i ($$XVAL("ceoma",vals)="y")&($$XVAL("ceata",vals)="y") d ;
"RTN","SAMICTT3",178,0)
. s yeamm=1
"RTN","SAMICTT3",179,0)
. s abn=$$CCMSTR("ceatc^ceaty^ceatm",vals)
"RTN","SAMICTT3",180,0)
. ;d OUT("[abn="_abn_"]")
"RTN","SAMICTT3",181,0)
. i abn="" d OUT(sp1_"Noted in the thyroid.")
"RTN","SAMICTT3",182,0)
. i abn'="" d OUT(sp1_abn_" thyroid.")
"RTN","SAMICTT3",183,0)
. i $$XVAL("ceato",vals)="o" d OUT(sp1_$$XVAL("ceatos",vals)_"<br>")
"RTN","SAMICTT3",184,0)
i $$XVAL("ceaya",vals)="y" d ;
"RTN","SAMICTT3",185,0)
. s yesmm=1
"RTN","SAMICTT3",186,0)
. s abn=$$CCMSTR("ceayc^ceayy^ceaym",vals)
"RTN","SAMICTT3",187,0)
. i abn="" d OUT(sp1_"Noted in the thymus")
"RTN","SAMICTT3",188,0)
. i abn'="" d OUT(sp1_abn_" thymus.")
"RTN","SAMICTT3",189,0)
. i $$XVAL("ceayo",vals)="o" d OUT(sp1_$$XVAL("ceayos",vals))
"RTN","SAMICTT3",190,0)
;
"RTN","SAMICTT3",191,0)
; # Non-calcified lymph nodes
"RTN","SAMICTT3",192,0)
n lnlist,lnlistt
"RTN","SAMICTT3",193,0)
set lnlist(1)="cemlnl1"
"RTN","SAMICTT3",194,0)
set lnlist(2)="cemlnl2r"
"RTN","SAMICTT3",195,0)
set lnlist(3)="cemlnl2l"
"RTN","SAMICTT3",196,0)
set lnlist(4)="cemlnl3"
"RTN","SAMICTT3",197,0)
set lnlist(5)="cemlnl4r"
"RTN","SAMICTT3",198,0)
set lnlist(6)="cemlnl4l"
"RTN","SAMICTT3",199,0)
set lnlist(7)="cemlnl5"
"RTN","SAMICTT3",200,0)
set lnlist(8)="cemlnl6"
"RTN","SAMICTT3",201,0)
set lnlist(9)="cemlnl7"
"RTN","SAMICTT3",202,0)
set lnlist(10)="cemlnl8"
"RTN","SAMICTT3",203,0)
set lnlist(11)="cemlnl9"
"RTN","SAMICTT3",204,0)
set lnlist(12)="cemlnl10r"
"RTN","SAMICTT3",205,0)
set lnlist(13)="cemlnl10l"
"RTN","SAMICTT3",206,0)
;
"RTN","SAMICTT3",207,0)
set lnlistt(1)="high mediastinal"
"RTN","SAMICTT3",208,0)
set lnlistt(2)="right upper paratracheal"
"RTN","SAMICTT3",209,0)
set lnlistt(3)="left upper paratracheal"
"RTN","SAMICTT3",210,0)
set lnlistt(4)="prevascular/retrotracheal"
"RTN","SAMICTT3",211,0)
set lnlistt(5)="right lower paratracheal"
"RTN","SAMICTT3",212,0)
set lnlistt(6)="left lower paratracheal"
"RTN","SAMICTT3",213,0)
set lnlistt(7)="sub-aortic (A-P window)"
"RTN","SAMICTT3",214,0)
set lnlistt(8)="para-aortic"
"RTN","SAMICTT3",215,0)
set lnlistt(9)="subcarinal"
"RTN","SAMICTT3",216,0)
set lnlistt(10)="para-esophageal"
"RTN","SAMICTT3",217,0)
set lnlistt(11)="pulmonary ligament"
"RTN","SAMICTT3",218,0)
set lnlistt(12)="right hilar"
"RTN","SAMICTT3",219,0)
set lnlistt(13)="left hilar"
"RTN","SAMICTT3",220,0)
;
"RTN","SAMICTT3",221,0)
;
"RTN","SAMICTT3",222,0)
;s outmode="hold"
"RTN","SAMICTT3",223,0)
if $$XVAL("cemln",vals)="y" d ;
"RTN","SAMICTT3",224,0)
. s yesmm=1
"RTN","SAMICTT3",225,0)
. n llist,item
"RTN","SAMICTT3",226,0)
. s (llist,item)=""
"RTN","SAMICTT3",227,0)
. f s item=$o(lnlist(item)) q:item="" d ;
"RTN","SAMICTT3",228,0)
. . i $$XVAL(lnlist(item),vals)'="" s llist($o(llist(""),-1)+1)=lnlist(item)
"RTN","SAMICTT3",229,0)
. n lnum,slnum
"RTN","SAMICTT3",230,0)
. s lnum=$o(llist(""),-1)
"RTN","SAMICTT3",231,0)
. i lnum=0 d OUT("Enlarged or growing lymph nodes are noted.")
"RTN","SAMICTT3",232,0)
. i lnum>0 d ;
"RTN","SAMICTT3",233,0)
. . s slnum=lnum
"RTN","SAMICTT3",234,0)
. . d OUT("Enlarged or growing lymph nodes in the ")
"RTN","SAMICTT3",235,0)
. . s item=""
"RTN","SAMICTT3",236,0)
. . f s item=$o(llist(item)) q:item="" d ;
"RTN","SAMICTT3",237,0)
. . . d OUT(lnlistt(item))
"RTN","SAMICTT3",238,0)
. . . i lnum>2 d OUT(", ")
"RTN","SAMICTT3",239,0)
. . . i lnum=2 d OUT(" and ")
"RTN","SAMICTT3",240,0)
. . . s lnum=lnum-1
"RTN","SAMICTT3",241,0)
. . i slnum>1 d OUT(" locations.")
"RTN","SAMICTT3",242,0)
. . i slnum=1 d OUT(" location.")
"RTN","SAMICTT3",243,0)
;
"RTN","SAMICTT3",244,0)
;s outmode="go"
"RTN","SAMICTT3",245,0)
;d OUT("")
"RTN","SAMICTT3",246,0)
;
"RTN","SAMICTT3",247,0)
if $$XVAL("cemlncab",vals)="y" d ;
"RTN","SAMICTT3",248,0)
. set yesmm=1
"RTN","SAMICTT3",249,0)
. d OUT("Calcified lymph nodes present.")
"RTN","SAMICTT3",250,0)
;
"RTN","SAMICTT3",251,0)
if $$XVAL("ceagaln",vals)="y" d ;
"RTN","SAMICTT3",252,0)
. set yesmm=1
"RTN","SAMICTT3",253,0)
. d OUT("Enlarged or growing axillary lymph nodes without central fat are seen.")
"RTN","SAMICTT3",254,0)
. d OUT($$XVAL("ceagalns",vals))
"RTN","SAMICTT3",255,0)
;
"RTN","SAMICTT3",256,0)
if $$XVAL("cemva",vals)="y" d ;
"RTN","SAMICTT3",257,0)
. set yesmm=1
"RTN","SAMICTT3",258,0)
. if $$XVAL("cemvaa",vals)="a" d ;
"RTN","SAMICTT3",259,0)
. . d OUT("Other vascular abnormalities are seen in the aorta.")
"RTN","SAMICTT3",260,0)
. if $$XVAL("cemvaa",vals)="w" d ;
"RTN","SAMICTT3",261,0)
. . d OUT("Other vascular abnormalities are seen in the pulmonary series.")
"RTN","SAMICTT3",262,0)
. d OUT($$XVAL("cemvaos",vals)_"<br>")
"RTN","SAMICTT3",263,0)
;
"RTN","SAMICTT3",264,0)
;s outmode="hold"
"RTN","SAMICTT3",265,0)
; # Esophageal
"RTN","SAMICTT3",266,0)
if $$XVAL("cemeln",vals)="y" d ;
"RTN","SAMICTT3",267,0)
. set yesmm=1
"RTN","SAMICTT3",268,0)
. n elist s elist=""
"RTN","SAMICTT3",269,0)
. set numl=0
"RTN","SAMICTT3",270,0)
. if $$XVAL("cemelna",vals)="a" d ;
"RTN","SAMICTT3",271,0)
. . s elist($o(elist(""),-1)+1)="Air-fluid level"
"RTN","SAMICTT3",272,0)
. . s numl=numl+1
"RTN","SAMICTT3",273,0)
. if $$XVAL("cemelnw",vals)="w" d ;
"RTN","SAMICTT3",274,0)
. . s elist($o(elist(""),-1)+1)="Wall thickening"
"RTN","SAMICTT3",275,0)
. . s numl=numl+1
"RTN","SAMICTT3",276,0)
. if $$XVAL("cemelnm",vals)="m" d ;
"RTN","SAMICTT3",277,0)
. . s elist($o(elist(""),-1)+1)="A mass"
"RTN","SAMICTT3",278,0)
. . s numl=numl+1
"RTN","SAMICTT3",279,0)
. if numl=0 d OUT("Esophageal abnormality noted.")
"RTN","SAMICTT3",280,0)
. e d ;
"RTN","SAMICTT3",281,0)
. . d OUT($g(elist(1)))
"RTN","SAMICTT3",282,0)
. . if numl=1 d OUT(" is ")
"RTN","SAMICTT3",283,0)
. . e d ;
"RTN","SAMICTT3",284,0)
. . . if numl=2 d ;
"RTN","SAMICTT3",285,0)
. . . . d OUT(" and ")
"RTN","SAMICTT3",286,0)
. . . e d OUT(", ")
"RTN","SAMICTT3",287,0)
. . . d OUT($$LOWC($g(elist(2))))
"RTN","SAMICTT3",288,0)
. . . if numl=3 d ;
"RTN","SAMICTT3",289,0)
. . . . d OUT(", and "_$$LOWC($g(elist(3))))
"RTN","SAMICTT3",290,0)
. . d OUT("seen in the esophagus.")
"RTN","SAMICTT3",291,0)
. d OUT($$XVAL("cemelnos",vals))
"RTN","SAMICTT3",292,0)
;s outmode="go"
"RTN","SAMICTT3",293,0)
;d OUT("")
"RTN","SAMICTT3",294,0)
;
"RTN","SAMICTT3",295,0)
;
"RTN","SAMICTT3",296,0)
if $$XVAL("cehhn",vals)="y" d ;
"RTN","SAMICTT3",297,0)
. set yesmm=1
"RTN","SAMICTT3",298,0)
. if $$XVAL("cehhnos",vals)'="" d OUT("Hiatal hernia: "_$$XVAL("cehhnos",vals))
"RTN","SAMICTT3",299,0)
. if $$XVAL("cehhnos",vals)="" d OUT("Hiatal hernia.")
"RTN","SAMICTT3",300,0)
. d OUT("")
"RTN","SAMICTT3",301,0)
;
"RTN","SAMICTT3",302,0)
if $$XVAL("ceomm",vals)="y" d ;
"RTN","SAMICTT3",303,0)
. set yesmm=1
"RTN","SAMICTT3",304,0)
. n tval
"RTN","SAMICTT3",305,0)
. set tval=$$XVAL("ceommos",vals)
"RTN","SAMICTT3",306,0)
. set abn=$$CCMSTR("ceamc^ceamy^ceamm",vals)
"RTN","SAMICTT3",307,0)
. if abn="" d OUT(sp1_"Abnormality noted in the mediastinum. ")
"RTN","SAMICTT3",308,0)
. e d OUT(sp1_abn_" mediastinum. ")
"RTN","SAMICTT3",309,0)
. d OUT(tval)
"RTN","SAMICTT3",310,0)
i yesmm=0 d OUT(sp1_"No abnormalities.")
"RTN","SAMICTT3",311,0)
i $$XVAL("ceotabnm",vals)'="" d ;
"RTN","SAMICTT3",312,0)
. d OUT(sp1_$$XVAL("ceotabnm",vals)_".")
"RTN","SAMICTT3",313,0)
s outmode="go"
"RTN","SAMICTT3",314,0)
d OUT("")
"RTN","SAMICTT3",315,0)
;
"RTN","SAMICTT3",316,0)
;
"RTN","SAMICTT3",317,0)
q
"RTN","SAMICTT3",318,0)
;
"RTN","SAMICTT3",319,0)
;
"RTN","SAMICTT3",320,0)
CCMSTR(lst,vals) ; extrinsic that forms phrases
"RTN","SAMICTT3",321,0)
n retstr s retstr=""
"RTN","SAMICTT3",322,0)
n lblist s lblist=""
"RTN","SAMICTT3",323,0)
n lb,ib s ib=""
"RTN","SAMICTT3",324,0)
f lb=1:1:$l(lst,"^") d ;
"RTN","SAMICTT3",325,0)
. n lvar s lvar=$p(lst,"^",lb)
"RTN","SAMICTT3",326,0)
. s ib=$$XVAL($p(lst,"^",lb),vals)
"RTN","SAMICTT3",327,0)
. if ib'="" d ;
"RTN","SAMICTT3",328,0)
. . i ib="y" d ;
"RTN","SAMICTT3",329,0)
. . . i $f("ceasc cealc ceapc ceapc ceaac ceakc",lvar)>0 s lblist($o(lblist(""),-1)+1)="Calcification"
"RTN","SAMICTT3",330,0)
. . . ;i "ceasc cealc ceapc ceapc ceaac ceakc"[lb s lblist($o(lblist(""),-1)+1)="Calcification"
"RTN","SAMICTT3",331,0)
. . . else s lblist($o(lblist(""),-1)+1)="Cyst"
"RTN","SAMICTT3",332,0)
. . i ib="c" s lblist($o(lblist(""),-1)+1)="Calcification"
"RTN","SAMICTT3",333,0)
. . i ib="m" s lblist($o(lblist(""),-1)+1)="Mass"
"RTN","SAMICTT3",334,0)
i $o(lblist(""),-1)=1 s retstr=retstr_lblist(1)_" is seen in the"
"RTN","SAMICTT3",335,0)
e i $o(lblist(""),-1)=2 s retstr=retstr_lblist(1)_" and "_$$LOWC(lblist(2))_" are seen in the"
"RTN","SAMICTT3",336,0)
e i $o(lblist(""),-1)=3 s retstr=retstr_"Calicification, cyst, and mass are seen in the"
"RTN","SAMICTT3",337,0)
q retstr
"RTN","SAMICTT3",338,0)
;
"RTN","SAMICTT3",339,0)
LOWC(X) ; CONVERT X TO LOWERCASE
"RTN","SAMICTT3",340,0)
Q $TR(X,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
"RTN","SAMICTT3",341,0)
;
"RTN","SAMICTT3",342,0)
OUT(ln) ;
"RTN","SAMICTT3",343,0)
i outmode="hold" s line=line_ln q ;
"RTN","SAMICTT3",344,0)
s cnt=cnt+1
"RTN","SAMICTT3",345,0)
n lnn
"RTN","SAMICTT3",346,0)
;s debug=1
"RTN","SAMICTT3",347,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT3",348,0)
i outmode="go" d ;
"RTN","SAMICTT3",349,0)
. s @rtn@(lnn)=line
"RTN","SAMICTT3",350,0)
. s line=""
"RTN","SAMICTT3",351,0)
. s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT3",352,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT3",353,0)
i $g(debug)=1 d ;
"RTN","SAMICTT3",354,0)
. i ln["<" q ; no markup
"RTN","SAMICTT3",355,0)
. n zs s zs=$STACK
"RTN","SAMICTT3",356,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT3",357,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT3",358,0)
q
"RTN","SAMICTT3",359,0)
;
"RTN","SAMICTT3",360,0)
OUTOLD(ln) ;
"RTN","SAMICTT3",361,0)
s cnt=cnt+1
"RTN","SAMICTT3",362,0)
n lnn
"RTN","SAMICTT3",363,0)
;s debug=1
"RTN","SAMICTT3",364,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT3",365,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT3",366,0)
i $g(debug)=1 d ;
"RTN","SAMICTT3",367,0)
. i ln["<" q ; no markup
"RTN","SAMICTT3",368,0)
. n zs s zs=$STACK
"RTN","SAMICTT3",369,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT3",370,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT3",371,0)
q
"RTN","SAMICTT3",372,0)
;
"RTN","SAMICTT3",373,0)
HOUT(ln) ;
"RTN","SAMICTT3",374,0)
D OUT(ln)
"RTN","SAMICTT3",375,0)
;d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT3",376,0)
q
"RTN","SAMICTT3",377,0)
;
"RTN","SAMICTT3",378,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT3",379,0)
; vals is passed by name
"RTN","SAMICTT3",380,0)
n zr
"RTN","SAMICTT3",381,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT3",382,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT3",383,0)
q zr
"RTN","SAMICTT3",384,0)
;
"RTN","SAMICTT3",385,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT3",386,0)
; vals and dict are passed by name
"RTN","SAMICTT3",387,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT3",388,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT3",389,0)
n zr,zv,zdx
"RTN","SAMICTT3",390,0)
s zdx=$g(valdx)
"RTN","SAMICTT3",391,0)
i zdx="" s zdx=var
"RTN","SAMICTT3",392,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT3",393,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT3",394,0)
i zv="" s zr="" q zr
"RTN","SAMICTT3",395,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT3",396,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT3",397,0)
q zr
"RTN","SAMICTT3",398,0)
;
"RTN","SAMICTT4")
0^7^B35570521
"RTN","SAMICTT4",1,0)
SAMICTT4 ;ven/gpl - ielcap: forms ; 3/19/19 1:27pm
"RTN","SAMICTT4",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT4",3,0)
;
"RTN","SAMICTT4",4,0)
;
"RTN","SAMICTT4",5,0)
quit ; no entry from top
"RTN","SAMICTT4",6,0)
;
"RTN","SAMICTT4",7,0)
BREAST(rtn,vals,dict) ;
"RTN","SAMICTT4",8,0)
; repgen6
"RTN","SAMICTT4",9,0)
n sp1 s sp1=" "
"RTN","SAMICTT4",10,0)
n outmode s outmode="hold"
"RTN","SAMICTT4",11,0)
n line s line=""
"RTN","SAMICTT4",12,0)
n destr s destr="is seen"
"RTN","SAMICTT4",13,0)
n sba set sba=0
"RTN","SAMICTT4",14,0)
; # Breast Abnormalities
"RTN","SAMICTT4",15,0)
n bd,brt,blt
"RTN","SAMICTT4",16,0)
s (bd,brt,blt)=0
"RTN","SAMICTT4",17,0)
if $$XVAL("ceobard",vals)'="-" s brt=$$XVAL("ceobard",vals)
"RTN","SAMICTT4",18,0)
if $$XVAL("ceobald",vals)'="-" s brt=$$XVAL("ceobald",vals)
"RTN","SAMICTT4",19,0)
if (blt'=0)!(brt'=0) d ;
"RTN","SAMICTT4",20,0)
. d OUT("Breast:")
"RTN","SAMICTT4",21,0)
. s bd=1
"RTN","SAMICTT4",22,0)
s outmode="hold"
"RTN","SAMICTT4",23,0)
if $$XVAL("ceara",vals)="y" d ; our substitute for ceoba, which is null
"RTN","SAMICTT4",24,0)
. if bd=0 d OUT("Breast:")
"RTN","SAMICTT4",25,0)
. if $$XVAL("ceara",vals)="y" d ;
"RTN","SAMICTT4",26,0)
. . set sba=1
"RTN","SAMICTT4",27,0)
. . n br
"RTN","SAMICTT4",28,0)
. . set br=$$CCMSTR^SAMICTR3("ceobarc^ceobary^ceobarm",vals)
"RTN","SAMICTT4",29,0)
. . if br="" d OUT("Noted in right breast: ")
"RTN","SAMICTT4",30,0)
. . if br'="" d OUT(br_" right breast. ")
"RTN","SAMICTT4",31,0)
. . d OUT($$XVAL("ceobaros",vals))
"RTN","SAMICTT4",32,0)
if $$XVAL("ceafa",vals)="y" d ; our substitute for ceoba, which is null
"RTN","SAMICTT4",33,0)
. if bd=0 d OUT("Breast:")
"RTN","SAMICTT4",34,0)
. if $$XVAL("ceafa",vals)="y" d ;
"RTN","SAMICTT4",35,0)
. . set sba=1
"RTN","SAMICTT4",36,0)
. . n br
"RTN","SAMICTT4",37,0)
. . set br=$$CCMSTR^SAMICTR3("ceobafc^ceobafy^ceobafm",vals)
"RTN","SAMICTT4",38,0)
. . if br="" d OUT("Noted in left breast: ")
"RTN","SAMICTT4",39,0)
. . if br'="" d OUT(br_" left breast. ")
"RTN","SAMICTT4",40,0)
. . d OUT($$XVAL("ceobafos",vals))
"RTN","SAMICTT4",41,0)
if bd=1 d ;
"RTN","SAMICTT4",42,0)
. if blt=brt d OUT("Density: "_$$XSUB("ceobad",vals,dict,"ceobald"))
"RTN","SAMICTT4",43,0)
. else d OUT("Density: Left "_$$XSUB("ceobad",vals,dict,"ceobald")_", Right "_$$XSUB("ceobad",vals,dict,"ceobard")_". ")
"RTN","SAMICTT4",44,0)
if $$XVAL("ceobrc",vals)'="" d OUT($$XVAL("ceobrc",vals))
"RTN","SAMICTT4",45,0)
else if sba=1 d OUT("")
"RTN","SAMICTT4",46,0)
s outmode="go"
"RTN","SAMICTT4",47,0)
d OUT("")
"RTN","SAMICTT4",48,0)
;
"RTN","SAMICTT4",49,0)
;
"RTN","SAMICTT4",50,0)
s outmode="hold"
"RTN","SAMICTT4",51,0)
d OUT("Abdomen: ")
"RTN","SAMICTT4",52,0)
n yesaa s yesaa=0
"RTN","SAMICTT4",53,0)
; # Special Handling for the gallbladder
"RTN","SAMICTT4",54,0)
;
"RTN","SAMICTT4",55,0)
if $$XVAL("ceaga",vals)="y" d ;
"RTN","SAMICTT4",56,0)
. d OUT(sp1_"Limited view of the upper abdomen reveals the following: ")
"RTN","SAMICTT4",57,0)
. set yesaa=1
"RTN","SAMICTT4",58,0)
. if $$XVAL("ceagh",vals)="h" d ;
"RTN","SAMICTT4",59,0)
. . d OUT(sp1_"status post cholecystectomy. ")
"RTN","SAMICTT4",60,0)
. if $$XVAL("ceags",vals)="s" d ;
"RTN","SAMICTT4",61,0)
. . d OUT(sp1_"Gallstones are noted. ")
"RTN","SAMICTT4",62,0)
. if $$XVAL("ceagl",vals)="l" d ;
"RTN","SAMICTT4",63,0)
. . d OUT(sp1_"Sludge is seen in the gall bladder. ")
"RTN","SAMICTT4",64,0)
. if $$XVAL("ceago",vals)="y" d ;
"RTN","SAMICTT4",65,0)
. . d OUT(sp1_"An abnormality was noted in the gall bladder: ")
"RTN","SAMICTT4",66,0)
if $$XVAL("ceagos",vals)'="" d ;
"RTN","SAMICTT4",67,0)
. d OUT($$XVAL("ceagos",vals))
"RTN","SAMICTT4",68,0)
;
"RTN","SAMICTT4",69,0)
n aalist
"RTN","SAMICTT4",70,0)
s aalist(1,"spleen",0)=$$XVAL("ceasa",vals)
"RTN","SAMICTT4",71,0)
s aalist(1,"spleen",1)="ceasc^ceasy^ceasm"
"RTN","SAMICTT4",72,0)
s aalist(1,"spleen",2)=$$XVAL("ceasos",vals)
"RTN","SAMICTT4",73,0)
s aalist(2,"liver",0)=$$XVAL("ceala",vals)
"RTN","SAMICTT4",74,0)
s aalist(2,"liver",1)="cealc^cealy^cealm"
"RTN","SAMICTT4",75,0)
s aalist(2,"liver",2)=$$XVAL("cealos",vals)
"RTN","SAMICTT4",76,0)
s aalist(3,"pancreas",0)=$$XVAL("ceapa",vals)
"RTN","SAMICTT4",77,0)
s aalist(3,"pancreas",1)="ceapc^ceapy^ceapm"
"RTN","SAMICTT4",78,0)
s aalist(3,"pancreas",2)=$$XVAL("ceapos",vals)
"RTN","SAMICTT4",79,0)
s aalist(4,"adrenals",0)=$$XVAL("ceaaa",vals)
"RTN","SAMICTT4",80,0)
s aalist(4,"adrenals",1)="ceaac^ceaay^ceaam"
"RTN","SAMICTT4",81,0)
s aalist(4,"adrenals",2)=$$XVAL("ceaaos",vals)
"RTN","SAMICTT4",82,0)
s aalist(5,"kidneys",0)=$$XVAL("ceaka",vals)
"RTN","SAMICTT4",83,0)
s aalist(5,"kidneys",1)="ceakc^ceaky^ceakm"
"RTN","SAMICTT4",84,0)
s aalist(5,"kidneys",2)=$$XVAL("ceakos",vals)
"RTN","SAMICTT4",85,0)
;
"RTN","SAMICTT4",86,0)
n zan,zaa s zaa=""
"RTN","SAMICTT4",87,0)
f zan=1:1:5 d ;
"RTN","SAMICTT4",88,0)
. s zaa=$o(aalist(zan,""))
"RTN","SAMICTT4",89,0)
. if aalist(zan,zaa,0)="y" d ;
"RTN","SAMICTT4",90,0)
. . n zout
"RTN","SAMICTT4",91,0)
. . s zout=$$CCMSTR^SAMICTR3(aalist(zan,zaa,1),vals)
"RTN","SAMICTT4",92,0)
. . set yesaa=1
"RTN","SAMICTT4",93,0)
. . if zout="" d ;
"RTN","SAMICTT4",94,0)
. . . ;d OUT(aalist(zan,zaa,2))
"RTN","SAMICTT4",95,0)
. . . if aalist(zan,zaa,2)'="" d OUT(aalist(zan,zaa,2))
"RTN","SAMICTT4",96,0)
. . if zout'="" d ;
"RTN","SAMICTT4",97,0)
. . . d OUT(sp1_"A "_$$LOWC^SAMICTR3(zout)_" "_zaa_". "_aalist(zan,zaa,2))
"RTN","SAMICTT4",98,0)
;
"RTN","SAMICTT4",99,0)
;# Other Abdominal Abnormalities
"RTN","SAMICTT4",100,0)
;
"RTN","SAMICTT4",101,0)
if $$XVAL("ceaoab",vals)'="" d ;
"RTN","SAMICTT4",102,0)
. d OUT($$XVAL("ceaoab",vals)_".")
"RTN","SAMICTT4",103,0)
if yesaa=0 d ;
"RTN","SAMICTT4",104,0)
. d OUT(sp1_"Limited view of the upper abdomen reveals no abnormalities.")
"RTN","SAMICTT4",105,0)
;
"RTN","SAMICTT4",106,0)
;
"RTN","SAMICTT4",107,0)
;# Other Chest Abnormalities
"RTN","SAMICTT4",108,0)
;
"RTN","SAMICTT4",109,0)
if $$XVAL("ceotab",vals)'="" d
"RTN","SAMICTT4",110,0)
. d OUT("Other chest abnormalities:")
"RTN","SAMICTT4",111,0)
. d OUT($$XVAL("ceotab",vals)_". ")
"RTN","SAMICTT4",112,0)
;
"RTN","SAMICTT4",113,0)
s outmode="go"
"RTN","SAMICTT4",114,0)
d OUT("")
"RTN","SAMICTT4",115,0)
;
"RTN","SAMICTT4",116,0)
;# Bone Abnormalities
"RTN","SAMICTT4",117,0)
;
"RTN","SAMICTT4",118,0)
s outmode="hold"
"RTN","SAMICTT4",119,0)
if $$XVAL("ceaoabb",vals)'="" d ;
"RTN","SAMICTT4",120,0)
. d OUT("Bone:")
"RTN","SAMICTT4",121,0)
. d OUT($$XVAL("ceaoabb",vals)_para)
"RTN","SAMICTT4",122,0)
d ;
"RTN","SAMICTT4",123,0)
. q ; LungRADS moved to SAMICTRA
"RTN","SAMICTT4",124,0)
. n lradModifiers
"RTN","SAMICTT4",125,0)
. s lradModifiers=$$XVAL("celradc",vals)_$$XVAL("celrads",vals)
"RTN","SAMICTT4",126,0)
. ;
"RTN","SAMICTT4",127,0)
. i ($$XVAL("celrad",vals)'="-")&($$XVAL("celrad",vals)'="") d ;
"RTN","SAMICTT4",128,0)
. . d OUT("The LungRADS category for this scan is: "_$$XVAL("celrad",vals)_" "_lradModifiers)
"RTN","SAMICTT4",129,0)
. . d OUT("")
"RTN","SAMICTT4",130,0)
s outmode="go"
"RTN","SAMICTT4",131,0)
d OUT("")
"RTN","SAMICTT4",132,0)
q
"RTN","SAMICTT4",133,0)
;
"RTN","SAMICTT4",134,0)
;
"RTN","SAMICTT4",135,0)
OUT(ln) ;
"RTN","SAMICTT4",136,0)
i outmode="hold" s line=line_ln q ;
"RTN","SAMICTT4",137,0)
s cnt=cnt+1
"RTN","SAMICTT4",138,0)
n lnn
"RTN","SAMICTT4",139,0)
i $g(debug)'=1 s debug=0
"RTN","SAMICTT4",140,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT4",141,0)
i outmode="go" d ;
"RTN","SAMICTT4",142,0)
. s @rtn@(lnn)=line
"RTN","SAMICTT4",143,0)
. s line=""
"RTN","SAMICTT4",144,0)
. s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT4",145,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT4",146,0)
i $g(debug)=1 d ;
"RTN","SAMICTT4",147,0)
. i ln["<" q ; no markup
"RTN","SAMICTT4",148,0)
. n zs s zs=$STACK
"RTN","SAMICTT4",149,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT4",150,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT4",151,0)
q
"RTN","SAMICTT4",152,0)
;
"RTN","SAMICTT4",153,0)
OUTOLD(ln) ;
"RTN","SAMICTT4",154,0)
s cnt=cnt+1
"RTN","SAMICTT4",155,0)
n lnn
"RTN","SAMICTT4",156,0)
;s debug=1
"RTN","SAMICTT4",157,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT4",158,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT4",159,0)
i $g(debug)=1 d ;
"RTN","SAMICTT4",160,0)
. i ln["<" q ; no markup
"RTN","SAMICTT4",161,0)
. n zs s zs=$STACK
"RTN","SAMICTT4",162,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT4",163,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT4",164,0)
q
"RTN","SAMICTT4",165,0)
;
"RTN","SAMICTT4",166,0)
HOUT(ln) ;
"RTN","SAMICTT4",167,0)
d OUT(ln)
"RTN","SAMICTT4",168,0)
;d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT4",169,0)
q
"RTN","SAMICTT4",170,0)
;
"RTN","SAMICTT4",171,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT4",172,0)
; vals is passed by name
"RTN","SAMICTT4",173,0)
n zr
"RTN","SAMICTT4",174,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT4",175,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT4",176,0)
q zr
"RTN","SAMICTT4",177,0)
;
"RTN","SAMICTT4",178,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT4",179,0)
; vals and dict are passed by name
"RTN","SAMICTT4",180,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT4",181,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT4",182,0)
n zr,zv,zdx
"RTN","SAMICTT4",183,0)
s zdx=$g(valdx)
"RTN","SAMICTT4",184,0)
i zdx="" s zdx=var
"RTN","SAMICTT4",185,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT4",186,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT4",187,0)
i zv="" s zr="" q zr
"RTN","SAMICTT4",188,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT4",189,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT4",190,0)
q zr
"RTN","SAMICTT4",191,0)
;
"RTN","SAMICTT4",192,0)
;
"RTN","SAMICTT9")
0^8^B10292811
"RTN","SAMICTT9",1,0)
SAMICTR9 ;ven/gpl - ielcap: forms ; 12/28/18 10:26am
"RTN","SAMICTT9",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTT9",3,0)
;
"RTN","SAMICTT9",4,0)
;
"RTN","SAMICTT9",5,0)
quit ; no entry from top
"RTN","SAMICTT9",6,0)
;
"RTN","SAMICTT9",7,0)
IMPRSN(rtn,vals,dict) ;
"RTN","SAMICTT9",8,0)
; repgen13
"RTN","SAMICTT9",9,0)
;
"RTN","SAMICTT9",10,0)
;
"RTN","SAMICTT9",11,0)
; # Impression
"RTN","SAMICTT9",12,0)
;d OUT("</TD></TR></TABLE><TR><TD>")
"RTN","SAMICTT9",13,0)
;d OUT("<HR SIZE=""2"" WIDTH=""100%"" ALIGN=""center"" NOSHADE>")
"RTN","SAMICTT9",14,0)
;d OUT("</TD></TR>")
"RTN","SAMICTT9",15,0)
;d OUT("<!-- impression -->")
"RTN","SAMICTT9",16,0)
;d OUT("<TR><TD>")
"RTN","SAMICTT9",17,0)
;d OUT("<FONT SIZE=""+2"">")
"RTN","SAMICTT9",18,0)
;d OUT("<B>IMPRESSION:</B>")
"RTN","SAMICTT9",19,0)
;d OUT("</FONT>")
"RTN","SAMICTT9",20,0)
;d OUT("</TD></TR><TR><TD><TABLE>")
"RTN","SAMICTT9",21,0)
;d OUT("<TR><TD WIDTH=20></TD><TD>")
"RTN","SAMICTT9",22,0)
d OUT("")
"RTN","SAMICTT9",23,0)
d OUT("IMPRESSION:")
"RTN","SAMICTT9",24,0)
d OUT("")
"RTN","SAMICTT9",25,0)
;
"RTN","SAMICTT9",26,0)
d OUT($$XSUB("ceimn",vals,dict)_para)
"RTN","SAMICTT9",27,0)
;
"RTN","SAMICTT9",28,0)
;# Report CAC Score and Extent of Emphysema
"RTN","SAMICTT9",29,0)
s cacval=0
"RTN","SAMICTT9",30,0)
d ;if $$XVAL("ceccv",vals)'="e" d ;
"RTN","SAMICTT9",31,0)
. set vcac=$$XVAL("cecccac",vals)
"RTN","SAMICTT9",32,0)
. if vcac'="" d ;
"RTN","SAMICTT9",33,0)
. . s cacrec=""
"RTN","SAMICTT9",34,0)
. . s cac="The Visual Coronary Artery Calcium (CAC) Score is "_vcac_". "
"RTN","SAMICTT9",35,0)
. . s cacval=vcac
"RTN","SAMICTT9",36,0)
. . i cacval>3 s cacrec=$g(@dict@("CAC_recommendation"))_para
"RTN","SAMICTT9",37,0)
;
"RTN","SAMICTT9",38,0)
i cacval>0 d ;
"RTN","SAMICTT9",39,0)
. d OUT("")
"RTN","SAMICTT9",40,0)
. d OUT(cac_" "_cacrec_" ") d OUT("")
"RTN","SAMICTT9",41,0)
. d ;if $$XVAL("ceemv",vals)="e" d ;
"RTN","SAMICTT9",42,0)
. . if $$XVAL("ceem",vals)'="no" d ;
"RTN","SAMICTT9",43,0)
. . . if $$XVAL("ceem",vals)="nv" q ;
"RTN","SAMICTT9",44,0)
. . . d OUT("Emphysema:") d OUT("")
"RTN","SAMICTT9",45,0)
. . . d OUT($$XSUB("ceem",vals,dict)_".") d OUT("")
"RTN","SAMICTT9",46,0)
;
"RTN","SAMICTT9",47,0)
i $$XVAL("ceclini",vals)="y" d ;
"RTN","SAMICTT9",48,0)
. d OUT($$XVAL("ceclin",vals)_".") d OUT("")
"RTN","SAMICTT9",49,0)
;
"RTN","SAMICTT9",50,0)
i $$XVAL("ceoppai",vals)="y" d ;
"RTN","SAMICTT9",51,0)
. d OUT($$XVAL("ceoppa",vals)_".") d OUT("")
"RTN","SAMICTT9",52,0)
;
"RTN","SAMICTT9",53,0)
i $$XVAL("ceoppabi",vals)="y" d ;
"RTN","SAMICTT9",54,0)
. d OUT($$XVAL("ceoppab",vals)_".") d OUT("")
"RTN","SAMICTT9",55,0)
;
"RTN","SAMICTT9",56,0)
i $$XVAL("cecommcai",vals)="y" d ;
"RTN","SAMICTT9",57,0)
. d OUT($$XVAL("cecommca",vals)_".") d OUT("")
"RTN","SAMICTT9",58,0)
;
"RTN","SAMICTT9",59,0)
i $$XVAL("ceotabnmi",vals)="y" d ;
"RTN","SAMICTT9",60,0)
. d OUT($$XVAL("ceotabnm",vals)_".") d OUT("")
"RTN","SAMICTT9",61,0)
;
"RTN","SAMICTT9",62,0)
i $$XVAL("ceobrci",vals)="y" d ;
"RTN","SAMICTT9",63,0)
. d OUT($$XVAL("ceobrc",vals)_".") d OUT("")
"RTN","SAMICTT9",64,0)
;
"RTN","SAMICTT9",65,0)
i $$XVAL("ceaoabbi",vals)="y" d ;
"RTN","SAMICTT9",66,0)
. d OUT($$XVAL("ceaoabb",vals)_".") d OUT("")
"RTN","SAMICTT9",67,0)
;
"RTN","SAMICTT9",68,0)
i $$XVAL("ceaoabi",vals)="y" d ;
"RTN","SAMICTT9",69,0)
. d OUT($$XVAL("ceaoab",vals)_".") d OUT("")
"RTN","SAMICTT9",70,0)
;
"RTN","SAMICTT9",71,0)
;# Impression Remarks
"RTN","SAMICTT9",72,0)
i $$XVAL("ceimre",vals)'="" d ;
"RTN","SAMICTT9",73,0)
. d OUT($$XVAL("ceimre",vals)_".") d OUT("")
"RTN","SAMICTT9",74,0)
q
"RTN","SAMICTT9",75,0)
;
"RTN","SAMICTT9",76,0)
;
"RTN","SAMICTT9",77,0)
OUT(ln) ;
"RTN","SAMICTT9",78,0)
s cnt=cnt+1
"RTN","SAMICTT9",79,0)
n lnn
"RTN","SAMICTT9",80,0)
;s debug=1
"RTN","SAMICTT9",81,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTT9",82,0)
s @rtn@(lnn)=ln
"RTN","SAMICTT9",83,0)
i $g(debug)=1 d ;
"RTN","SAMICTT9",84,0)
. i ln["<" q ; no markup
"RTN","SAMICTT9",85,0)
. n zs s zs=$STACK
"RTN","SAMICTT9",86,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTT9",87,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTT9",88,0)
q
"RTN","SAMICTT9",89,0)
;
"RTN","SAMICTT9",90,0)
HOUT(ln) ;
"RTN","SAMICTT9",91,0)
d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTT9",92,0)
q
"RTN","SAMICTT9",93,0)
;
"RTN","SAMICTT9",94,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTT9",95,0)
; vals is passed by name
"RTN","SAMICTT9",96,0)
n zr
"RTN","SAMICTT9",97,0)
s zr=$g(@vals@(var))
"RTN","SAMICTT9",98,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTT9",99,0)
q zr
"RTN","SAMICTT9",100,0)
;
"RTN","SAMICTT9",101,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTT9",102,0)
; vals and dict are passed by name
"RTN","SAMICTT9",103,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTT9",104,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTT9",105,0)
n zr,zv,zdx
"RTN","SAMICTT9",106,0)
s zdx=$g(valdx)
"RTN","SAMICTT9",107,0)
i zdx="" s zdx=var
"RTN","SAMICTT9",108,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTT9",109,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTT9",110,0)
i zv="" s zr="" q zr
"RTN","SAMICTT9",111,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTT9",112,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTT9",113,0)
q zr
"RTN","SAMICTT9",114,0)
;
"RTN","SAMICTTA")
0^9^B24206954
"RTN","SAMICTTA",1,0)
SAMICTTA ;ven/gpl - ielcap: forms ; 12/28/18 9:43am
"RTN","SAMICTTA",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMICTTA",3,0)
;
"RTN","SAMICTTA",4,0)
;
"RTN","SAMICTTA",5,0)
quit ; no entry from top
"RTN","SAMICTTA",6,0)
;
"RTN","SAMICTTA",7,0)
RCMND(rtn,vals,dict) ;
"RTN","SAMICTTA",8,0)
; repgen14
"RTN","SAMICTTA",9,0)
;
"RTN","SAMICTTA",10,0)
;
"RTN","SAMICTTA",11,0)
;# Recommendation
"RTN","SAMICTTA",12,0)
;d OUT("</TD></TR>")
"RTN","SAMICTTA",13,0)
;d OUT("</TABLE>")
"RTN","SAMICTTA",14,0)
;d OUT("<TR><TD></TD></TR>")
"RTN","SAMICTTA",15,0)
;d OUT("<!-- Recommendation -->")
"RTN","SAMICTTA",16,0)
;
"RTN","SAMICTTA",17,0)
i $$XVAL("cefu",vals)'="nf" d ; 2445-2450 gpl1
"RTN","SAMICTTA",18,0)
. ;d OUT("<TR><TD><FONT SIZE=""+2""><B>")
"RTN","SAMICTTA",19,0)
. ;d OUT("<FONT SIZE=""+2""><B>")
"RTN","SAMICTTA",20,0)
. d OUT("")
"RTN","SAMICTTA",21,0)
. d OUT("Recommendations:")
"RTN","SAMICTTA",22,0)
. d OUT("")
"RTN","SAMICTTA",23,0)
. ;d OUT("</B></FONT>")
"RTN","SAMICTTA",24,0)
. ;d OUT("</TD></TR><TR><TD><TABLE><TR><TD WIDTH=20></TD><TD>")
"RTN","SAMICTTA",25,0)
;
"RTN","SAMICTTA",26,0)
n fuw
"RTN","SAMICTTA",27,0)
s fuw=$$XSUB("cefuw",vals,dict)
"RTN","SAMICTTA",28,0)
;d OUT("fuw= "_fuw)
"RTN","SAMICTTA",29,0)
;d OUT("vals= "_vals)
"RTN","SAMICTTA",30,0)
;d OUT(" dict= "_dict)
"RTN","SAMICTTA",31,0)
;d OUT($o(@vals@("cefuw","")))
"RTN","SAMICTTA",32,0)
;zwr @vals@(*)
"RTN","SAMICTTA",33,0)
;zwr @dict@(*)
"RTN","SAMICTTA",34,0)
;i fuw="" d ;
"RTN","SAMICTTA",35,0)
;. d OUT(para_"<B>"_$$XSUB("cefu",vals,dict)_" on "_$$XVAL("cefud",vals)_".</B>"_para)
"RTN","SAMICTTA",36,0)
;e d ;
"RTN","SAMICTTA",37,0)
;. d OUT(para_"<B>"_$$XSUB("cefu",vals,dict)_" "_fuw_" on "_$$XVAL("cefud",vals)_".</B>"_para)
"RTN","SAMICTTA",38,0)
i fuw="" d ;
"RTN","SAMICTTA",39,0)
. ;d OUT(para_"<B>A followup CT scan is recommended on "_$$XVAL("cefud",vals)_".</B>"_para)
"RTN","SAMICTTA",40,0)
. d OUT("A followup CT scan is recommended on "_$$XVAL("cefud",vals)_".") d OUT("")
"RTN","SAMICTTA",41,0)
e d ;
"RTN","SAMICTTA",42,0)
. ;d OUT(para_"<B>A followup CT scan is recommended "_fuw_" on "_$$XVAL("cefud",vals)_".</B>"_para)
"RTN","SAMICTTA",43,0)
. d OUT("A followup CT scan is recommended "_fuw_" on "_$$XVAL("cefud",vals)_".") d OUT("")
"RTN","SAMICTTA",44,0)
;
"RTN","SAMICTTA",45,0)
; #Other followup
"RTN","SAMICTTA",46,0)
n zfu,ofu,tofu,comma
"RTN","SAMICTTA",47,0)
s comma=0,tofu=""
"RTN","SAMICTTA",48,0)
s ofu=""
"RTN","SAMICTTA",49,0)
f zfu="cefuaf","cefucc","cefupe","cefufn","cefubr","cefupc","cefutb" d ;
"RTN","SAMICTTA",50,0)
. i $$XVAL(zfu,vals)="y" s ofu=ofu_zfu
"RTN","SAMICTTA",51,0)
i $$XVAL("cefuo",vals)'="" s ofu=ofu_"cefuo"
"RTN","SAMICTTA",52,0)
i ofu'="" d ;
"RTN","SAMICTTA",53,0)
. s tofu="Other followup: "
"RTN","SAMICTTA",54,0)
. i ofu["cefuaf" s tofu=tofu_"Antibiotics" s comma=1
"RTN","SAMICTTA",55,0)
. i ofu["cefucc" s tofu=tofu_$s(comma:", ",1:"")_"Diagnostic CT" s comma=1
"RTN","SAMICTTA",56,0)
. i ofu["cefupe" s tofu=tofu_$s(comma:", ",1:"")_"PET" s comma=1
"RTN","SAMICTTA",57,0)
. i ofu["cefufn" s tofu=tofu_$s(comma:", ",1:"")_"Percutaneous biopsy" s comma=1
"RTN","SAMICTTA",58,0)
. i ofu["cefubr" s tofu=tofu_$s(comma:", ",1:"")_"Bronchoscopy" s comma=1
"RTN","SAMICTTA",59,0)
. i ofu["cefupc" s tofu=tofu_$s(comma:", ",1:"")_"Pulmonary consultation" s comma=1
"RTN","SAMICTTA",60,0)
. i ofu["cefutb" s tofu=tofu_$s(comma:", ",1:"")_"Refer to tumor board" s comma=1
"RTN","SAMICTTA",61,0)
. i ofu["cefuo" s tofu=tofu_$s(comma:", ",1:"")_$$XVAL("cefuoo",vals) s comma=1
"RTN","SAMICTTA",62,0)
i ofu'="" d OUT(para_tofu_para) d OUT("")
"RTN","SAMICTTA",63,0)
;d OUT("<TR><TD></TD></TR>")
"RTN","SAMICTTA",64,0)
; # LungRADS
"RTN","SAMICTTA",65,0)
;
"RTN","SAMICTTA",66,0)
;d OUT("<TR><TD>")
"RTN","SAMICTTA",67,0)
;n lrstyle
"RTN","SAMICTTA",68,0)
;i $$XVAL("celrc",vals)'="" s lrstyle=1 ; dom's style
"RTN","SAMICTTA",69,0)
;e s lrstyle=0 ; artit's style
"RTN","SAMICTTA",70,0)
;s lrstyle=0
"RTN","SAMICTTA",71,0)
;
"RTN","SAMICTTA",72,0)
d ;
"RTN","SAMICTTA",73,0)
. q ; LUNGRADS moved to SAMICTR4
"RTN","SAMICTTA",74,0)
. n lradModifiers
"RTN","SAMICTTA",75,0)
. s lradModifiers=$$XVAL("celradc",vals)_$$XVAL("celrads",vals)
"RTN","SAMICTTA",76,0)
. ;
"RTN","SAMICTTA",77,0)
. i ($$XVAL("celrad",vals)'="-")&($$XVAL("celrad",vals)'="") d ;
"RTN","SAMICTTA",78,0)
. . d OUT("The LungRADS category for this scan is: "_$$XVAL("celrad",vals)_" "_lradModifiers)
"RTN","SAMICTTA",79,0)
. . d OUT(para)
"RTN","SAMICTTA",80,0)
;
"RTN","SAMICTTA",81,0)
;d OUT("</TD></TR>")
"RTN","SAMICTTA",82,0)
;
"RTN","SAMICTTA",83,0)
;d OUT("<TR><TD><TABLE><TR><TD WIDTH=20></TD><TD>")
"RTN","SAMICTTA",84,0)
;
"RTN","SAMICTTA",85,0)
;# Check if Study is Completed
"RTN","SAMICTTA",86,0)
;# Find Current Study ID
"RTN","SAMICTTA",87,0)
;# locate most recent followup
"RTN","SAMICTTA",88,0)
;# get status (sies)
"RTN","SAMICTTA",89,0)
;# if sc=Study Complete and cefu=rs
"RTN","SAMICTTA",90,0)
;
"RTN","SAMICTTA",91,0)
n patstatus
"RTN","SAMICTTA",92,0)
s patstatus=$$XVAL("cedos",vals)
"RTN","SAMICTTA",93,0)
;i patstatus="sc" d OUT(para_$g(@dict@("study_complete")))
"RTN","SAMICTTA",94,0)
i patstatus="sc" d OUT($g(@dict@("study_complete"))) d OUT("")
"RTN","SAMICTTA",95,0)
;
"RTN","SAMICTTA",96,0)
;# Radiologist
"RTN","SAMICTTA",97,0)
i $$XVAL("cerad",vals)'="" d ;
"RTN","SAMICTTA",98,0)
. d OUT("Interpreted by: "_$$XVAL("cerad",vals)) d OUT("")
"RTN","SAMICTTA",99,0)
;
"RTN","SAMICTTA",100,0)
;d OUT("<TR><TD></TD></TR>")
"RTN","SAMICTTA",101,0)
; # LungRADS
"RTN","SAMICTTA",102,0)
;
"RTN","SAMICTTA",103,0)
;d OUT("<TR><TD>")
"RTN","SAMICTTA",104,0)
n lrstyle
"RTN","SAMICTTA",105,0)
i $$XVAL("celrc",vals)'="" s lrstyle=1 ; dom's style
"RTN","SAMICTTA",106,0)
e s lrstyle=0 ; artit's style
"RTN","SAMICTTA",107,0)
s lrstyle=0
"RTN","SAMICTTA",108,0)
;
"RTN","SAMICTTA",109,0)
d ;
"RTN","SAMICTTA",110,0)
. ;q ; LUNGRADS moved to SAMICTR4
"RTN","SAMICTTA",111,0)
. n lradModifiers
"RTN","SAMICTTA",112,0)
. s lradModifiers=$$XVAL("celradc",vals)_$$XVAL("celrads",vals)
"RTN","SAMICTTA",113,0)
. ;
"RTN","SAMICTTA",114,0)
. i ($$XVAL("celrad",vals)'="-")&($$XVAL("celrad",vals)'="") d ;
"RTN","SAMICTTA",115,0)
. . d OUT("The LungRADS category for this scan is: "_$$XVAL("celrad",vals)_" "_lradModifiers)
"RTN","SAMICTTA",116,0)
. . d OUT("")
"RTN","SAMICTTA",117,0)
;
"RTN","SAMICTTA",118,0)
;d OUT("</TD></TR>")
"RTN","SAMICTTA",119,0)
;
"RTN","SAMICTTA",120,0)
;d OUT("<TR><TD><TABLE><TR><TD WIDTH=20></TD><TD>")
"RTN","SAMICTTA",121,0)
q
"RTN","SAMICTTA",122,0)
;
"RTN","SAMICTTA",123,0)
;
"RTN","SAMICTTA",124,0)
OUT(ln) ;
"RTN","SAMICTTA",125,0)
s cnt=cnt+1
"RTN","SAMICTTA",126,0)
n lnn
"RTN","SAMICTTA",127,0)
;s debug=1
"RTN","SAMICTTA",128,0)
s lnn=$o(@rtn@(" "),-1)+1
"RTN","SAMICTTA",129,0)
s @rtn@(lnn)=ln
"RTN","SAMICTTA",130,0)
i $g(debug)=1 d ;
"RTN","SAMICTTA",131,0)
. i ln["<T" q ; no markup
"RTN","SAMICTTA",132,0)
. i ln["</" q ; no markup
"RTN","SAMICTTA",133,0)
. n zs s zs=$STACK
"RTN","SAMICTTA",134,0)
. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMICTTA",135,0)
. s @rtn@(lnn)=zp_":"_ln
"RTN","SAMICTTA",136,0)
q
"RTN","SAMICTTA",137,0)
;
"RTN","SAMICTTA",138,0)
HOUT(ln) ;
"RTN","SAMICTTA",139,0)
d OUT("<p><span class='sectionhead'>"_ln_"</span>")
"RTN","SAMICTTA",140,0)
q
"RTN","SAMICTTA",141,0)
;
"RTN","SAMICTTA",142,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMICTTA",143,0)
; vals is passed by name
"RTN","SAMICTTA",144,0)
n zr
"RTN","SAMICTTA",145,0)
s zr=$g(@vals@(var))
"RTN","SAMICTTA",146,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMICTTA",147,0)
q zr
"RTN","SAMICTTA",148,0)
;
"RTN","SAMICTTA",149,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMICTTA",150,0)
; vals and dict are passed by name
"RTN","SAMICTTA",151,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMICTTA",152,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMICTTA",153,0)
n zr,zv,zdx
"RTN","SAMICTTA",154,0)
s zdx=$g(valdx)
"RTN","SAMICTTA",155,0)
i zdx="" s zdx=var
"RTN","SAMICTTA",156,0)
s zv=$g(@vals@(zdx))
"RTN","SAMICTTA",157,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMICTTA",158,0)
i zv="" s zr="" q zr
"RTN","SAMICTTA",159,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMICTTA",160,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMICTTA",161,0)
q zr
"RTN","SAMICTTA",162,0)
;
"RTN","SAMIHOM4")
0^10^B462206546
"RTN","SAMIHOM4",1,0)
SAMIHOM4 ;ven/gpl,arc - ielcap: forms;2018-11-30T17:45Z ;Jan 14, 2020@16:04
"RTN","SAMIHOM4",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMIHOM4",3,0)
;
"RTN","SAMIHOM4",4,0)
;@license: see routine SAMIUL
"RTN","SAMIHOM4",5,0)
;
"RTN","SAMIHOM4",6,0)
; @section 0 primary development
"RTN","SAMIHOM4",7,0)
;
"RTN","SAMIHOM4",8,0)
; @routine-credits
"RTN","SAMIHOM4",9,0)
; @primary-dev: George P. Lilly (gpl)
"RTN","SAMIHOM4",10,0)
; [email protected]
"RTN","SAMIHOM4",11,0)
; @additional-dev: Alexis Carlson (arc)
"RTN","SAMIHOM4",12,0)
; [email protected]
"RTN","SAMIHOM4",13,0)
; @primary-dev-org: Vista Expertise Network (ven)
"RTN","SAMIHOM4",14,0)
; http://vistaexpertise.net
"RTN","SAMIHOM4",15,0)
; @copyright: 2012/2018, ven, all rights reserved
"RTN","SAMIHOM4",16,0)
; @license: Apache 2.0
"RTN","SAMIHOM4",17,0)
; https://www.apache.org/licenses/LICENSE-2.0.html
"RTN","SAMIHOM4",18,0)
;
"RTN","SAMIHOM4",19,0)
; @application: SAMI
"RTN","SAMIHOM4",20,0)
; @version: 18.0
"RTN","SAMIHOM4",21,0)
; @patch-list: none yet
"RTN","SAMIHOM4",22,0)
;
"RTN","SAMIHOM4",23,0)
; @to-do
"RTN","SAMIHOM4",24,0)
; Add label comments
"RTN","SAMIHOM4",25,0)
;
"RTN","SAMIHOM4",26,0)
; @section 1 code
"RTN","SAMIHOM4",27,0)
;
"RTN","SAMIHOM4",28,0)
quit ; No entry from top
"RTN","SAMIHOM4",29,0)
;
"RTN","SAMIHOM4",30,0)
;
"RTN","SAMIHOM4",31,0)
WSHOME ; web service for SAMI homepage
"RTN","SAMIHOM4",32,0)
; WSHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) goto WSHOME^SAMIHOM4
"RTN","SAMIHOM4",33,0)
;
"RTN","SAMIHOM4",34,0)
;@stanza 1 invocation, binding, & branching
"RTN","SAMIHOM4",35,0)
;
"RTN","SAMIHOM4",36,0)
;ven/gpl;web service;procedure;
"RTN","SAMIHOM4",37,0)
;@called-by
"RTN","SAMIHOM4",38,0)
;@calls
"RTN","SAMIHOM4",39,0)
; GETHOME
"RTN","SAMIHOM4",40,0)
;@input
"RTN","SAMIHOM4",41,0)
; SAMIFILTER
"RTN","SAMIHOM4",42,0)
;@output
"RTN","SAMIHOM4",43,0)
;.SAMIRTN
"RTN","SAMIHOM4",44,0)
;@examples [tbd]
"RTN","SAMIHOM4",45,0)
;@tests [tbd]
"RTN","SAMIHOM4",46,0)
;
"RTN","SAMIHOM4",47,0)
; no parameters required
"RTN","SAMIHOM4",48,0)
;
"RTN","SAMIHOM4",49,0)
;@stanza 2 present development or temporary homepage
"RTN","SAMIHOM4",50,0)
;
"RTN","SAMIHOM4",51,0)
if $get(SAMIFILTER("test"))=1 do quit
"RTN","SAMIHOM4",52,0)
. do DEVHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER)
"RTN","SAMIHOM4",53,0)
. quit
"RTN","SAMIHOM4",54,0)
;
"RTN","SAMIHOM4",55,0)
if $g(SAMIFILTER("samiroute"))'="" do quit ; workaround for "get" access to pages
"RTN","SAMIHOM4",56,0)
. new SAMIBODY set SAMIBODY(1)=""
"RTN","SAMIHOM4",57,0)
. do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN)
"RTN","SAMIHOM4",58,0)
;
"RTN","SAMIHOM4",59,0)
if $get(SAMIFILTER("dfn"))'="" do quit ; V4W/DLW - workaround for "get" access from CPRS
"RTN","SAMIHOM4",60,0)
. new dfn set dfn=$get(SAMIFILTER("dfn"))
"RTN","SAMIHOM4",61,0)
. new root set root=$$setroot^%wd("vapals-patients")
"RTN","SAMIHOM4",62,0)
. new studyid set studyid=$get(@root@(dfn,"samistudyid"))
"RTN","SAMIHOM4",63,0)
. new SAMIBODY
"RTN","SAMIHOM4",64,0)
. if studyid'="" do
"RTN","SAMIHOM4",65,0)
. . set SAMIBODY(1)="samiroute=casereview&dfn="_dfn_"&studyid="_studyid
"RTN","SAMIHOM4",66,0)
. else do
"RTN","SAMIHOM4",67,0)
. . set SAMIBODY(1)="samiroute=lookup&dfn="_dfn_"&studyid="_studyid
"RTN","SAMIHOM4",68,0)
. do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN)
"RTN","SAMIHOM4",69,0)
;
"RTN","SAMIHOM4",70,0)
do GETHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER) ; VAPALS homepage
"RTN","SAMIHOM4",71,0)
;
"RTN","SAMIHOM4",72,0)
;@stanza 3 termination
"RTN","SAMIHOM4",73,0)
;
"RTN","SAMIHOM4",74,0)
quit ; end of WSHOME
"RTN","SAMIHOM4",75,0)
;
"RTN","SAMIHOM4",76,0)
;
"RTN","SAMIHOM4",77,0)
WSVAPALS ; vapals post web service - all calls come through this gateway
"RTN","SAMIHOM4",78,0)
; WSVAPALS^SAMIHOM3(SAMIARG,SAMIBODY,SAMIRESULT) goto WSVAPALS^SAMIHOM4
"RTN","SAMIHOM4",79,0)
m ^SAMIUL("vapals")=SAMIARG
"RTN","SAMIHOM4",80,0)
m ^SAMIUL("vapals","BODY")=SAMIBODY
"RTN","SAMIHOM4",81,0)
;
"RTN","SAMIHOM4",82,0)
new vars,SAMIBDY
"RTN","SAMIHOM4",83,0)
set SAMIBDY=$get(SAMIBODY(1))
"RTN","SAMIHOM4",84,0)
do parseBody^%wf("vars",.SAMIBDY)
"RTN","SAMIHOM4",85,0)
m vars=SAMIARG
"RTN","SAMIHOM4",86,0)
k ^SAMIUL("vapals","vars")
"RTN","SAMIHOM4",87,0)
merge ^SAMIUL("vapals","vars")=vars
"RTN","SAMIHOM4",88,0)
;
"RTN","SAMIHOM4",89,0)
n route s route=$g(vars("samiroute"))
"RTN","SAMIHOM4",90,0)
i route="" d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home
"RTN","SAMIHOM4",91,0)
;
"RTN","SAMIHOM4",92,0)
i route="lookup" d q 0
"RTN","SAMIHOM4",93,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",94,0)
. d WSLOOKUP^SAMISRC2(.SAMIARG,.SAMIBODY,.SAMIRESULT)
"RTN","SAMIHOM4",95,0)
;
"RTN","SAMIHOM4",96,0)
i route="newcase" d q 0
"RTN","SAMIHOM4",97,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",98,0)
. d WSNEWCAS^SAMIHOM3(.SAMIARG,.SAMIBODY,.SAMIRESULT)
"RTN","SAMIHOM4",99,0)
;
"RTN","SAMIHOM4",100,0)
i route="casereview" d q 0
"RTN","SAMIHOM4",101,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",102,0)
. d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",103,0)
;
"RTN","SAMIHOM4",104,0)
i route="nuform" d q 0
"RTN","SAMIHOM4",105,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",106,0)
. d WSNUFORM^SAMICASE(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",107,0)
;
"RTN","SAMIHOM4",108,0)
i route="addform" d q 0
"RTN","SAMIHOM4",109,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",110,0)
. d WSNFPOST^SAMICASE(.SAMIARG,.SAMIBODY,.SAMIRESULT)
"RTN","SAMIHOM4",111,0)
;
"RTN","SAMIHOM4",112,0)
i route="form" d q 0
"RTN","SAMIHOM4",113,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",114,0)
. d wsGetForm^%wf(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",115,0)
;
"RTN","SAMIHOM4",116,0)
i route="postform" d q 0
"RTN","SAMIHOM4",117,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",118,0)
. d wsPostForm^%wf(.SAMIARG,.SAMIBODY,.SAMIRESULT)
"RTN","SAMIHOM4",119,0)
. i $g(SAMIARG("form"))["siform" d ;
"RTN","SAMIHOM4",120,0)
. . if $$NOTE^SAMINOT1(.SAMIARG) d ;
"RTN","SAMIHOM4",121,0)
. . . n SAMIFILTER
"RTN","SAMIHOM4",122,0)
. . . s SAMIFILTER("studyid")=$G(SAMIARG("studyid"))
"RTN","SAMIHOM4",123,0)
. . . s SAMIFILTER("form")=$g(SAMIARG("form")) ;
"RTN","SAMIHOM4",124,0)
. . . n tiuien
"RTN","SAMIHOM4",125,0)
. . . ;s tiuien=$$SV2VISTA^SAMIVSTA(.SAMIFILTER)
"RTN","SAMIHOM4",126,0)
. . . ;s SAMIFILTER("tiuien")=tiuien
"RTN","SAMIHOM4",127,0)
. . . ;d SV2VSTA^SAMIVSTA(.FILTER)
"RTN","SAMIHOM4",128,0)
. . . ;m ^SAMIUL("newFILTER")=SAMIFILTER
"RTN","SAMIHOM4",129,0)
. . . d WSNOTE^SAMINOT1(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",130,0)
. i $g(SAMIARG("form"))["fuform" d ;
"RTN","SAMIHOM4",131,0)
. . if $$NOTE^SAMINOT2(.SAMIARG) d ;
"RTN","SAMIHOM4",132,0)
. . . n SAMIFILTER
"RTN","SAMIHOM4",133,0)
. . . s SAMIFILTER("studyid")=$G(SAMIARG("studyid"))
"RTN","SAMIHOM4",134,0)
. . . s SAMIFILTER("form")=$g(SAMIARG("form")) ;
"RTN","SAMIHOM4",135,0)
. . . ;n tiuien
"RTN","SAMIHOM4",136,0)
. . . ;s tiuien=$$SV2VISTA^SAMIVSTA(.SAMIFILTER)
"RTN","SAMIHOM4",137,0)
. . . ;s SAMIFILTER("tiuien")=tiuien
"RTN","SAMIHOM4",138,0)
. . . ;d SV2VSTA^SAMIVSTA(.FILTER)
"RTN","SAMIHOM4",139,0)
. . . ;m ^SAMIUL("newFILTER")=SAMIFILTER
"RTN","SAMIHOM4",140,0)
. . . d WSNOTE^SAMINOT2(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",141,0)
. . e d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",142,0)
;
"RTN","SAMIHOM4",143,0)
i route="deleteform" d q 0
"RTN","SAMIHOM4",144,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",145,0)
. d DELFORM^SAMICASE(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",146,0)
;
"RTN","SAMIHOM4",147,0)
i route="ctreport" d q 0
"RTN","SAMIHOM4",148,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",149,0)
. n format s format="html"
"RTN","SAMIHOM4",150,0)
. s format="text"
"RTN","SAMIHOM4",151,0)
. i format="text" d WSNOTE^SAMINOT3(.SAMIRESULT,.SAMIARG) q ;
"RTN","SAMIHOM4",152,0)
. i format="html" d WSREPORT^SAMICTR0(.SAMIRESULT,.SAMIARG) q ;
"RTN","SAMIHOM4",153,0)
. ;d wsReport^SAMICTRT(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",154,0)
;
"RTN","SAMIHOM4",155,0)
i route="note" d q 0
"RTN","SAMIHOM4",156,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",157,0)
. d WSNOTE^SAMINOT1(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",158,0)
;
"RTN","SAMIHOM4",159,0)
i route="report" d q 0
"RTN","SAMIHOM4",160,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",161,0)
. d WSREPORT^SAMIUR(.SAMIRESULT,.vars)
"RTN","SAMIHOM4",162,0)
;
"RTN","SAMIHOM4",163,0)
i route="addperson" d q 0
"RTN","SAMIHOM4",164,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",165,0)
. n form
"RTN","SAMIHOM4",166,0)
. s form="vapals:addperson"
"RTN","SAMIHOM4",167,0)
. d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ;
"RTN","SAMIHOM4",168,0)
;
"RTN","SAMIHOM4",169,0)
i route="editperson" d q 0
"RTN","SAMIHOM4",170,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",171,0)
. n dfn s dfn=$g(vars("dfn")) ; must have a dfn
"RTN","SAMIHOM4",172,0)
. i dfn="" d q ;
"RTN","SAMIHOM4",173,0)
. . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home
"RTN","SAMIHOM4",174,0)
. n root s root=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",175,0)
. n sien s sien=$o(@root@("dfn",dfn,""))
"RTN","SAMIHOM4",176,0)
. i sien="" d q ;
"RTN","SAMIHOM4",177,0)
. . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home
"RTN","SAMIHOM4",178,0)
. s vars("name")=$g(@root@(sien,"saminame"))
"RTN","SAMIHOM4",179,0)
. s tdob=$g(@root@(sien,"dob"))
"RTN","SAMIHOM4",180,0)
. s vars("dob")=$p(tdob,"-",2)_"/"_$p(tdob,"-",3)_"/"_$p(tdob,"-",1)
"RTN","SAMIHOM4",181,0)
. s vars("sbdob")=$g(@root@(sien,"dob"))
"RTN","SAMIHOM4",182,0)
. s vars("gender")=$g(@root@(sien,"sex"))
"RTN","SAMIHOM4",183,0)
. s vars("icn")=$g(@root@(sien,"icn"))
"RTN","SAMIHOM4",184,0)
. n tssn s tssn=$g(@root@(sien,"ssn"))
"RTN","SAMIHOM4",185,0)
. s vars("ssn")=$e(tssn,1,3)_"-"_$e(tssn,4,5)_"-"_$e(tssn,6,9)
"RTN","SAMIHOM4",186,0)
. s vars("last5")=$g(@root@(sien,"last5"))
"RTN","SAMIHOM4",187,0)
. s vars("dfn")=$g(@root@(sien,"dfn"))
"RTN","SAMIHOM4",188,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",189,0)
. n form,err,zhtml
"RTN","SAMIHOM4",190,0)
. s form="vapals:editparticipant"
"RTN","SAMIHOM4",191,0)
. d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ;
"RTN","SAMIHOM4",192,0)
;
"RTN","SAMIHOM4",193,0)
i route="register" d q 0
"RTN","SAMIHOM4",194,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",195,0)
. d REG^SAMIHOM4(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",196,0)
;
"RTN","SAMIHOM4",197,0)
i route="editsave" d q 0
"RTN","SAMIHOM4",198,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",199,0)
. d SAVE^SAMIHOM4(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",200,0)
;
"RTN","SAMIHOM4",201,0)
i route="merge" d q 0
"RTN","SAMIHOM4",202,0)
. m SAMIARG=vars
"RTN","SAMIHOM4",203,0)
. d MERGE^SAMIHOM4(.SAMIRESULT,.SAMIARG)
"RTN","SAMIHOM4",204,0)
;
"RTN","SAMIHOM4",205,0)
quit 0 ; End of WSVAPALS
"RTN","SAMIHOM4",206,0)
;
"RTN","SAMIHOM4",207,0)
;
"RTN","SAMIHOM4",208,0)
REG(SAMIRTN,SAMIARG) ; manual registration
"RTN","SAMIHOM4",209,0)
;
"RTN","SAMIHOM4",210,0)
n name s name=$g(SAMIARG("name"))
"RTN","SAMIHOM4",211,0)
;
"RTN","SAMIHOM4",212,0)
m ^gpl("reg")=SAMIARG
"RTN","SAMIHOM4",213,0)
n ssn s ssn=SAMIARG("ssn")
"RTN","SAMIHOM4",214,0)
s ssn=$tr(ssn,"-")
"RTN","SAMIHOM4",215,0)
s SAMIARG("errorMessage")=""
"RTN","SAMIHOM4",216,0)
s SAMIARG("errorField")=""
"RTN","SAMIHOM4",217,0)
; test for duplicate ssn
"RTN","SAMIHOM4",218,0)
;
"RTN","SAMIHOM4",219,0)
i $$DUPSSN(ssn) d ;
"RTN","SAMIHOM4",220,0)
. ;s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN."
"RTN","SAMIHOM4",221,0)
. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN error. A person with that SSN is already entered in the system."
"RTN","SAMIHOM4",222,0)
. s SAMIARG("errorField")="ssn"
"RTN","SAMIHOM4",223,0)
;
"RTN","SAMIHOM4",224,0)
; test for duplicate icn
"RTN","SAMIHOM4",225,0)
;
"RTN","SAMIHOM4",226,0)
n icn s icn=$g(SAMIARG("icn"))
"RTN","SAMIHOM4",227,0)
i icn'="" i $$DUPICN(icn) d ;
"RTN","SAMIHOM4",228,0)
. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate ICN error. A person with that ICN is already entered in the system."
"RTN","SAMIHOM4",229,0)
. s SAMIARG("errorField")="icn"
"RTN","SAMIHOM4",230,0)
;
"RTN","SAMIHOM4",231,0)
; test for wellformed ICN
"RTN","SAMIHOM4",232,0)
;
"RTN","SAMIHOM4",233,0)
i icn'="" i $$BADICN(icn) d ;
"RTN","SAMIHOM4",234,0)
. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Invalid ICN error. The check digits in the ICN do not match"
"RTN","SAMIHOM4",235,0)
. s SAMIARG("errorField")="icn"
"RTN","SAMIHOM4",236,0)
;
"RTN","SAMIHOM4",237,0)
; if there is an error, send back to edit with error message
"RTN","SAMIHOM4",238,0)
i $g(SAMIARG("errorMessage"))'="" d q ;
"RTN","SAMIHOM4",239,0)
. n form
"RTN","SAMIHOM4",240,0)
. s form="vapals:addperson"
"RTN","SAMIHOM4",241,0)
. d RTNERR(.SAMIRESULT,form,.SAMIARG)
"RTN","SAMIHOM4",242,0)
;
"RTN","SAMIHOM4",243,0)
n root s root=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",244,0)
n proot s proot=$$setroot^%wd("vapals-patients")
"RTN","SAMIHOM4",245,0)
n ptlkien s ptlkien=""
"RTN","SAMIHOM4",246,0)
n dfn s dfn=""
"RTN","SAMIHOM4",247,0)
n sien s sien=""
"RTN","SAMIHOM4",248,0)
i ptlkien="" s ptlkien=$o(@root@("AAAAAA"),-1)+1
"RTN","SAMIHOM4",249,0)
n zm
"RTN","SAMIHOM4",250,0)
k SAMIARG("MATCHLOG")
"RTN","SAMIHOM4",251,0)
s zm=$$REMATCH(sien,.SAMIARG)
"RTN","SAMIHOM4",252,0)
i zm>0 d ;
"RTN","SAMIHOM4",253,0)
. s SAMIARG("MATCHLOG")=zm
"RTN","SAMIHOM4",254,0)
d MKPTLK(ptlkien,.SAMIARG) ; make the patient-lookup record
"RTN","SAMIHOM4",255,0)
;
"RTN","SAMIHOM4",256,0)
s dfn=$o(@root@("dfn"," "),-1)+1
"RTN","SAMIHOM4",257,0)
i dfn<9000001 s dfn=9000001
"RTN","SAMIHOM4",258,0)
s @root@(ptlkien,"dfn")=dfn
"RTN","SAMIHOM4",259,0)
d INDXPTLK(ptlkien)
"RTN","SAMIHOM4",260,0)
s SAMIFILTER("samiroute")="addperson"
"RTN","SAMIHOM4",261,0)
d SETINFO(.SAMIFILTER,name_" was successfully entered")
"RTN","SAMIHOM4",262,0)
;d SETWARN(.SAMIFILTER,"We might want to give you a warning")
"RTN","SAMIHOM4",263,0)
do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIARG,.SAMIRESULT)
"RTN","SAMIHOM4",264,0)
q
"RTN","SAMIHOM4",265,0)
;
"RTN","SAMIHOM4",266,0)
MKPTLK(ptlkien,SAMIARG) ; creates the patient-lookup record
"RTN","SAMIHOM4",267,0)
n ssn s ssn=SAMIARG("ssn")
"RTN","SAMIHOM4",268,0)
s ssn=$tr(ssn,"-")
"RTN","SAMIHOM4",269,0)
n name s name=$g(SAMIARG("name"))
"RTN","SAMIHOM4",270,0)
n sinamef,sinamel
"RTN","SAMIHOM4",271,0)
s sinamel=$p(name,","),sinamel=$$TRIM^XLFSTR(sinamel,"LR")
"RTN","SAMIHOM4",272,0)
s sinamef=$p(name,",",2),sinamef=$$TRIM^XLFSTR(sinamef,"LR")
"RTN","SAMIHOM4",273,0)
s name=sinamel_","_sinamef
"RTN","SAMIHOM4",274,0)
s @root@(ptlkien,"saminame")=name
"RTN","SAMIHOM4",275,0)
s @root@(ptlkien,"sinamef")=sinamef
"RTN","SAMIHOM4",276,0)
s @root@(ptlkien,"sinamel")=sinamel
"RTN","SAMIHOM4",277,0)
n fmdob s fmdob=$$FMDT^SAMIUR2(SAMIARG("dob"))
"RTN","SAMIHOM4",278,0)
n ptlkdob s ptlkdob=$$FMTE^XLFDT(fmdob,7)
"RTN","SAMIHOM4",279,0)
s ptlkdob=$TR(ptlkdob,"/","-")
"RTN","SAMIHOM4",280,0)
s @root@(ptlkien,"dob")=ptlkdob
"RTN","SAMIHOM4",281,0)
s @root@(ptlkien,"sbdob")=ptlkdob
"RTN","SAMIHOM4",282,0)
n gender s gender=SAMIARG("gender")
"RTN","SAMIHOM4",283,0)
s @root@(ptlkien,"gender")=$s(gender="M":"M^MALE",1:"F^FEMALE")
"RTN","SAMIHOM4",284,0)
s @root@(ptlkien,"sex")=SAMIARG("gender")
"RTN","SAMIHOM4",285,0)
s @root@(ptlkien,"icn")=SAMIARG("icn")
"RTN","SAMIHOM4",286,0)
s @root@(ptlkien,"ssn")=ssn
"RTN","SAMIHOM4",287,0)
n last5 s last5=$$UCASE($e(name,1))_$e(ssn,6,9)
"RTN","SAMIHOM4",288,0)
s @root@(ptlkien,"last5")=last5
"RTN","SAMIHOM4",289,0)
n mymatch s mymatch=$g(SAMIARG("MATCHLOG"))
"RTN","SAMIHOM4",290,0)
i mymatch'="" s @root@(ptlkien,"MATCHLOG")=mymatch
"RTN","SAMIHOM4",291,0)
q
"RTN","SAMIHOM4",292,0)
;
"RTN","SAMIHOM4",293,0)
UPDTFRMS(dfn) ; update demographics in all patient forms for patient dfn
"RTN","SAMIHOM4",294,0)
;
"RTN","SAMIHOM4",295,0)
n lroot s lroot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",296,0)
n proot s proot=$$setroot^%wd("vapals-patients")
"RTN","SAMIHOM4",297,0)
n lien s lien=$o(@lroot@("dfn",dfn,""))
"RTN","SAMIHOM4",298,0)
q:lien=""
"RTN","SAMIHOM4",299,0)
n pien s pien=$o(@proot@("dfn",dfn,""))
"RTN","SAMIHOM4",300,0)
q:pien=""
"RTN","SAMIHOM4",301,0)
; this patient has forms
"RTN","SAMIHOM4",302,0)
m @proot@(pien)=@lroot@(lien) ; refresh the demos in the patient record
"RTN","SAMIHOM4",303,0)
n ssn s ssn=$g(@proot@(pien,"ssn"))
"RTN","SAMIHOM4",304,0)
s @proot@(pien,"sissn")=$e(ssn,1,3)_"-"_$e(ssn,4,5)_"-"_$e(ssn,6,9)
"RTN","SAMIHOM4",305,0)
n sid s sid=$g(@proot@("sisid")) ; studyid
"RTN","SAMIHOM4",306,0)
q:sid="" ; no studyid
"RTN","SAMIHOM4",307,0)
n zi s zi=""
"RTN","SAMIHOM4",308,0)
f s zi=$o(@proot@("graph",sid,zi)) q:zi="" d ; for each form
"RTN","SAMIHOM4",309,0)
. m @proot@("graph",sid,zi)=@proot@(pien) ; stamp each form with new demos
"RTN","SAMIHOM4",310,0)
q
"RTN","SAMIHOM4",311,0)
;
"RTN","SAMIHOM4",312,0)
MERGE(SAMIRESULT,SAMIARGS) ; merge participant records
"RTN","SAMIHOM4",313,0)
; called from pressing the merge button on the unmatched report
"RTN","SAMIHOM4",314,0)
n toien s toien=$g(SAMIARGS("toien"))
"RTN","SAMIHOM4",315,0)
i toien="" d q ;
"RTN","SAMIHOM4",316,0)
. d WSUNMAT(.SAMIRESULT,.SAMIARGS)
"RTN","SAMIHOM4",317,0)
n lroot s lroot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",318,0)
n fromien s fromien=$g(@lroot@(toien,"MATCHLOG"))
"RTN","SAMIHOM4",319,0)
i fromien="" d q ;
"RTN","SAMIHOM4",320,0)
. d WSUNMAT(.SAMIRESULT,.SAMIARGS)
"RTN","SAMIHOM4",321,0)
;
"RTN","SAMIHOM4",322,0)
; test for remotedfn in from record - not valid if absent
"RTN","SAMIHOM4",323,0)
;
"RTN","SAMIHOM4",324,0)
i $g(@lroot@(fromien,"remotedfn"))="" d q ;
"RTN","SAMIHOM4",325,0)
. d WSUNMAT(.SAMIRESULT,.SAMIARGS)
"RTN","SAMIHOM4",326,0)
;
"RTN","SAMIHOM4",327,0)
; remove index entries for from and to records
"RTN","SAMIHOM4",328,0)
;
"RTN","SAMIHOM4",329,0)
d UNINDXPT(fromien) ; delete index entries
"RTN","SAMIHOM4",330,0)
d UNINDXPT(toien)
"RTN","SAMIHOM4",331,0)
;
"RTN","SAMIHOM4",332,0)
; create changelog entry in to record - contains from record
"RTN","SAMIHOM4",333,0)
;
"RTN","SAMIHOM4",334,0)
m @lroot@(toien,"changelog",$$FMTE^XLFDT($$NOW^XLFDT,5))=@lroot@(fromien)
"RTN","SAMIHOM4",335,0)
;
"RTN","SAMIHOM4",336,0)
; change the dfn in the from record to the to record dfn for merging
"RTN","SAMIHOM4",337,0)
;
"RTN","SAMIHOM4",338,0)
s @lroot@(fromien,"dfn")=@lroot@(toien,"dfn")
"RTN","SAMIHOM4",339,0)
n dfn s dfn=@lroot@(toien,"dfn") ; for use in updating forms
"RTN","SAMIHOM4",340,0)
;
"RTN","SAMIHOM4",341,0)
; merge the from record to the to record
"RTN","SAMIHOM4",342,0)
;
"RTN","SAMIHOM4",343,0)
m @lroot@(toien)=@lroot@(fromien)
"RTN","SAMIHOM4",344,0)
;
"RTN","SAMIHOM4",345,0)
; delete the from record
"RTN","SAMIHOM4",346,0)
;
"RTN","SAMIHOM4",347,0)
k @lroot@(fromien)
"RTN","SAMIHOM4",348,0)
;
"RTN","SAMIHOM4",349,0)
; reindex the to record
"RTN","SAMIHOM4",350,0)
;
"RTN","SAMIHOM4",351,0)
d INDXPTLK(toien)
"RTN","SAMIHOM4",352,0)
;
"RTN","SAMIHOM4",353,0)
; propagate the updated from record to every form
"RTN","SAMIHOM4",354,0)
;
"RTN","SAMIHOM4",355,0)
d UPDTFRMS(dfn) ; updates the patient in the vapals-patient graph
"RTN","SAMIHOM4",356,0)
;
"RTN","SAMIHOM4",357,0)
; leave and return to the unmatched report
"RTN","SAMIHOM4",358,0)
; note that the form and to records will no longer be in the report
"RTN","SAMIHOM4",359,0)
;
"RTN","SAMIHOM4",360,0)
d WSUNMAT(.SAMIRESULT,.SAMIARGS)
"RTN","SAMIHOM4",361,0)
;
"RTN","SAMIHOM4",362,0)
q
"RTN","SAMIHOM4",363,0)
;
"RTN","SAMIHOM4",364,0)
ADDUNMAT ; adds the unmatched report web service to the system
"RTN","SAMIHOM4",365,0)
;
"RTN","SAMIHOM4",366,0)
d addService^%webutils("GET","unmatched","WSUNMAT^SAMIHOM4")
"RTN","SAMIHOM4",367,0)
q
"RTN","SAMIHOM4",368,0)
;
"RTN","SAMIHOM4",369,0)
DELUNMAT ; deletes the unmatched web service
"RTN","SAMIHOM4",370,0)
;
"RTN","SAMIHOM4",371,0)
d deleteService^%webutils("GET","unmatched")
"RTN","SAMIHOM4",372,0)
q
"RTN","SAMIHOM4",373,0)
;
"RTN","SAMIHOM4",374,0)
WSUNMAT(SAMIRESULT,SAMIARGS) ; navigates to unmatched report
"RTN","SAMIHOM4",375,0)
;
"RTN","SAMIHOM4",376,0)
n filter,bdy
"RTN","SAMIHOM4",377,0)
s bdy=""
"RTN","SAMIHOM4",378,0)
s filter("samiroute")="report"
"RTN","SAMIHOM4",379,0)
s filter("samireporttype")="unmatched"
"RTN","SAMIHOM4",380,0)
d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report
"RTN","SAMIHOM4",381,0)
q
"RTN","SAMIHOM4",382,0)
;
"RTN","SAMIHOM4",383,0)
DUPSSN(ssn) ; extrinsic returns true if duplicate ssn
"RTN","SAMIHOM4",384,0)
n proot s proot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",385,0)
i $d(@proot@("ssn",ssn)) q 1
"RTN","SAMIHOM4",386,0)
q 0
"RTN","SAMIHOM4",387,0)
;
"RTN","SAMIHOM4",388,0)
DUPICN(icn) ; extrinsic returns true if duplicate icn
"RTN","SAMIHOM4",389,0)
n proot s proot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",390,0)
n tmpicn s tmpicn=$p(icn,"V",1)
"RTN","SAMIHOM4",391,0)
i $d(@proot@("icn",icn)) q 1
"RTN","SAMIHOM4",392,0)
i $d(@proot@("icn",tmpicn)) q 1
"RTN","SAMIHOM4",393,0)
q 0
"RTN","SAMIHOM4",394,0)
;
"RTN","SAMIHOM4",395,0)
BADICN(icn) ; extrinsic returns true if ICN checkdigits are wrong
"RTN","SAMIHOM4",396,0)
n zchk s zchk=$p(icn,"V",2)
"RTN","SAMIHOM4",397,0)
n zicn s zicn=$p(icn,"V",1)
"RTN","SAMIHOM4",398,0)
q:zchk="" 1
"RTN","SAMIHOM4",399,0)
i zchk'=$$CHECKDG^MPIFSPC(zicn) q 1
"RTN","SAMIHOM4",400,0)
q 0
"RTN","SAMIHOM4",401,0)
;
"RTN","SAMIHOM4",402,0)
SAVE(SAMIRESULT,SAMIARG) ; save patient-lookup record after edit
"RTN","SAMIHOM4",403,0)
;
"RTN","SAMIHOM4",404,0)
n dfn s dfn=$g(vars("dfn")) ; must have a dfn
"RTN","SAMIHOM4",405,0)
i dfn="" d q ;
"RTN","SAMIHOM4",406,0)
. d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home
"RTN","SAMIHOM4",407,0)
n root s root=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",408,0)
n sien s sien=$o(@root@("dfn",dfn,""))
"RTN","SAMIHOM4",409,0)
i sien="" d q ;
"RTN","SAMIHOM4",410,0)
. d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home
"RTN","SAMIHOM4",411,0)
d UNINDXPT(sien) ; remove old index entries
"RTN","SAMIHOM4",412,0)
n zm
"RTN","SAMIHOM4",413,0)
k SAMIARG("MATCHLOG")
"RTN","SAMIHOM4",414,0)
s zm=$$REMATCH(sien,.SAMIARG)
"RTN","SAMIHOM4",415,0)
i zm>0 d ;
"RTN","SAMIHOM4",416,0)
. s SAMIARG("MATCHLOG")=zm
"RTN","SAMIHOM4",417,0)
d MKPTLK(sien,.SAMIARG) ; add the updated fields
"RTN","SAMIHOM4",418,0)
d INDXPTLK(sien) ; create new index entries
"RTN","SAMIHOM4",419,0)
d UPDTFRMS(dfn) ; update demographic info in all forms
"RTN","SAMIHOM4",420,0)
n filter,bdy
"RTN","SAMIHOM4",421,0)
s bdy=""
"RTN","SAMIHOM4",422,0)
s filter("samiroute")="report"
"RTN","SAMIHOM4",423,0)
s filter("samireporttype")="unmatched"
"RTN","SAMIHOM4",424,0)
d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report
"RTN","SAMIHOM4",425,0)
q
"RTN","SAMIHOM4",426,0)
;
"RTN","SAMIHOM4",427,0)
REMATCH(sien,SAMIARG) ; extrinsic returns a possible match ien
"RTN","SAMIHOM4",428,0)
; else zero
"RTN","SAMIHOM4",429,0)
n lroot s lroot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",430,0)
n ssn,name,icn,x,y
"RTN","SAMIHOM4",431,0)
s ssn=$g(SAMIARG("ssn"))
"RTN","SAMIHOM4",432,0)
i ssn["-" s ssn=$tr(ssn,"-")
"RTN","SAMIHOM4",433,0)
s name=$g(SAMIARG("saminame"))
"RTN","SAMIHOM4",434,0)
i name="" s name=$g(SAMIARG("name"))
"RTN","SAMIHOM4",435,0)
s icn=$g(SAMIARG("icn"))
"RTN","SAMIHOM4",436,0)
s x=0
"RTN","SAMIHOM4",437,0)
i ssn'="" s x=$o(@lroot@("ssn",ssn,""))
"RTN","SAMIHOM4",438,0)
i x=sien s x=$o(@lroot@("ssn",ssn,x))
"RTN","SAMIHOM4",439,0)
i +x'=0 d ;
"RTN","SAMIHOM4",440,0)
. s y=$g(@lroot@(x,"dfn"))
"RTN","SAMIHOM4",441,0)
. i y>9000000 s x=0
"RTN","SAMIHOM4",442,0)
i x>0 q x
"RTN","SAMIHOM4",443,0)
i name'="" s x=$o(@lroot@("name",name,""))
"RTN","SAMIHOM4",444,0)
i x=sien s x=$o(@lroot@("name",name,x))
"RTN","SAMIHOM4",445,0)
i +x'=0 d ;
"RTN","SAMIHOM4",446,0)
. s y=$g(@lroot@(x,"dfn"))
"RTN","SAMIHOM4",447,0)
. i y>9000000 s x=0
"RTN","SAMIHOM4",448,0)
i x>0 q x
"RTN","SAMIHOM4",449,0)
;i icn'="" s x=$o(@lroot@("icn",icn,""))
"RTN","SAMIHOM4",450,0)
;i x=sien s x=$o(@lroot@("icn",icn,x))
"RTN","SAMIHOM4",451,0)
;i +x'=0 d ;
"RTN","SAMIHOM4",452,0)
;. s y=$g(@lroot@(x,"dfn"))
"RTN","SAMIHOM4",453,0)
;. i y>9000000 s x=0
"RTN","SAMIHOM4",454,0)
;i x>0 q x
"RTN","SAMIHOM4",455,0)
q 0
"RTN","SAMIHOM4",456,0)
;
"RTN","SAMIHOM4",457,0)
SETINFO(vars,msg) ; set the information message text
"RTN","SAMIHOM4",458,0)
; vars are the screen variables passed by reference
"RTN","SAMIHOM4",459,0)
s vars("infoMessage")=msg
"RTN","SAMIHOM4",460,0)
q
"RTN","SAMIHOM4",461,0)
;
"RTN","SAMIHOM4",462,0)
SETWARN(vars,msg) ; set warning message text
"RTN","SAMIHOM4",463,0)
; vars are the screen variables passed by reference
"RTN","SAMIHOM4",464,0)
s vars("warnMessage")=msg
"RTN","SAMIHOM4",465,0)
q
"RTN","SAMIHOM4",466,0)
;
"RTN","SAMIHOM4",467,0)
RTNERR(rtn,form,vals,msg,fld) ; redisplays a page with an error message
"RTN","SAMIHOM4",468,0)
; rtn is the return array
"RTN","SAMIHOM4",469,0)
; form is the form the page requires
"RTN","SAMIHOM4",470,0)
; vals are the values for the page. passed by reference
"RTN","SAMIHOM4",471,0)
; msg is the error message to be displayed
"RTN","SAMIHOM4",472,0)
; fld is the name of the field where the cursor should be put
"RTN","SAMIHOM4",473,0)
;
"RTN","SAMIHOM4",474,0)
n zhtml ; work area for the tempate
"RTN","SAMIHOM4",475,0)
d SAMIHTM^%wf(.zhtml,form,.err)
"RTN","SAMIHOM4",476,0)
d MERGEHTM^%wf(.zhtml,.vals,.err)
"RTN","SAMIHOM4",477,0)
m SAMIRESULT=zhtml
"RTN","SAMIHOM4",478,0)
set HTTPRSP("mime")="text/html" ; set mime type
"RTN","SAMIHOM4",479,0)
q
"RTN","SAMIHOM4",480,0)
;
"RTN","SAMIHOM4",481,0)
RTNPAGE(rtn,form,vals) ; displays a page
"RTN","SAMIHOM4",482,0)
; rtn is the return array
"RTN","SAMIHOM4",483,0)
; form is the form the page requires
"RTN","SAMIHOM4",484,0)
; vals are the values for the page. passed by reference
"RTN","SAMIHOM4",485,0)
;
"RTN","SAMIHOM4",486,0)
n err
"RTN","SAMIHOM4",487,0)
n zhtml ; work area for the tempate
"RTN","SAMIHOM4",488,0)
d SAMIHTM^%wf(.zhtml,form,.err)
"RTN","SAMIHOM4",489,0)
d MERGEHTM^%wf(.zhtml,.vals,.err)
"RTN","SAMIHOM4",490,0)
m SAMIRESULT=zhtml
"RTN","SAMIHOM4",491,0)
set HTTPRSP("mime")="text/html" ; set mime type
"RTN","SAMIHOM4",492,0)
q
"RTN","SAMIHOM4",493,0)
;
"RTN","SAMIHOM4",494,0)
REINDXPL ; reindex patient lookup
"RTN","SAMIHOM4",495,0)
n root s root=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",496,0)
n zi s zi=0
"RTN","SAMIHOM4",497,0)
k @root@("ssn")
"RTN","SAMIHOM4",498,0)
k @root@("name")
"RTN","SAMIHOM4",499,0)
k @root@("last5")
"RTN","SAMIHOM4",500,0)
k @root@("sinamef")
"RTN","SAMIHOM4",501,0)
k @root@("sinamel")
"RTN","SAMIHOM4",502,0)
k @root@("icn")
"RTN","SAMIHOM4",503,0)
f s zi=$o(@root@(zi)) q:+zi=0 d ;
"RTN","SAMIHOM4",504,0)
. d INDXPTLK(zi)
"RTN","SAMIHOM4",505,0)
q
"RTN","SAMIHOM4",506,0)
;
"RTN","SAMIHOM4",507,0)
INDXPTLK(ien) ; generate index entries in patient-lookup graph
"RTN","SAMIHOM4",508,0)
; for entry ien
"RTN","SAMIHOM4",509,0)
n proot set proot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",510,0)
n name s name=$g(@proot@(ien,"saminame"))
"RTN","SAMIHOM4",511,0)
s @proot@("name",name,ien)=""
"RTN","SAMIHOM4",512,0)
n ucname s ucname=$$UCASE(name)
"RTN","SAMIHOM4",513,0)
s @proot@("name",ucname,ien)=""
"RTN","SAMIHOM4",514,0)
n x
"RTN","SAMIHOM4",515,0)
s x=$g(@proot@(ien,"dfn")) ;w !,x
"RTN","SAMIHOM4",516,0)
s:x'="" @proot@("dfn",x,ien)=""
"RTN","SAMIHOM4",517,0)
s x=$g(@proot@(ien,"last5")) ;w !,x
"RTN","SAMIHOM4",518,0)
s:x'="" @proot@("last5",x,ien)=""
"RTN","SAMIHOM4",519,0)
s x=$g(@proot@(ien,"icn")) ;w !,x
"RTN","SAMIHOM4",520,0)
i x'["V" d ;
"RTN","SAMIHOM4",521,0)
. i x="" q
"RTN","SAMIHOM4",522,0)
. n chk s chk=$$CHECKDG^MPIFSPC(x)
"RTN","SAMIHOM4",523,0)
. s @proot@(ien,"icn")=x_"V"_chk
"RTN","SAMIHOM4",524,0)
. s x=x_"V"_chk
"RTN","SAMIHOM4",525,0)
s:x'="" @proot@("icn",x,ien)=""
"RTN","SAMIHOM4",526,0)
s x=$g(@proot@(ien,"ssn")) ;w !,x
"RTN","SAMIHOM4",527,0)
s:x'="" @proot@("ssn",x,ien)=""
"RTN","SAMIHOM4",528,0)
s x=$g(@proot@(ien,"sinamef")) ;w !,x
"RTN","SAMIHOM4",529,0)
s:x'="" @proot@("sinamef",x,ien)=""
"RTN","SAMIHOM4",530,0)
s x=$g(@proot@(ien,"sinamel")) w !,x
"RTN","SAMIHOM4",531,0)
s:x'="" @proot@("sinamel",x,ien)=""
"RTN","SAMIHOM4",532,0)
set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog)
"RTN","SAMIHOM4",533,0)
q
"RTN","SAMIHOM4",534,0)
;
"RTN","SAMIHOM4",535,0)
UNINDXPT(ien) ; remove index entries in patient-lookup graph
"RTN","SAMIHOM4",536,0)
; for entry ien
"RTN","SAMIHOM4",537,0)
n proot set proot=$$setroot^%wd("patient-lookup")
"RTN","SAMIHOM4",538,0)
n name s name=$g(@proot@(ien,"saminame"))
"RTN","SAMIHOM4",539,0)
k @proot@("name",name,ien)
"RTN","SAMIHOM4",540,0)
n ucname s ucname=$$UCASE(name)
"RTN","SAMIHOM4",541,0)
k @proot@("name",ucname,ien)
"RTN","SAMIHOM4",542,0)
n x
"RTN","SAMIHOM4",543,0)
s x=$g(@proot@(ien,"dfn")) ;w !,x
"RTN","SAMIHOM4",544,0)
k:x'="" @proot@("dfn",x,ien)
"RTN","SAMIHOM4",545,0)
s x=$g(@proot@(ien,"last5")) ;w !,x
"RTN","SAMIHOM4",546,0)
k:x'="" @proot@("last5",x,ien)
"RTN","SAMIHOM4",547,0)
s x=$g(@proot@(ien,"icn")) ;w !,x
"RTN","SAMIHOM4",548,0)
i x'["V" d ;
"RTN","SAMIHOM4",549,0)
. i x="" q
"RTN","SAMIHOM4",550,0)
. n chk s chk=$$CHECKDG^MPIFSPC(x)
"RTN","SAMIHOM4",551,0)
. s @proot@(ien,"icn")=x_"V"_chk
"RTN","SAMIHOM4",552,0)
. s x=x_"V"_chk
"RTN","SAMIHOM4",553,0)
k:x'="" @proot@("icn",x,ien)
"RTN","SAMIHOM4",554,0)
s x=$g(@proot@(ien,"ssn")) ;w !,x
"RTN","SAMIHOM4",555,0)
k:x'="" @proot@("ssn",x,ien)
"RTN","SAMIHOM4",556,0)
s x=$g(@proot@(ien,"sinamef")) ;w !,x
"RTN","SAMIHOM4",557,0)
k:x'="" @proot@("sinamef",x,ien)
"RTN","SAMIHOM4",558,0)
s x=$g(@proot@(ien,"sinamel")) w !,x
"RTN","SAMIHOM4",559,0)
k:x'="" @proot@("sinamel",x,ien)
"RTN","SAMIHOM4",560,0)
set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog)
"RTN","SAMIHOM4",561,0)
q
"RTN","SAMIHOM4",562,0)
;
"RTN","SAMIHOM4",563,0)
UCASE(STR) ; extrinsic returns uppercase of STR
"RTN","SAMIHOM4",564,0)
N X,Y
"RTN","SAMIHOM4",565,0)
S X=STR
"RTN","SAMIHOM4",566,0)
X ^%ZOSF("UPPERCASE")
"RTN","SAMIHOM4",567,0)
q Y
"RTN","SAMIHOM4",568,0)
;
"RTN","SAMIHOM4",569,0)
DEVHOME ; temporary home page for development
"RTN","SAMIHOM4",570,0)
; DEVHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) goto DEVHOME^SAMIHOM4
"RTN","SAMIHOM4",571,0)
;
"RTN","SAMIHOM4",572,0)
;@stanza 1 invocation, binding, & branching
"RTN","SAMIHOM4",573,0)
;
"RTN","SAMIHOM4",574,0)
;ven/gpl;private;procedure;
"RTN","SAMIHOM4",575,0)
;@called-by
"RTN","SAMIHOM4",576,0)
; WSHOME
"RTN","SAMIHOM4",577,0)
;@calls
"RTN","SAMIHOM4",578,0)
; htmltb2^%yottaweb
"RTN","SAMIHOM4",579,0)
; PATLIST
"RTN","SAMIHOM4",580,0)
; genhtml^%yottautl
"RTN","SAMIHOM4",581,0)
; addary^%yottautl
"RTN","SAMIHOM4",582,0)
;@input
"RTN","SAMIHOM4",583,0)
; SAMIFILTER =
"RTN","SAMIHOM4",584,0)
;@output
"RTN","SAMIHOM4",585,0)
;.SAMIRTN =
"RTN","SAMIHOM4",586,0)
;@examples [tbd]
"RTN","SAMIHOM4",587,0)
;@tests [tbd]
"RTN","SAMIHOM4",588,0)
;
"RTN","SAMIHOM4",589,0)
;@stanza 2 ?
"RTN","SAMIHOM4",590,0)
;
"RTN","SAMIHOM4",591,0)
new gtop,gbot
"RTN","SAMIHOM4",592,0)
do htmltb2^%yottaweb(.gtop,.gbot,"SAMI Test Patients")
"RTN","SAMIHOM4",593,0)
;
"RTN","SAMIHOM4",594,0)
new html,ary,hpat
"RTN","SAMIHOM4",595,0)
do PATLIST^SAMIHOM3("hpat")
"RTN","SAMIHOM4",596,0)
quit:'$data(hpat)
"RTN","SAMIHOM4",597,0)
;
"RTN","SAMIHOM4",598,0)
set ary("title")="SAMI Test Patients on this system"
"RTN","SAMIHOM4",599,0)
set ary("header",1)="StudyId"
"RTN","SAMIHOM4",600,0)
set ary("header",2)="Name"
"RTN","SAMIHOM4",601,0)
;
"RTN","SAMIHOM4",602,0)
new cnt set cnt=0
"RTN","SAMIHOM4",603,0)
new zi set zi=""
"RTN","SAMIHOM4",604,0)
for set zi=$order(hpat(zi)) quit:zi="" do ;
"RTN","SAMIHOM4",605,0)
. set cnt=cnt+1
"RTN","SAMIHOM4",606,0)
. new url set url="<a href=""/cform.cgi?studyId="_zi_""">"_zi_"</a>"
"RTN","SAMIHOM4",607,0)
. set ary(cnt,1)=url
"RTN","SAMIHOM4",608,0)
. set ary(cnt,2)=""
"RTN","SAMIHOM4",609,0)
. quit
"RTN","SAMIHOM4",610,0)
;
"RTN","SAMIHOM4",611,0)
do genhtml^%yottautl("html","ary")
"RTN","SAMIHOM4",612,0)
;
"RTN","SAMIHOM4",613,0)
do addary^%yottautl("SAMIRTN","gtop")
"RTN","SAMIHOM4",614,0)
do addary^%yottautl("SAMIRTN","html")
"RTN","SAMIHOM4",615,0)
set SAMIRTN($order(SAMIRTN(""),-1)+1)=gbot
"RTN","SAMIHOM4",616,0)
kill SAMIRTN(0)
"RTN","SAMIHOM4",617,0)
;
"RTN","SAMIHOM4",618,0)
set HTTPRSP("mime")="text/html"
"RTN","SAMIHOM4",619,0)
;
"RTN","SAMIHOM4",620,0)
;@stanza ? termination
"RTN","SAMIHOM4",621,0)
;
"RTN","SAMIHOM4",622,0)
quit ; end of DEVHOME
"RTN","SAMIHOM4",623,0)
;
"RTN","SAMIHOM4",624,0)
;
"RTN","SAMIHOM4",625,0)
GETHOME ; homepage accessed using GET
"RTN","SAMIHOM4",626,0)
; GETHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) goto GETHOME^SAMIHOM4
"RTN","SAMIHOM4",627,0)
;
"RTN","SAMIHOM4",628,0)
;@stanza 1 invocation, binding, & branching
"RTN","SAMIHOM4",629,0)
;
"RTN","SAMIHOM4",630,0)
;ven/gpl;private;procedure;
"RTN","SAMIHOM4",631,0)
;@called-by
"RTN","SAMIHOM4",632,0)
; WSHOME
"RTN","SAMIHOM4",633,0)
; WSNEWCAS
"RTN","SAMIHOM4",634,0)
; WSNFPOST^SAMICASE
"RTN","SAMIHOM4",635,0)
; wsLookup^SAMISRCH
"RTN","SAMIHOM4",636,0)
;@calls
"RTN","SAMIHOM4",637,0)
; GETTMPL^SAMICASE
"RTN","SAMIHOM4",638,0)
; findReplace^%ts
"RTN","SAMIHOM4",639,0)
; $$SCANFOR
"RTN","SAMIHOM4",640,0)
; ADDCRLF^VPRJRUT
"RTN","SAMIHOM4",641,0)
;@input
"RTN","SAMIHOM4",642,0)
; SAMIFILTER =
"RTN","SAMIHOM4",643,0)
;@output
"RTN","SAMIHOM4",644,0)
;.SAMIRTN =
"RTN","SAMIHOM4",645,0)
;@examples [tbd]
"RTN","SAMIHOM4",646,0)
;@tests [tbd]
"RTN","SAMIHOM4",647,0)
;
"RTN","SAMIHOM4",648,0)
;@stanza 2 get template for homepage
"RTN","SAMIHOM4",649,0)
;
"RTN","SAMIHOM4",650,0)
new temp,tout
"RTN","SAMIHOM4",651,0)
do GETTMPL^SAMICASE("temp","vapals:home")
"RTN","SAMIHOM4",652,0)
quit:'$data(temp)
"RTN","SAMIHOM4",653,0)
;
"RTN","SAMIHOM4",654,0)
;@stanza 3 process homepage template
"RTN","SAMIHOM4",655,0)
;
"RTN","SAMIHOM4",656,0)
new cnt set cnt=0
"RTN","SAMIHOM4",657,0)
new zi set zi=0
"RTN","SAMIHOM4",658,0)
for set zi=$order(temp(zi)) quit:+zi=0 do ;
"RTN","SAMIHOM4",659,0)
. ;
"RTN","SAMIHOM4",660,0)
. n ln s ln=temp(zi)
"RTN","SAMIHOM4",661,0)
. n touched s touched=0
"RTN","SAMIHOM4",662,0)
. ;
"RTN","SAMIHOM4",663,0)
. i ln["href" i 'touched d ;
"RTN","SAMIHOM4",664,0)
. . d FIXHREF^SAMIFORM(.ln)
"RTN","SAMIHOM4",665,0)
. . s temp(zi)=ln
"RTN","SAMIHOM4",666,0)
. ;
"RTN","SAMIHOM4",667,0)
. i ln["src" d ;
"RTN","SAMIHOM4",668,0)
. . d FIXSRC^SAMIFORM(.ln)
"RTN","SAMIHOM4",669,0)
. . s temp(zi)=ln
"RTN","SAMIHOM4",670,0)
. ;
"RTN","SAMIHOM4",671,0)
. i ln["id" i ln["studyIdMenu" d ;
"RTN","SAMIHOM4",672,0)
. . s zi=zi+4
"RTN","SAMIHOM4",673,0)
. ;
"RTN","SAMIHOM4",674,0)
. if ln["@@MANUALREGISTRATION@@" do ; turn off manual registration
"RTN","SAMIHOM4",675,0)
. . n setman,setparm
"RTN","SAMIHOM4",676,0)
. . s setman="true"
"RTN","SAMIHOM4",677,0)
. . s setparm=$$GET^XPAR("SYS","SAMI ALLOW MANUAL ENTRY",,"Q")
"RTN","SAMIHOM4",678,0)
. . i setparm=0 s setman="false"
"RTN","SAMIHOM4",679,0)
. . do findReplace^%ts(.ln,"@@MANUALREGISTRATION@@",setman)
"RTN","SAMIHOM4",680,0)
. . s temp(zi)=ln
"RTN","SAMIHOM4",681,0)
. . quit
"RTN","SAMIHOM4",682,0)
. set cnt=cnt+1
"RTN","SAMIHOM4",683,0)
. set tout(cnt)=temp(zi)
"RTN","SAMIHOM4",684,0)
. quit
"RTN","SAMIHOM4",685,0)
;
"RTN","SAMIHOM4",686,0)
;@stanza 4 add cr/lf & save to return array
"RTN","SAMIHOM4",687,0)
;
"RTN","SAMIHOM4",688,0)
do ADDCRLF^VPRJRUT(.tout)
"RTN","SAMIHOM4",689,0)
merge SAMIRTN=tout
"RTN","SAMIHOM4",690,0)
;
"RTN","SAMIHOM4",691,0)
;@stanza 5 termination
"RTN","SAMIHOM4",692,0)
;
"RTN","SAMIHOM4",693,0)
quit ; end of GETHOME
"RTN","SAMIHOM4",694,0)
;
"RTN","SAMIHOM4",695,0)
;
"RTN","SAMIHOM4",696,0)
WSNEWCAS ; receives post from home & creates new case
"RTN","SAMIHOM4",697,0)
; WSNEWCAS^SAMIHOM3(SAMIARGS,SAMIBODY,SAMIRESULT) goto WSNEWCAS^SAMIHOM4
"RTN","SAMIHOM4",698,0)
;
"RTN","SAMIHOM4",699,0)
;@stanza 1 invocation, binding, & branching
"RTN","SAMIHOM4",700,0)
;
"RTN","SAMIHOM4",701,0)
;ven/gpl;private;procedure;
"RTN","SAMIHOM4",702,0)
;@called-by
"RTN","SAMIHOM4",703,0)
;@calls
"RTN","SAMIHOM4",704,0)
; parseBody^%wf
"RTN","SAMIHOM4",705,0)
; $$setroot^%wd
"RTN","SAMIHOM4",706,0)
; $$NEXTNUM
"RTN","SAMIHOM4",707,0)
; $$GENSTDID^SAMIHOM3
"RTN","SAMIHOM4",708,0)
; $$NOW^XLFDT
"RTN","SAMIHOM4",709,0)
; $$KEYDATE^SAMIHOM3
"RTN","SAMIHOM4",710,0)
; $$VALDTNM
"RTN","SAMIHOM4",711,0)
; GETHOME
"RTN","SAMIHOM4",712,0)
; PREFILL
"RTN","SAMIHOM4",713,0)
; MKSBFORM
"RTN","SAMIHOM4",714,0)
; MKSIFORM^SAMIHOM3
"RTN","SAMIHOM4",715,0)
; WSCASE^SAMICASE
"RTN","SAMIHOM4",716,0)
;@input
"RTN","SAMIHOM4",717,0)
;.ARGS =
"RTN","SAMIHOM4",718,0)
; BODY =
"RTN","SAMIHOM4",719,0)
;.RESULT =
"RTN","SAMIHOM4",720,0)
;@output: ?
"RTN","SAMIHOM4",721,0)
;@examples [tbd]
"RTN","SAMIHOM4",722,0)
;@tests [tbd]
"RTN","SAMIHOM4",723,0)
;
"RTN","SAMIHOM4",724,0)
;@stanza 2 ?
"RTN","SAMIHOM4",725,0)
;
"RTN","SAMIHOM4",726,0)
merge ^SAMIUL("newCase","ARGS")=SAMIARGS
"RTN","SAMIHOM4",727,0)
merge ^SAMIUL("newCase","BODY")=SAMIBODY
"RTN","SAMIHOM4",728,0)
;
"RTN","SAMIHOM4",729,0)
new vars,bdy
"RTN","SAMIHOM4",730,0)
set SAMIBDY=$get(SAMIBODY(1))
"RTN","SAMIHOM4",731,0)
do parseBody^%wf("vars",.SAMIBDY)
"RTN","SAMIHOM4",732,0)
merge ^SAMIUL("newCase","vars")=vars
"RTN","SAMIHOM4",733,0)
;
"RTN","SAMIHOM4",734,0)
new root set root=$$setroot^%wd("vapals-patients")
"RTN","SAMIHOM4",735,0)
;
"RTN","SAMIHOM4",736,0)
new saminame set saminame=$get(vars("name"))
"RTN","SAMIHOM4",737,0)
if saminame="" s saminame=$get(vars("saminame"))
"RTN","SAMIHOM4",738,0)
;if $$VALDTNM(saminame,.ARGS)=-1 do quit ;
"RTN","SAMIHOM4",739,0)
;. new r1
"RTN","SAMIHOM4",740,0)
;. do GETHOME(.r1,.ARGS) ; home page to redisplay
"RTN","SAMIHOM4",741,0)
;. merge RESULT=r1
"RTN","SAMIHOM4",742,0)
;. quit
"RTN","SAMIHOM4",743,0)
;
"RTN","SAMIHOM4",744,0)
new dfn s dfn=$get(vars("dfn"))
"RTN","SAMIHOM4",745,0)
;if dfn="" do quit ;
"RTN","SAMIHOM4",746,0)
;. new r1
"RTN","SAMIHOM4",747,0)
;. do GETHOME(.r1,.ARGS) ; home page to redisplay
"RTN","SAMIHOM4",748,0)
;. merge RESULT=r1
"RTN","SAMIHOM4",749,0)
;. quit
"RTN","SAMIHOM4",750,0)
;
"RTN","SAMIHOM4",751,0)
;new gien set gien=$$NEXTNUM
"RTN","SAMIHOM4",752,0)
new gien set gien=dfn
"RTN","SAMIHOM4",753,0)
;
"RTN","SAMIHOM4",754,0)
m ^SAMIUL("newCase","G1")=root
"RTN","SAMIHOM4",755,0)
; create dfn index
"RTN","SAMIHOM4",756,0)
set @root@("dfn",dfn,gien)=""
"RTN","SAMIHOM4",757,0)
;
"RTN","SAMIHOM4",758,0)
set @root@(gien,"saminum")=gien
"RTN","SAMIHOM4",759,0)
set @root@(gien,"saminame")=saminame
"RTN","SAMIHOM4",760,0)
;
"RTN","SAMIHOM4",761,0)
new studyid set studyid=$$GENSTDID^SAMIHOM3(gien)
"RTN","SAMIHOM4",762,0)
set @root@(gien,"samistudyid")=studyid
"RTN","SAMIHOM4",763,0)
set @root@("sid",studyid,gien)=""
"RTN","SAMIHOM4",764,0)
;
"RTN","SAMIHOM4",765,0)
new datekey set datekey=$$KEYDATE^SAMIHOM3($$NOW^XLFDT)
"RTN","SAMIHOM4",766,0)
set @root@(gien,"samicreatedate")=datekey
"RTN","SAMIHOM4",767,0)
;
"RTN","SAMIHOM4",768,0)
merge ^SAMIUL("newCase",gien)=@root@(gien)
"RTN","SAMIHOM4",769,0)
;
"RTN","SAMIHOM4",770,0)
;
"RTN","SAMIHOM4",771,0)
do PREFILL^SAMIHOM3(dfn) ; prefills from the "patient-lookup" graph
"RTN","SAMIHOM4",772,0)
;
"RTN","SAMIHOM4",773,0)
n siformkey
"RTN","SAMIHOM4",774,0)
;do makeSbform(gien) ; create a background form for new patient
"RTN","SAMIHOM4",775,0)
set siformkey=$$MKSIFORM^SAMIHOM3(gien) ; create an intake for for new patient
"RTN","SAMIHOM4",776,0)
;
"RTN","SAMIHOM4",777,0)
set SAMIARGS("studyid")=studyid
"RTN","SAMIHOM4",778,0)
set SAMIARGS("form")="vapals:"_siformkey
"RTN","SAMIHOM4",779,0)
do wsGetForm^%wf(.SAMIRESULT,.SAMIARGS)
"RTN","SAMIHOM4",780,0)
;do WSCASE^SAMICASE(.SAMIRESULT,.SAMIARGS) ; navigate to the case review page
"RTN","SAMIHOM4",781,0)
;
"RTN","SAMIHOM4",782,0)
;@stanza ? termination
"RTN","SAMIHOM4",783,0)
;
"RTN","SAMIHOM4",784,0)
quit ; end of WSNEWCAS
"RTN","SAMIHOM4",785,0)
;
"RTN","SAMIHOM4",786,0)
;
"RTN","SAMIHOM4",787,0)
EOR ; End of routine SAMIHOM4
"RTN","SAMINOT3")
0^1^B48541042
"RTN","SAMINOT3",1,0)
SAMINOT3 ;ven/gpl - CTeval report plain text ; 5/7/19 4:48pm
"RTN","SAMINOT3",2,0)
;;18.0;SAMI;;;Build 2
"RTN","SAMINOT3",3,0)
;
"RTN","SAMINOT3",4,0)
;@license: see routine SAMIUL
"RTN","SAMINOT3",5,0)
;
"RTN","SAMINOT3",6,0)
quit ; no entry from top
"RTN","SAMINOT3",7,0)
;
"RTN","SAMINOT3",8,0)
WSNOTE(return,filter) ; web service which returns a text note
"RTN","SAMINOT3",9,0)
;
"RTN","SAMINOT3",10,0)
n debug s debug=0
"RTN","SAMINOT3",11,0)
i $g(filter("debug"))=1 s debug=1
"RTN","SAMINOT3",12,0)
;
"RTN","SAMINOT3",13,0)
k return
"RTN","SAMINOT3",14,0)
s HTTPRSP("mime")="text/html"
"RTN","SAMINOT3",15,0)
;
"RTN","SAMINOT3",16,0)
n si
"RTN","SAMINOT3",17,0)
s si=$g(filter("studyid"))
"RTN","SAMINOT3",18,0)
i si="" d ;
"RTN","SAMINOT3",19,0)
. s si="XXX00333"
"RTN","SAMINOT3",20,0)
q:si=""
"RTN","SAMINOT3",21,0)
;
"RTN","SAMINOT3",22,0)
n samikey
"RTN","SAMINOT3",23,0)
s samikey=$g(filter("form"))
"RTN","SAMINOT3",24,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",25,0)
;
"RTN","SAMINOT3",26,0)
n vals
"RTN","SAMINOT3",27,0)
m vals=@root@("graph",si,samikey)
"RTN","SAMINOT3",28,0)
;
"RTN","SAMINOT3",29,0)
n notebase
"RTN","SAMINOT3",30,0)
d WSREPORT^SAMICTT0(.notebase,.filter)
"RTN","SAMINOT3",31,0)
s note="notebase"
"RTN","SAMINOT3",32,0)
i '$d(@note) q
"RTN","SAMINOT3",33,0)
;
"RTN","SAMINOT3",34,0)
new temp,tout
"RTN","SAMINOT3",35,0)
do GETTMPL^SAMICASE("temp","vapals:note")
"RTN","SAMINOT3",36,0)
quit:'$data(temp)
"RTN","SAMINOT3",37,0)
;
"RTN","SAMINOT3",38,0)
n cnt s cnt=0
"RTN","SAMINOT3",39,0)
n zi s zi=""
"RTN","SAMINOT3",40,0)
;
"RTN","SAMINOT3",41,0)
f s zi=$o(temp(zi)) q:zi="" d ;
"RTN","SAMINOT3",42,0)
. ;
"RTN","SAMINOT3",43,0)
. n line s line=temp(zi)
"RTN","SAMINOT3",44,0)
. D LOAD^SAMIFORM(.line,samikey,si,.filter,.vals)
"RTN","SAMINOT3",45,0)
. s temp(zi)=line
"RTN","SAMINOT3",46,0)
. ;
"RTN","SAMINOT3",47,0)
. s cnt=cnt+1
"RTN","SAMINOT3",48,0)
. s tout(cnt)=temp(zi)
"RTN","SAMINOT3",49,0)
. ;
"RTN","SAMINOT3",50,0)
. i temp(zi)["report-text" d ;
"RTN","SAMINOT3",51,0)
. . i temp(zi)["#" q ;
"RTN","SAMINOT3",52,0)
. . n zj s zj=""
"RTN","SAMINOT3",53,0)
. . f s zj=$o(@note@(zj)) q:zj="" d ;
"RTN","SAMINOT3",54,0)
. . . s cnt=cnt+1
"RTN","SAMINOT3",55,0)
. . . ;s tout(cnt)=@note@(zj)_"<br>"
"RTN","SAMINOT3",56,0)
. . . s tout(cnt)=@note@(zj)_$char(13,10)
"RTN","SAMINOT3",57,0)
m return=tout
"RTN","SAMINOT3",58,0)
q
"RTN","SAMINOT3",59,0)
;
"RTN","SAMINOT3",60,0)
NOTE(filter) ; extrnisic which creates a note
"RTN","SAMINOT3",61,0)
; returns 1 if successful, 0 if not
"RTN","SAMINOT3",62,0)
;
"RTN","SAMINOT3",63,0)
;
"RTN","SAMINOT3",64,0)
k ^gpl("funote")
"RTN","SAMINOT3",65,0)
m ^gpl("funote")=filter
"RTN","SAMINOT3",66,0)
;q 0 ; while we are developing
"RTN","SAMINOT3",67,0)
;
"RTN","SAMINOT3",68,0)
; set up patient values
"RTN","SAMINOT3",69,0)
;
"RTN","SAMINOT3",70,0)
n vals
"RTN","SAMINOT3",71,0)
;
"RTN","SAMINOT3",72,0)
n si
"RTN","SAMINOT3",73,0)
s si=$g(filter("studyid"))
"RTN","SAMINOT3",74,0)
q:si="" 0
"RTN","SAMINOT3",75,0)
;
"RTN","SAMINOT3",76,0)
n samikey
"RTN","SAMINOT3",77,0)
s samikey=$g(filter("form"))
"RTN","SAMINOT3",78,0)
q:samikey="" 0
"RTN","SAMINOT3",79,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",80,0)
;
"RTN","SAMINOT3",81,0)
s vals=$na(@root@("graph",si,samikey))
"RTN","SAMINOT3",82,0)
;
"RTN","SAMINOT3",83,0)
i '$d(@vals) d q 0 ;
"RTN","SAMINOT3",84,0)
. ;w !,"error, patient values not found"
"RTN","SAMINOT3",85,0)
;zwr @vals@(*)
"RTN","SAMINOT3",86,0)
;
"RTN","SAMINOT3",87,0)
k ^SAMIUL("NOTE")
"RTN","SAMINOT3",88,0)
m ^SAMIUL("NOTE","vals")=@vals
"RTN","SAMINOT3",89,0)
m ^SAMIUL("NOTE","filter")=filter
"RTN","SAMINOT3",90,0)
;
"RTN","SAMINOT3",91,0)
n didnote s didnote=0
"RTN","SAMINOT3",92,0)
;
"RTN","SAMINOT3",93,0)
i $d(@vals@("notes")) d q didnote ;
"RTN","SAMINOT3",94,0)
. s filter("errorMessage")="Note already exists for this form."
"RTN","SAMINOT3",95,0)
;
"RTN","SAMINOT3",96,0)
i $g(@vals@("futype"))="other" d ;
"RTN","SAMINOT3",97,0)
. i $g(@vals@("samistatus"))'="complete" q ;
"RTN","SAMINOT3",98,0)
. ;q:$$HASVCNT(vals)
"RTN","SAMINOT3",99,0)
. d MKVC(si,samikey,vals,.filter) ;
"RTN","SAMINOT3",100,0)
. s didnote=1
"RTN","SAMINOT3",101,0)
;
"RTN","SAMINOT3",102,0)
i $g(@vals@("futype"))="ct" d ;
"RTN","SAMINOT3",103,0)
. i $g(@vals@("samistatus"))'="complete" q ;
"RTN","SAMINOT3",104,0)
. ;q:$$HASLCSNT(vals)
"RTN","SAMINOT3",105,0)
. d MKLCS(si,samikey,vals,.filter) ;
"RTN","SAMINOT3",106,0)
. s didnote=1
"RTN","SAMINOT3",107,0)
;
"RTN","SAMINOT3",108,0)
;i $g(@vals@("samistatus"))="complete" d ;
"RTN","SAMINOT3",109,0)
;. q:$$HASVCNT(vals)
"RTN","SAMINOT3",110,0)
;. d MKVC(si,samikey,vals,.filter) ;
"RTN","SAMINOT3",111,0)
;. s didnote=1
"RTN","SAMINOT3",112,0)
;
"RTN","SAMINOT3",113,0)
q didnote
"RTN","SAMINOT3",114,0)
;
"RTN","SAMINOT3",115,0)
HASINNT(vals) ; extrinsic returns 1 if intake note is present
"RTN","SAMINOT3",116,0)
; else returns 0
"RTN","SAMINOT3",117,0)
n zzi,zzrtn s (zzi,zzrtn)=0
"RTN","SAMINOT3",118,0)
q:'$d(@vals)
"RTN","SAMINOT3",119,0)
f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ;
"RTN","SAMINOT3",120,0)
. i $g(@vals@("notes",zzi,"name"))["Intake" s zzrtn=1
"RTN","SAMINOT3",121,0)
q zzrtn
"RTN","SAMINOT3",122,0)
;
"RTN","SAMINOT3",123,0)
HASVCNT(vals) ; extrinsic returns 1 if communication note is present
"RTN","SAMINOT3",124,0)
; else returns 0
"RTN","SAMINOT3",125,0)
n zzi,zzrtn s (zzi,zzrtn)=0
"RTN","SAMINOT3",126,0)
q:'$d(@vals)
"RTN","SAMINOT3",127,0)
f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ;
"RTN","SAMINOT3",128,0)
. i $g(@vals@("notes",zzi,"name"))["Communication" s zzrtn=1
"RTN","SAMINOT3",129,0)
q zzrtn
"RTN","SAMINOT3",130,0)
;
"RTN","SAMINOT3",131,0)
HASLCSNT(vals) ; extrinsic returns 1 if communication note is present
"RTN","SAMINOT3",132,0)
; else returns 0
"RTN","SAMINOT3",133,0)
n zzi,zzrtn s (zzi,zzrtn)=0
"RTN","SAMINOT3",134,0)
q:'$d(@vals)
"RTN","SAMINOT3",135,0)
f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ;
"RTN","SAMINOT3",136,0)
. i $g(@vals@("notes",zzi,"name"))["Lung" s zzrtn=1
"RTN","SAMINOT3",137,0)
q zzrtn
"RTN","SAMINOT3",138,0)
;
"RTN","SAMINOT3",139,0)
MKVC(sid,form,vals,filter) ;
"RTN","SAMINOT3",140,0)
n cnt s cnt=0
"RTN","SAMINOT3",141,0)
;n dest s dest=$na(@vals@("communication-note"))
"RTN","SAMINOT3",142,0)
n dest s dest=$$MKNT(vals,"Communication Note","communication",.filter)
"RTN","SAMINOT3",143,0)
k @dest
"RTN","SAMINOT3",144,0)
d OUT("Veteran Communication Note")
"RTN","SAMINOT3",145,0)
d OUT("")
"RTN","SAMINOT3",146,0)
d VCNOTE(vals,dest,cnt)
"RTN","SAMINOT3",147,0)
q
"RTN","SAMINOT3",148,0)
;
"RTN","SAMINOT3",149,0)
MKLCS(sid,form,vals,filter) ;
"RTN","SAMINOT3",150,0)
n cnt s cnt=0
"RTN","SAMINOT3",151,0)
;n dest s dest=$na(@vals@("lcs-note"))
"RTN","SAMINOT3",152,0)
n dest s dest=$$MKNT(vals,"Lung Cancer Screening Note","lcs",.filter)
"RTN","SAMINOT3",153,0)
k @dest
"RTN","SAMINOT3",154,0)
d OUT("Lung Screening and Surveillance Follow up Note")
"RTN","SAMINOT3",155,0)
d OUT("")
"RTN","SAMINOT3",156,0)
d LCSNOTE(vals,dest,cnt)
"RTN","SAMINOT3",157,0)
q
"RTN","SAMINOT3",158,0)
;
"RTN","SAMINOT3",159,0)
MKNT(vals,title,ntype,filter) ; extrinsic makes a note date=now returns
"RTN","SAMINOT3",160,0)
; global addr. filter must be passed by reference
"RTN","SAMINOT3",161,0)
n ntdt s ntdt=$$NTDTTM($$NOW^XLFDT)
"RTN","SAMINOT3",162,0)
n ntptr
"RTN","SAMINOT3",163,0)
s ntptr=$$MKNTLOC(vals,title,ntdt,$g(ntype),.filter)
"RTN","SAMINOT3",164,0)
q ntptr
"RTN","SAMINOT3",165,0)
;
"RTN","SAMINOT3",166,0)
MKNTLOC(vals,title,ndate,ntype,filter) ; extrinsic returns the
"RTN","SAMINOT3",167,0)
;location for the note
"RTN","SAMINOT3",168,0)
n nien
"RTN","SAMINOT3",169,0)
s nien=$o(@vals@("notes",""),-1)+1
"RTN","SAMINOT3",170,0)
s filter("nien")=nien
"RTN","SAMINOT3",171,0)
n nloc s nloc=$na(@vals@("notes",nien))
"RTN","SAMINOT3",172,0)
s @nloc@("name")=title_" "_$g(ndate)
"RTN","SAMINOT3",173,0)
s @nloc@("date")=$g(ndate)
"RTN","SAMINOT3",174,0)
s @nloc@("type")=$g(ntype)
"RTN","SAMINOT3",175,0)
q $na(@nloc@("text"))
"RTN","SAMINOT3",176,0)
;
"RTN","SAMINOT3",177,0)
NTDTTM(ZFMDT) ; extrinsic returns the date and time in Note format
"RTN","SAMINOT3",178,0)
; ZFMDT is the fileman date/time to translate
"RTN","SAMINOT3",179,0)
q $$FMTE^XLFDT(ZFMDT,"5")
"RTN","SAMINOT3",180,0)
;
"RTN","SAMINOT3",181,0)
NTLOCN(sid,form,nien) ; extrinsic returns the location of the Nth note
"RTN","SAMINOT3",182,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",183,0)
q $na(@root@("graph",sid,form,"notes",nien))
"RTN","SAMINOT3",184,0)
;
"RTN","SAMINOT3",185,0)
NTLAST(sid,form,ntype) ; extrinsic returns the location of the latest note
"RTN","SAMINOT3",186,0)
; of the type ntype
"RTN","SAMINOT3",187,0)
q
"RTN","SAMINOT3",188,0)
;
"RTN","SAMINOT3",189,0)
NTLIST(nlist,sid,form) ; returns the note list in nlist, passed by ref
"RTN","SAMINOT3",190,0)
;
"RTN","SAMINOT3",191,0)
n zn,root,gn
"RTN","SAMINOT3",192,0)
s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",193,0)
s zn=0
"RTN","SAMINOT3",194,0)
s gn=$na(@root@("graph",sid,form,"notes"))
"RTN","SAMINOT3",195,0)
q:'$d(@gn)
"RTN","SAMINOT3",196,0)
f s zn=$o(@gn@(zn)) q:+zn=0 d ;
"RTN","SAMINOT3",197,0)
. s @nlist@(zn,"name")=@gn@(zn,"name")
"RTN","SAMINOT3",198,0)
. s @nlist@(zn,"nien")=zn
"RTN","SAMINOT3",199,0)
;
"RTN","SAMINOT3",200,0)
q
"RTN","SAMINOT3",201,0)
;
"RTN","SAMINOT3",202,0)
TLST ;
"RTN","SAMINOT3",203,0)
S SID="XXX00677"
"RTN","SAMINOT3",204,0)
S FORM="siform-2019-04-23"
"RTN","SAMINOT3",205,0)
D NTLIST("G",SID,FORM)
"RTN","SAMINOT3",206,0)
;ZWR G
"RTN","SAMINOT3",207,0)
Q
"RTN","SAMINOT3",208,0)
;
"RTN","SAMINOT3",209,0)
VCNOTE(vals,dest,cnt) ; Veteran Communication Note
"RTN","SAMINOT3",210,0)
;d OUT("")
"RTN","SAMINOT3",211,0)
d OUT("Veteran was contacted via:")
"RTN","SAMINOT3",212,0)
n sp1 s sp1=" "
"RTN","SAMINOT3",213,0)
d:$$XVAL("fucmotip",vals) OUT(sp1_"In person")
"RTN","SAMINOT3",214,0)
d:$$XVAL("fucmotte",vals) OUT(sp1_"Telephone")
"RTN","SAMINOT3",215,0)
d:$$XVAL("fucmotth",vals) OUT(sp1_"TeleHealth")
"RTN","SAMINOT3",216,0)
d:$$XVAL("fucmotml",vals) OUT(sp1_"Mailed Letter")
"RTN","SAMINOT3",217,0)
d:$$XVAL("fucmotpp",vals) OUT(sp1_"Message in patient portal")
"RTN","SAMINOT3",218,0)
d:$$XVAL("fucmotvd",vals) OUT(sp1_"Video-on-demand (VOD)")
"RTN","SAMINOT3",219,0)
d:$$XVAL("fucmotot",vals) OUT(sp1_"Other: "_$$XVAL("fucmotoo",vals))
"RTN","SAMINOT3",220,0)
d OUT("")
"RTN","SAMINOT3",221,0)
;
"RTN","SAMINOT3",222,0)
d:$$XVAL("fucmotde",vals)'=""
"RTN","SAMINOT3",223,0)
. d OUT("Communication details:")
"RTN","SAMINOT3",224,0)
. d OUT(sp1_$$XVAL("fucmotde",vals))
"RTN","SAMINOT3",225,0)
;
"RTN","SAMINOT3",226,0)
d SSTATUS(vals) ; insert smoking status section
"RTN","SAMINOT3",227,0)
q
"RTN","SAMINOT3",228,0)
;
"RTN","SAMINOT3",229,0)
SSTATUS(vals)
"RTN","SAMINOT3",230,0)
n sstat s sstat=""
"RTN","SAMINOT3",231,0)
i $$XVAL("sisa",vals)="y" d ;
"RTN","SAMINOT3",232,0)
. s sstat="Current"
"RTN","SAMINOT3",233,0)
. d OUT("Smoking status: "_sstat)
"RTN","SAMINOT3",234,0)
. d OUT(sp1_"Current cigarette smoker (patient advised that active tobacco use")
"RTN","SAMINOT3",235,0)
. d OUT(sp1_"increases risk of future lung cancer, heart disease and stroke,")
"RTN","SAMINOT3",236,0)
. d OUT(sp1_"advised stability now does not guarantee will not develop future")
"RTN","SAMINOT3",237,0)
. d OUT(sp1_"lung cancer or risks of premature death from tobacco related heart")
"RTN","SAMINOT3",238,0)
. d OUT(sp1_"disease and stroke)")
"RTN","SAMINOT3",239,0)
i $$XVAL("sisa",vals)="n" d ;
"RTN","SAMINOT3",240,0)
. s sstat="Former"
"RTN","SAMINOT3",241,0)
. d OUT("Smoking status: "_sstat)
"RTN","SAMINOT3",242,0)
. n qdate s qdate=""
"RTN","SAMINOT3",243,0)
. s qdate=$$XVAL("siq",vals)
"RTN","SAMINOT3",244,0)
. i qdate'="" d OUT(sp1_"Former cigarette smoker. Quit date: "_qdate)
"RTN","SAMINOT3",245,0)
. e d OUT(sp1_"Former cigarette smoker.")
"RTN","SAMINOT3",246,0)
i $$XVAL("sisa",vals)="o" d ;
"RTN","SAMINOT3",247,0)
. s sstat="Never"
"RTN","SAMINOT3",248,0)
. d OUT("Smoking status: "_sstat)
"RTN","SAMINOT3",249,0)
. d OUT(sp1_"Never cigarette smoker")
"RTN","SAMINOT3",250,0)
;
"RTN","SAMINOT3",251,0)
n cumary
"RTN","SAMINOT3",252,0)
d CUMPY^SAMIUR2("cumary",sid,form)
"RTN","SAMINOT3",253,0)
k ^gpl("funote","cumary")
"RTN","SAMINOT3",254,0)
m ^gpl("funote","cumary")=cumary
"RTN","SAMINOT3",255,0)
n cur s cur=$g(cumary("current"))
"RTN","SAMINOT3",256,0)
n newcum s newcum=$g(cumary("rpt",cur,4)) ; new cumulative pack years
"RTN","SAMINOT3",257,0)
;
"RTN","SAMINOT3",258,0)
i $$XVAL("sisa",vals)="y" d ;
"RTN","SAMINOT3",259,0)
. d OUT("Smoking history (since last visit):")
"RTN","SAMINOT3",260,0)
. d OUT(sp1_"Cigarettes/day: "_$$XVAL("sicpd",vals))
"RTN","SAMINOT3",261,0)
. d OUT(sp1_"PPD: "_$$XVAL("sippd",vals))
"RTN","SAMINOT3",262,0)
. d OUT(sp1_"Current cumulative pack years: "_newcum)
"RTN","SAMINOT3",263,0)
i $$XVAL("sisa",vals)'="y" d ;
"RTN","SAMINOT3",264,0)
. d OUT("Smoking History")
"RTN","SAMINOT3",265,0)
n zi
"RTN","SAMINOT3",266,0)
f zi=1:1:cur d ;
"RTN","SAMINOT3",267,0)
. d OUT(sp1_cumary("rpt",zi,1)_" "_cumary("rpt",zi,2))
"RTN","SAMINOT3",268,0)
. d OUT(sp1_sp1_"Pack Years: "_cumary("rpt",zi,3))
"RTN","SAMINOT3",269,0)
. d OUT(sp1_sp1_"Cumulative: "_cumary("rpt",zi,4))
"RTN","SAMINOT3",270,0)
;
"RTN","SAMINOT3",271,0)
n tried s tried=$$XVAL("sittq",vals)
"RTN","SAMINOT3",272,0)
n ptried s ptried=$s(tried="y":"Yes",tried="n":"No",tried="o":"Not applicable",1:"")
"RTN","SAMINOT3",273,0)
i ptried'="" d OUT("Since your prior CT scan have you ever tried to quit smoking? "_ptried)
"RTN","SAMINOT3",274,0)
;
"RTN","SAMINOT3",275,0)
n tryary,cnt
"RTN","SAMINOT3",276,0)
s cnt=0
"RTN","SAMINOT3",277,0)
i $$XVAL("sisca",vals)'="" s cnt=cnt+1 s tryary(cnt)="Have not tried to quit"
"RTN","SAMINOT3",278,0)
i $$XVAL("siscb",vals)'="" s cnt=cnt+1 s tryary(cnt)="""Cold Turkey"" by completely stopping on your own with no other assistance"
"RTN","SAMINOT3",279,0)
i $$XVAL("siscc",vals)'="" s cnt=cnt+1 s tryary(cnt)="Tapering or reducing number of cigarettes smoked per day"
"RTN","SAMINOT3",280,0)
i $$XVAL("siscd",vals)'="" s cnt=cnt+1 s tryary(cnt)="Self-help material (e.g., brochure, cessation website)"
"RTN","SAMINOT3",281,0)
i $$XVAL("sisce",vals)'="" s cnt=cnt+1 s tryary(cnt)="Individual consultation or cessation counseling"
"RTN","SAMINOT3",282,0)
i $$XVAL("siscf",vals)'="" s cnt=cnt+1 s tryary(cnt)="Telephone cessation counseling hotline (e.g., 1-855-QUIT-VET, 1-800-QUIT-NOW)"
"RTN","SAMINOT3",283,0)
i $$XVAL("siscg",vals)'="" s cnt=cnt+1 s tryary(cnt)="Peer support (e.g., Nicotine Anonymous)"
"RTN","SAMINOT3",284,0)
i $$XVAL("sisch",vals)'="" s cnt=cnt+1 s tryary(cnt)="Nicotine replacement therapy (e.g., patch, gum, inhaler, nasal spray, lozenge)"
"RTN","SAMINOT3",285,0)
i $$XVAL("sisci",vals)'="" s cnt=cnt+1 s tryary(cnt)="Zyban"
"RTN","SAMINOT3",286,0)
i $$XVAL("siscj",vals)'="" s cnt=cnt+1 s tryary(cnt)="Hypnosis"
"RTN","SAMINOT3",287,0)
i $$XVAL("sisck",vals)'="" s cnt=cnt+1 s tryary(cnt)="Acupuncture / acupressure"
"RTN","SAMINOT3",288,0)
n tryot s tryot=""
"RTN","SAMINOT3",289,0)
i $$XVAL("siscl",vals)'="" d ;
"RTN","SAMINOT3",290,0)
. s cnt=cnt+1 s tryary(cnt)="Other (specify)"
"RTN","SAMINOT3",291,0)
. s tryot=$$XVAL("siscos",vals)
"RTN","SAMINOT3",292,0)
;
"RTN","SAMINOT3",293,0)
i cnt>0 d ;
"RTN","SAMINOT3",294,0)
. i ptried="" d OUT("Since your prior CT scan have you ever tried to quit smoking? ")
"RTN","SAMINOT3",295,0)
. n zi s zi=""
"RTN","SAMINOT3",296,0)
. f s zi=$o(tryary(zi)) q:zi="" d ;
"RTN","SAMINOT3",297,0)
. . d OUT(sp1_tryary(zi))
"RTN","SAMINOT3",298,0)
. i tryot'="" d OUT(sp1_sp1_tryot)
"RTN","SAMINOT3",299,0)
;
"RTN","SAMINOT3",300,0)
n cess,cess2 s cess="" s cess2=""
"RTN","SAMINOT3",301,0)
i $$XVAL("siscmd",vals)="d" s cess="Declined"
"RTN","SAMINOT3",302,0)
i $$XVAL("siscmd",vals)="a" s cess="Advised to quit smoking; VA resources provided"
"RTN","SAMINOT3",303,0)
i $$XVAL("siscmd",vals)="i" d ;
"RTN","SAMINOT3",304,0)
. s cess="Interested in VA tobacco cessation medication. Encouraged Veteran"
"RTN","SAMINOT3",305,0)
. s cess2="to talk to provider or pharmacist about which medication option is best for you."
"RTN","SAMINOT3",306,0)
i cess'="" d ;
"RTN","SAMINOT3",307,0)
. d OUT("Tobacco cessation provided:")
"RTN","SAMINOT3",308,0)
. d OUT(sp1_cess)
"RTN","SAMINOT3",309,0)
. i cess2'="" d OUT(sp1_cess2)
"RTN","SAMINOT3",310,0)
q
"RTN","SAMINOT3",311,0)
;
"RTN","SAMINOT3",312,0)
LCSNOTE(vals,dest,cnt) ; Lung Screening Note
"RTN","SAMINOT3",313,0)
;d OUT("")
"RTN","SAMINOT3",314,0)
n sp1 s sp1=" "
"RTN","SAMINOT3",315,0)
d OUT("Initial LDCT/Baseline: "_$$XVAL("sidoe",vals))
"RTN","SAMINOT3",316,0)
d OUT("Date of most recent CT/LDCT: "_$$XVAL("fulctdt",vals))
"RTN","SAMINOT3",317,0)
d OUT(sp1_"Notification of Results: "_$$XVAL("sidof",vals))
"RTN","SAMINOT3",318,0)
n addcmt s addcmt=$$XVAL("fucmctde",vals)
"RTN","SAMINOT3",319,0)
i addcmt'="" d ;
"RTN","SAMINOT3",320,0)
. d OUT("Additional comments:")
"RTN","SAMINOT3",321,0)
. d OUT(sp1_addcmt)
"RTN","SAMINOT3",322,0)
n impress s impress=""
"RTN","SAMINOT3",323,0)
n ctary
"RTN","SAMINOT3",324,0)
d CTINFO("ctary",sid,form)
"RTN","SAMINOT3",325,0)
s impress=$g(ctary("impression"))
"RTN","SAMINOT3",326,0)
; get impression from lastest CT Eval here
"RTN","SAMINOT3",327,0)
d IMPRESS("ctary",sid)
"RTN","SAMINOT3",328,0)
;i impress'="" d ;
"RTN","SAMINOT3",329,0)
;. d OUT("Impression:")
"RTN","SAMINOT3",330,0)
;. d OUT(sp1_impress)
"RTN","SAMINOT3",331,0)
; smoking status follows
"RTN","SAMINOT3",332,0)
d SSTATUS(vals)
"RTN","SAMINOT3",333,0)
;d OUT("Veteran was contacted via:")
"RTN","SAMINOT3",334,0)
;n sp1 s sp1=" "
"RTN","SAMINOT3",335,0)
;d:$$XVAL("fucmctip",vals) OUT(sp1_"In person")
"RTN","SAMINOT3",336,0)
;d:$$XVAL("fucmctte",vals) OUT(sp1_"Telephone")
"RTN","SAMINOT3",337,0)
;d:$$XVAL("fucmctth",vals) OUT(sp1_"TeleHealth")
"RTN","SAMINOT3",338,0)
;d:$$XVAL("fucmctml",vals) OUT(sp1_"Mailed Letter")
"RTN","SAMINOT3",339,0)
;d:$$XVAL("fucmctpp",vals) OUT(sp1_"Message in patient portal")
"RTN","SAMINOT3",340,0)
;d:$$XVAL("fucmctvd",vals) OUT(sp1_"Video-on-demand (VOD)")
"RTN","SAMINOT3",341,0)
;d:$$XVAL("fucmctot",vals) OUT(sp1_"Other: "_$$XVAL("fucmctoo",vals))
"RTN","SAMINOT3",342,0)
;d OUT("")
"RTN","SAMINOT3",343,0)
;
"RTN","SAMINOT3",344,0)
;d:$$XVAL("fucmctde",vals)'=""
"RTN","SAMINOT3",345,0)
;. d OUT("Communication details:")
"RTN","SAMINOT3",346,0)
;. d OUT(sp1_$$XVAL("fucmctde",vals))
"RTN","SAMINOT3",347,0)
n recom s recom=""
"RTN","SAMINOT3",348,0)
; get recommendations from CT eval form here
"RTN","SAMINOT3",349,0)
s recom=$g(ctary("followup"))
"RTN","SAMINOT3",350,0)
i recom'="" d ;
"RTN","SAMINOT3",351,0)
. d OUT("Recommendations:")
"RTN","SAMINOT3",352,0)
. d OUT(sp1_recom)
"RTN","SAMINOT3",353,0)
. i $g(ctary("followup2"))'="" d ;
"RTN","SAMINOT3",354,0)
. . d OUT(sp1_ctary("followup2"))
"RTN","SAMINOT3",355,0)
. i $g(ctary("followup3"))'="" d ;
"RTN","SAMINOT3",356,0)
. . d OUT(sp1_ctary("followup3"))
"RTN","SAMINOT3",357,0)
n ordered s ordered=$$XVAL("funewct",vals)
"RTN","SAMINOT3",358,0)
i ordered'="" d ;
"RTN","SAMINOT3",359,0)
. s ordered=$s(ordered="y":"Yes",ordered="n":"No",1:"")
"RTN","SAMINOT3",360,0)
. d OUT("CT/LDCT ordered: "_ordered)
"RTN","SAMINOT3",361,0)
n pulmon s pulmon=$$XVAL("fucompul",vals)
"RTN","SAMINOT3",362,0)
i pulmon'="" d ;
"RTN","SAMINOT3",363,0)
. s pulmon=$s(pulmon="y":"Yes",pulmon="n":"No",1:"")
"RTN","SAMINOT3",364,0)
. d OUT("Communicated to Pulmonary: "_pulmon)
"RTN","SAMINOT3",365,0)
q
"RTN","SAMINOT3",366,0)
;
"RTN","SAMINOT3",367,0)
OUT(ln) ;
"RTN","SAMINOT3",368,0)
s cnt=cnt+1
"RTN","SAMINOT3",369,0)
n lnn
"RTN","SAMINOT3",370,0)
;s debug=1
"RTN","SAMINOT3",371,0)
s lnn=$o(@dest@(" "),-1)+1
"RTN","SAMINOT3",372,0)
s @dest@(lnn)=ln
"RTN","SAMINOT3",373,0)
;i $g(debug)=1 d ;
"RTN","SAMINOT3",374,0)
;. i ln["<" q ; no markup
"RTN","SAMINOT3",375,0)
;. n zs s zs=$STACK
"RTN","SAMINOT3",376,0)
;. n zp s zp=$STACK(zs-2,"PLACE")
"RTN","SAMINOT3",377,0)
;. s @dest@(lnn)=zp_":"_ln
"RTN","SAMINOT3",378,0)
q
"RTN","SAMINOT3",379,0)
;
"RTN","SAMINOT3",380,0)
XVAL(var,vals) ; extrinsic returns the patient value for var
"RTN","SAMINOT3",381,0)
; vals is passed by name
"RTN","SAMINOT3",382,0)
n zr
"RTN","SAMINOT3",383,0)
s zr=$g(@vals@(var))
"RTN","SAMINOT3",384,0)
;i zr="" s zr="["_var_"]"
"RTN","SAMINOT3",385,0)
q zr
"RTN","SAMINOT3",386,0)
;
"RTN","SAMINOT3",387,0)
PREVCT(SID,FORM) ; extrinic returns the form key to the CT Eval form
"RTN","SAMINOT3",388,0)
; previous to FORM. If FORM is null, the latest CT Eval form key is returned
"RTN","SAMINOT3",389,0)
; FORM sensitivity is tbd.. always returns latest CTEval
"RTN","SAMINOT3",390,0)
n gn s gn=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",391,0)
n prev s prev=$o(@gn@("graph",SID,"ceform-30"),-1)
"RTN","SAMINOT3",392,0)
q prev
"RTN","SAMINOT3",393,0)
;
"RTN","SAMINOT3",394,0)
CTINFO(ARY,SID,FORM) ; returns extracts from latest CT Eval form
"RTN","SAMINOT3",395,0)
; ARY passed by name
"RTN","SAMINOT3",396,0)
;
"RTN","SAMINOT3",397,0)
n ctkey s ctkey=$$PREVCT(SID,$G(FORM))
"RTN","SAMINOT3",398,0)
q:ctkey=""
"RTN","SAMINOT3",399,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",400,0)
n ctroot s ctroot=$na(@root@("graph",SID,ctkey))
"RTN","SAMINOT3",401,0)
;
"RTN","SAMINOT3",402,0)
s @ARY@("ctform")=ctkey
"RTN","SAMINOT3",403,0)
s @ARY@("impression")=$g(@ctroot@("ceimre"))
"RTN","SAMINOT3",404,0)
n futext
"RTN","SAMINOT3",405,0)
s futext=$g(@ctroot@("cefuw"))
"RTN","SAMINOT3",406,0)
n futbl
"RTN","SAMINOT3",407,0)
s futbl("1y")="Annual repeat"
"RTN","SAMINOT3",408,0)
s futbl("nw")="Now"
"RTN","SAMINOT3",409,0)
s futbl("1m")="1 month"
"RTN","SAMINOT3",410,0)
s futbl("3m")="3 months"
"RTN","SAMINOT3",411,0)
s futbl("6m")="6 months"
"RTN","SAMINOT3",412,0)
s futbl("os")="other"
"RTN","SAMINOT3",413,0)
i futext'="" s futext=$g(futbl(futext))
"RTN","SAMINOT3",414,0)
n fudate s fudate=$g(@ctroot@("cefud"))
"RTN","SAMINOT3",415,0)
; #Other followup
"RTN","SAMINOT3",416,0)
n zfu,ofu,tofu,comma
"RTN","SAMINOT3",417,0)
n vals s vals=ctroot
"RTN","SAMINOT3",418,0)
s comma=0,tofu=""
"RTN","SAMINOT3",419,0)
s ofu=""
"RTN","SAMINOT3",420,0)
f zfu="cefuaf","cefucc","cefupe","cefufn","cefubr","cefupc","cefutb" d ;
"RTN","SAMINOT3",421,0)
. i $$XVAL(zfu,vals)="y" s ofu=ofu_zfu
"RTN","SAMINOT3",422,0)
i $$XVAL("cefuo",vals)'="" s ofu=ofu_"cefuo"
"RTN","SAMINOT3",423,0)
i ofu'="" d ;
"RTN","SAMINOT3",424,0)
. s tofu="Other followup: "
"RTN","SAMINOT3",425,0)
. i ofu["cefuaf" s tofu=tofu_"Antibiotics" s comma=1
"RTN","SAMINOT3",426,0)
. i ofu["cefucc" s tofu=tofu_$s(comma:", ",1:"")_"Diagnostic CT" s comma=1
"RTN","SAMINOT3",427,0)
. i ofu["cefupe" s tofu=tofu_$s(comma:", ",1:"")_"PET" s comma=1
"RTN","SAMINOT3",428,0)
. i ofu["cefufn" s tofu=tofu_$s(comma:", ",1:"")_"Percutaneous biopsy" s comma=1
"RTN","SAMINOT3",429,0)
. i ofu["cefubr" s tofu=tofu_$s(comma:", ",1:"")_"Bronchoscopy" s comma=1
"RTN","SAMINOT3",430,0)
. i ofu["cefupc" s tofu=tofu_$s(comma:", ",1:"")_"Pulmonary consultation" s comma=1
"RTN","SAMINOT3",431,0)
. i ofu["cefutb" s tofu=tofu_$s(comma:", ",1:"")_"Refer to tumor board" s comma=1
"RTN","SAMINOT3",432,0)
. i ofu["cefuo" s tofu=tofu_$s(comma:", ",1:"")_"Other:" s comma=1
"RTN","SAMINOT3",433,0)
s @ARY@("followup")=futext_" "_fudate
"RTN","SAMINOT3",434,0)
s @ARY@("followup2")=tofu
"RTN","SAMINOT3",435,0)
s @ARY@("followup3")=$$XVAL("cefuoo",vals)
"RTN","SAMINOT3",436,0)
;
"RTN","SAMINOT3",437,0)
q
"RTN","SAMINOT3",438,0)
;
"RTN","SAMINOT3",439,0)
IMPRESS(ARY,SID) ; impressions from CTEval report
"RTN","SAMINOT3",440,0)
n root s root=$$setroot^%wd("vapals-patients")
"RTN","SAMINOT3",441,0)
n ctkey s ctkey=$g(@ARY@("ctform"))
"RTN","SAMINOT3",442,0)
n vals s vals=$na(@root@("graph",SID,ctkey))
"RTN","SAMINOT3",443,0)
n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMINOT3",444,0)
s dict=$na(@dict@("cteval-dict"))
"RTN","SAMINOT3",445,0)
n para s para=""
"RTN","SAMINOT3",446,0)
n sp1 s sp1=" "
"RTN","SAMINOT3",447,0)
;
"RTN","SAMINOT3",448,0)
d OUT("Impression:")
"RTN","SAMINOT3",449,0)
d OUT(sp1_$$XSUB("ceimn",vals,dict)_para)
"RTN","SAMINOT3",450,0)
;
"RTN","SAMINOT3",451,0)
;# Report CAC Score and Extent of Emphysema
"RTN","SAMINOT3",452,0)
s cacval=0
"RTN","SAMINOT3",453,0)
d ;if $$XVAL("ceccv",vals)'="e" d ;
"RTN","SAMINOT3",454,0)
. set vcac=$$XVAL("cecccac",vals)
"RTN","SAMINOT3",455,0)
. if vcac'="" d ;
"RTN","SAMINOT3",456,0)
. . s cacrec=""
"RTN","SAMINOT3",457,0)
. . s cac="The Visual Coronary Artery Calcium (CAC) Score is "_vcac_". "
"RTN","SAMINOT3",458,0)
. . s cacval=vcac
"RTN","SAMINOT3",459,0)
. . i cacval>3 s cacrec=$g(@dict@("CAC_recommendation"))_para
"RTN","SAMINOT3",460,0)
;
"RTN","SAMINOT3",461,0)
i cacval>0 d ;
"RTN","SAMINOT3",462,0)
. d OUT(sp1_cac_" "_cacrec_" "_para)
"RTN","SAMINOT3",463,0)
. d ;if $$XVAL("ceemv",vals)="e" d ;
"RTN","SAMINOT3",464,0)
. . if $$XVAL("ceem",vals)'="no" d ;
"RTN","SAMINOT3",465,0)
. . . if $$XVAL("ceem",vals)="nv" q ;
"RTN","SAMINOT3",466,0)
. . . d OUT(sp1_"Emphysema: "_$$XSUB("ceem",vals,dict)_"."_para)
"RTN","SAMINOT3",467,0)
;
"RTN","SAMINOT3",468,0)
i $$XVAL("ceclini",vals)="y" d ;
"RTN","SAMINOT3",469,0)
. d OUT(sp1_$$XVAL("ceclin",vals)_"."_para)
"RTN","SAMINOT3",470,0)
;
"RTN","SAMINOT3",471,0)
i $$XVAL("ceoppai",vals)="y" d ;
"RTN","SAMINOT3",472,0)
. d OUT(sp1_$$XVAL("ceoppa",vals)_"."_para)
"RTN","SAMINOT3",473,0)
;
"RTN","SAMINOT3",474,0)
i $$XVAL("ceoppabi",vals)="y" d ;
"RTN","SAMINOT3",475,0)
. d OUT(sp1_$$XVAL("ceoppab",vals)_"."_para)
"RTN","SAMINOT3",476,0)
;
"RTN","SAMINOT3",477,0)
i $$XVAL("cecommcai",vals)="y" d ;
"RTN","SAMINOT3",478,0)
. d OUT(sp1_$$XVAL("cecommca",vals)_"."_para)
"RTN","SAMINOT3",479,0)
;
"RTN","SAMINOT3",480,0)
i $$XVAL("ceotabnmi",vals)="y" d ;
"RTN","SAMINOT3",481,0)
. d OUT(sp1_$$XVAL("ceotabnm",vals)_"."_para)
"RTN","SAMINOT3",482,0)
;
"RTN","SAMINOT3",483,0)
i $$XVAL("ceobrci",vals)="y" d ;
"RTN","SAMINOT3",484,0)
. d OUT(sp1_$$XVAL("ceobrc",vals)_"."_para)
"RTN","SAMINOT3",485,0)
;
"RTN","SAMINOT3",486,0)
i $$XVAL("ceaoabbi",vals)="y" d ;
"RTN","SAMINOT3",487,0)
. d OUT(sp1_$$XVAL("ceaoabb",vals)_"."_para)
"RTN","SAMINOT3",488,0)
;
"RTN","SAMINOT3",489,0)
i $$XVAL("ceaoabi",vals)="y" d ;
"RTN","SAMINOT3",490,0)
. d OUT(sp1_$$XVAL("ceaoab",vals)_"."_para)
"RTN","SAMINOT3",491,0)
;
"RTN","SAMINOT3",492,0)
;# Impression Remarks
"RTN","SAMINOT3",493,0)
i $$XVAL("ceimre",vals)'="" d ;
"RTN","SAMINOT3",494,0)
. d OUT(sp1_$$XVAL("ceimre",vals)_"."_para)
"RTN","SAMINOT3",495,0)
q
"RTN","SAMINOT3",496,0)
;
"RTN","SAMINOT3",497,0)
XSUB(var,vals,dict,valdx) ; extrinsic which returns the dictionary value defined by var
"RTN","SAMINOT3",498,0)
; vals and dict are passed by name
"RTN","SAMINOT3",499,0)
; valdx is used for nodules ala cect2co with the nodule number included
"RTN","SAMINOT3",500,0)
;n dict s dict=$$setroot^%wd("cteval-dict")
"RTN","SAMINOT3",501,0)
n zr,zv,zdx
"RTN","SAMINOT3",502,0)
s zdx=$g(valdx)
"RTN","SAMINOT3",503,0)
i zdx="" s zdx=var
"RTN","SAMINOT3",504,0)
s zv=$g(@vals@(zdx))
"RTN","SAMINOT3",505,0)
;i zv="" s zr="["_var_"]" q zr
"RTN","SAMINOT3",506,0)
i zv="" s zr="" q zr
"RTN","SAMINOT3",507,0)
s zr=$g(@dict@(var,zv))
"RTN","SAMINOT3",508,0)
;i zr="" s zr="["_var_","_zv_"]"
"RTN","SAMINOT3",509,0)
q zr
"RTN","SAMINOT3",510,0)
;
"VER")
8.0^22.2
**END**
**END**
| Genshi | 4 | OSEHRA/SAMI-VAPALS-ELCAP | dist/18-4/sami-1.18.0.4-i4.kid | [
"Apache-2.0"
] |
// Copyright 2012 Cloudera Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
namespace cpp impala
namespace java com.cloudera.impala.thrift
include "Status.thrift"
include "Types.thrift"
enum TExecState {
REGISTERED = 0,
PLANNING = 1,
QUEUED = 2,
RUNNING = 3,
FINISHED = 4,
CANCELLED = 5,
FAILED = 6,
}
// Execution stats for a single plan node.
struct TExecStats {
// The wall clock time spent on the "main" thread. This is the user perceived
// latency. This value indicates the current bottleneck.
// Note: anywhere we have a queue between operators, this time can fluctuate
// significantly without the overall query time changing much (i.e. the bottleneck
// moved to another operator). This is unavoidable though.
1: optional i64 latency_ns
// Total CPU time spent across all threads. For operators that have an async
// component (e.g. multi-threaded) this will be >= latency_ns.
2: optional i64 cpu_time_ns
// Number of rows returned.
3: optional i64 cardinality
// Peak memory used (in bytes).
4: optional i64 memory_used
}
// Summary for a single plan node. This includes labels for how to display the
// node as well as per instance stats.
struct TPlanNodeExecSummary {
1: required Types.TPlanNodeId node_id
2: required i32 fragment_id
3: required string label
4: optional string label_detail
5: required i32 num_children
// Estimated stats generated by the planner
6: optional TExecStats estimated_stats
// One entry for each BE executing this plan node.
7: optional list<TExecStats> exec_stats
// One entry for each BE executing this plan node. True if this plan node is still
// running.
8: optional list<bool> is_active
// If true, this plan node is an exchange node that is the receiver of a broadcast.
9: optional bool is_broadcast
}
// Progress counters for an in-flight query.
struct TExecProgress {
1: optional i64 total_scan_ranges
2: optional i64 num_completed_scan_ranges
}
// Execution summary of an entire query.
struct TExecSummary {
// State of the query.
1: required TExecState state
// Contains the error if state is FAILED.
2: optional Status.TStatus status
// Flattened execution summary of the plan tree.
3: optional list<TPlanNodeExecSummary> nodes
// For each exch node in 'nodes', contains the index to the root node of the sending
// fragment for this exch. Both the key and value are indices into 'nodes'.
4: optional map<i32, i32> exch_to_sender_map
// List of errors that were encountered during execution. This can be non-empty
// even if status is okay, in which case it contains errors that impala skipped
// over.
5: optional list<string> error_logs
// Optional record indicating the query progress
6: optional TExecProgress progress
} | Thrift | 4 | kokosing/hue | apps/impala/thrift/ExecStats.thrift | [
"Apache-2.0"
] |
#
mes 2, EM_WSIZE, EM_PSIZE
/*
* Tests _dup_ and _dus_ by loading 20 bytes from _src_, then making
* and checking some duplicates. The compilers might never _dup_ or
* _dus_ with large sizes, so the compilers might work even if this
* test fails. You can cheat this test if _cms_ always pushes zero.
*/
exa src
exa size
src
con 3593880729I4, 782166578I4, 4150666996I4, 2453272937I4, 3470523049I4
size
con 20I2
exp $check
exp $_m_a_i_n
pro $_m_a_i_n, 0
/* Push 3 copies of src on stack. */
lae src
loi 20 /* 1st copy */
dup 20 /* 2nd copy */
lae size
loi 2
dus EM_WSIZE /* 3rd copy */
cal $check
cal $finished
end /* $_m_a_i_n */
pro $check, 4 * EM_PSIZE + EM_WSIZE
#define p1 (-1 * EM_PSIZE)
#define p2 (-2 * EM_PSIZE)
#define p3 (-3 * EM_PSIZE)
#define p4 (-4 * EM_PSIZE)
#define i (p4 - EM_WSIZE)
/* Set pointers to all 4 copies. */
lae src
lal p4
sti EM_PSIZE /* p4 = src */
lal 0
lal p3
sti EM_PSIZE /* p3 = 3rd copy */
lal 20
lal p2
sti EM_PSIZE /* p2 = 2nd copy */
lal 40
lal p1
sti EM_PSIZE /* p1 = 1st copy */
/* Loop 20 times to verify each byte. */
loc 0
stl i
4
lal p4
loi EM_PSIZE
loi 1 /* byte from src */
lal p3
loi EM_PSIZE
loi 1 /* byte from 3rd copy */
cms EM_WSIZE
zeq *3
loc (3 * 256)
lol i
adi EM_WSIZE /* 0x300 + i */
loc EM_WSIZE
loc 4
cuu
cal $fail
asp 4
3
lal p4
loi EM_PSIZE
loi 1 /* byte from src */
lal p2
loi EM_PSIZE
loi 1 /* byte from 2nd copy */
cms EM_WSIZE
zeq *2
loc (2 * 256)
lol i
adi EM_WSIZE /* 0x200 + i */
loc EM_WSIZE
loc 4
cuu
cal $fail
asp 4
2
lal p4
loi EM_PSIZE
loi 1 /* byte from src */
lal p1
loi EM_PSIZE
loi 1 /* byte from 1st copy */
cms EM_WSIZE
zeq *1
loc (1 * 256)
lol i
adi EM_WSIZE /* 0x100 + i */
loc EM_WSIZE
loc 4
cuu
cal $fail
asp 4
1
lal p4
loi EM_PSIZE
adp 1
lal p4
sti EM_PSIZE /* increment p4 */
lal p3
loi EM_PSIZE
adp 1
lal p3
sti EM_PSIZE /* increment p3 */
lal p2
loi EM_PSIZE
adp 1
lal p2
sti EM_PSIZE /* increment p2 */
lal p1
loi EM_PSIZE
adp 1
lal p1
sti EM_PSIZE /* increment p1 */
inl i
lol i
loc 20
blt *4 /* loop 20 times */
ret 0
end /* $check */
| Eiffel | 3 | wyan/ack | tests/plat/core/dup_e.e | [
"BSD-3-Clause"
] |
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_PYTHON_UTIL_PYTHON_API_PARAMETER_CONVERTER_H_
#define TENSORFLOW_PYTHON_UTIL_PYTHON_API_PARAMETER_CONVERTER_H_
#include <Python.h>
#include <map>
#include <string>
#include <vector>
#include "absl/types/span.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/python/framework/op_def_util.h"
#include "tensorflow/python/framework/python_api_info.h"
#include "tensorflow/python/framework/python_tensor_converter.h"
#include "tensorflow/python/lib/core/safe_pyobject_ptr.h"
namespace tensorflow {
// Converts the canoncialized parameters to the expected types (in place).
//
// * Input parameters (i.e., parameters that expect tensor values) are
// converted to tensors (or lists of tensors) using
// `tensor_converter.Convert`.
// * Attribute parameters are converted to the expected type.
// * Inferred attributes are written to `inferred_attrs`. (Can be
// nullptr if inferred attributes are not needed.)
// * If there's a "name" parameter, then its value is not modified.
//
// Note: for list-of-tensor parameters, the elements of the list will be
// converted in-place. Therefore, any list-of-tensor parameters should have
// their values copied to new lists before calling this method. (See
// `CopyPythonAPITensorLists`.)
//
// Any values that are removed from `params` have their reference count
// decremented, and any objects added to `params` are new references.
//
// Returns true on success, or sets an exception and returns false on error.
ABSL_MUST_USE_RESULT
bool ConvertPythonAPIParameters(
const PythonAPIInfo& api_info,
const PythonTensorConverter& tensor_converter, absl::Span<PyObject*> params,
PythonAPIInfo::InferredAttributes* inferred_attrs);
// Copies any parameters that expect a list of tensors to a new list.
// This ensures that any iterable value can be used, and also ensures that
// `ConvertPythonAPIParameters` can safely convert tensors in-place.
//
// Any values that are removed from `params` have their reference count
// decremented, and any objects added to `params` are new references.
//
// Returns true on success, or sets an exception and returns false on error.
ABSL_MUST_USE_RESULT
bool CopyPythonAPITensorLists(const PythonAPIInfo& api_info,
absl::Span<PyObject*> params);
} // namespace tensorflow
#endif // TENSORFLOW_PYTHON_UTIL_PYTHON_API_PARAMETER_CONVERTER_H_
| C | 5 | EricRemmerswaal/tensorflow | tensorflow/python/framework/python_api_parameter_converter.h | [
"Apache-2.0"
] |
module org-openroadm-srg {
namespace "http://org/openroadm/srg";
prefix org-openroadm-srg;
organization
"OPEN ROADM MSA";
contact
"OpenROADM.org.";
description
"YANG definitions for an Add/Drop group in Network Model
Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the Members of the Open ROADM MSA Agreement nor the names of its
contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.";
revision 2016-10-14 {
description
"Version 1.2";
}
grouping shared-risk-group {
list srgs {
key "srg-number";
leaf srg-number {
type uint16;
description
"Identifier for each SRG";
}
leaf max-pp {
type uint32;
description
"Maximum number of add/drop port pairs in an SRG";
}
leaf-list available-wavelengths {
type uint32;
description
"List of available wavelengths that are supported
by the srg";
}
leaf wavelength-duplication {
type enumeration {
enum "one-per-srg" {
value 1;
}
enum "one-per-degree" {
value 2;
}
}
description
"One per srg is applied to C/D add/drop group
one per degree is applied to C/D/C add drop group";
}
container cp-tx {
leaf-list pp-number {
type uint32;
description
"The port pair # used for a tail or assigned by PCE to a service/circuit ";
}
}
container cp-rx {
leaf-list pp-number {
type uint32;
description
"The port pair # used for a tail or assigned by PCE to a service/circuit ";
}
}
list port-pair {
key "pp-number";
leaf pp-number {
type uint16;
description
"The port pair # used for tail or assigned by PCE to a service/circuit";
}
leaf wavelength-number {
type uint32;
}
}
}
}
}
| YANG | 5 | meodaiduoi/onos | models/openroadm/src/main/yang/[email protected] | [
"Apache-2.0"
] |
# Makefile for core library for VMS
# contributed by Jouk Jansen [email protected]
# Last revision : 3 October 2007
.first
define gl [---.include.gl]
define math [-.math]
define swrast [-.swrast]
define array_cache [-.array_cache]
define glapi [-.glapi]
define main [-.main]
define shader [-.shader]
.include [---]mms-config.
##### MACROS #####
VPATH = RCS
INCDIR = [---.include],[-.main],[-.glapi],[-.shader],[-.shader.slang]
LIBDIR = [---.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm
SOURCES = s_aaline.c s_aatriangle.c s_accum.c s_alpha.c \
s_bitmap.c s_blend.c s_blit.c s_buffers.c s_context.c \
s_copypix.c s_depth.c s_fragprog.c \
s_drawpix.c s_feedback.c s_fog.c s_imaging.c s_lines.c s_logic.c \
s_masking.c s_points.c s_readpix.c \
s_span.c s_stencil.c s_texstore.c s_texcombine.c s_texfilter.c \
s_triangle.c s_zoom.c s_atifragshader.c
OBJECTS = s_aaline.obj,s_aatriangle.obj,s_accum.obj,s_alpha.obj,\
s_bitmap.obj,s_blend.obj,s_blit.obj,s_fragprog.obj,\
s_buffers.obj,s_context.obj,s_atifragshader.obj,\
s_copypix.obj,s_depth.obj,s_drawpix.obj,s_feedback.obj,s_fog.obj,\
s_imaging.obj,s_lines.obj,s_logic.obj,s_masking.obj,\
s_points.obj,s_readpix.obj,s_span.obj,s_stencil.obj,\
s_texstore.obj,s_texcombine.obj,s_texfilter.obj,s_triangle.obj,\
s_zoom.obj
##### RULES #####
VERSION=Mesa V3.4
##### TARGETS #####
# Make the library
$(LIBDIR)$(GL_LIB) : $(OBJECTS)
@ library $(LIBDIR)$(GL_LIB) $(OBJECTS)
clean :
purge
delete *.obj;*
s_atifragshader.obj : s_atifragshader.c
s_aaline.obj : s_aaline.c
s_aatriangle.obj : s_aatriangle.c
s_accum.obj : s_accum.c
s_alpha.obj : s_alpha.c
s_bitmap.obj : s_bitmap.c
s_blend.obj : s_blend.c
s_blit.obj : s_blit.c
s_buffers.obj : s_buffers.c
s_context.obj : s_context.c
s_copypix.obj : s_copypix.c
s_depth.obj : s_depth.c
s_drawpix.obj : s_drawpix.c
s_feedback.obj : s_feedback.c
s_fog.obj : s_fog.c
s_imaging.obj : s_imaging.c
s_lines.obj : s_lines.c
s_logic.obj : s_logic.c
s_masking.obj : s_masking.c
s_points.obj : s_points.c
s_readpix.obj : s_readpix.c
s_span.obj : s_span.c
s_stencil.obj : s_stencil.c
s_texstore.obj : s_texstore.c
s_texcombine.obj : s_texcombine.c
s_texfilter.obj : s_texfilter.c
s_triangle.obj : s_triangle.c
s_zoom.obj : s_zoom.c
s_fragprog.obj : s_fragprog.c
| Module Management System | 3 | manggoguy/parsec-modified | pkgs/libs/mesa/src/src/mesa/swrast/descrip.mms | [
"BSD-3-Clause"
] |
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
module Marshal_tools_lwt = Marshal_tools.MarshalToolsFunctor (struct
type 'a result = 'a Lwt.t
type fd = Lwt_unix.file_descr
let return = Lwt.return
let fail = Lwt.fail
let ( >>= ) = Lwt.( >>= )
let write ?timeout fd ~buffer ~offset ~size =
if timeout <> None then raise (Invalid_argument "Use Lwt timeouts directly");
Lwt_unix.wait_write fd >>= fun () -> Lwt_unix.write fd buffer offset size
let read ?timeout fd ~buffer ~offset ~size =
if timeout <> None then raise (Invalid_argument "Use lwt timeouts directly");
Lwt_unix.wait_read fd >>= fun () -> Lwt_unix.read fd buffer offset size
let log str = Lwt_log_core.ign_error str
end)
include Marshal_tools_lwt
(* The Timeout module probably doesn't work terribly well with Lwt. Luckily, timeouts are super easy
* to write in Lwt, so we don't **really** need them *)
let to_fd_with_preamble ?flags fd obj = to_fd_with_preamble ?flags fd obj
let from_fd_with_preamble fd = from_fd_with_preamble fd
| OCaml | 4 | esilkensen/flow | src/hack_forked/utils/marshal_tools/marshal_tools_lwt.ml | [
"MIT"
] |
(*** This file is part of Lem. eth-isabelle project just uses it. See lem-license. ***)
chapter {* Generated by Lem from tuple.lem. *}
theory "Lem_tuple"
imports
Main
"Lem_bool"
"Lem_basic_classes"
begin
(*open import Bool Basic_classes*)
(* ----------------------- *)
(* fst *)
(* ----------------------- *)
(*val fst : forall 'a 'b. 'a * 'b -> 'a*)
(*let fst (v1, v2)= v1*)
(* ----------------------- *)
(* snd *)
(* ----------------------- *)
(*val snd : forall 'a 'b. 'a * 'b -> 'b*)
(*let snd (v1, v2)= v2*)
(* ----------------------- *)
(* curry *)
(* ----------------------- *)
(*val curry : forall 'a 'b 'c. ('a * 'b -> 'c) -> ('a -> 'b -> 'c)*)
(* ----------------------- *)
(* uncurry *)
(* ----------------------- *)
(*val uncurry : forall 'a 'b 'c. ('a -> 'b -> 'c) -> ('a * 'b -> 'c)*)
(* ----------------------- *)
(* swap *)
(* ----------------------- *)
(*val swap : forall 'a 'b. ('a * 'b) -> ('b * 'a)*)
(*let swap (v1, v2)= (v2, v1)*)
end
| Isabelle | 4 | pirapira/eth-isabelle | lem/Lem_tuple.thy | [
"Apache-2.0"
] |
package com.alibaba.json.bvt.parser.deser;
import com.alibaba.fastjson.JSON;
import junit.framework.TestCase;
import org.junit.Assert;
public class FieldDeserializerTest9 extends TestCase {
public void test_0 () throws Exception {
assertTrue(JSON.parseObject("{\"id\":true\t}", VO.class).id);
assertTrue(JSON.parseObject("{\"id\":true\t}\n\t", VO.class).id);
assertTrue(JSON.parseObject("{\"id\":true }", V1.class).id);
assertTrue(JSON.parseObject("{\"id\":true }\n\t", V1.class).id);
assertTrue(JSON.parseObject("{\"id\":true\n}", V1.class).id);
}
public void test_1 () throws Exception {
assertFalse(JSON.parseObject("{\"id\":false\t}", VO.class).id);
assertFalse(JSON.parseObject("{\"id\":false\t}\n\t", VO.class).id);
assertFalse(JSON.parseObject("{\"id\":false }", V1.class).id);
assertFalse(JSON.parseObject("{\"id\":false }\n\t", V1.class).id);
assertFalse(JSON.parseObject("{\"id\":false\n}", V1.class).id);
}
public static class VO {
public boolean id;
}
private static class V1 {
public boolean id;
}
}
| Java | 4 | Czarek93/fastjson | src/test/java/com/alibaba/json/bvt/parser/deser/FieldDeserializerTest9.java | [
"Apache-2.0"
] |
/*
Copyright 2021 Scott Bezek and the splitflap contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
include <../shapes.scad>
use <../splitflap.scad>
num_connectors = 4; // number of connectors (vertically) per section
thickness = 3.0; // thickness of each connector (should be close to splitflap.scad panel thickness)
cases_per_row = 2; // number of cases per each row
dual_rows = true; // whether to put mirrored cases on the opposite side
connector_clearance = 0.5; // distance between the connector edges and the case walls
wall_thickness = 3.5; // thickness of the case walls around the connectors
bottom_thickness = 5.0; // thickness of the bottom of the case, below the connectors
top_clearance = 0.4; // clearance above the top of the connectors
// auto-calculated constants
combined_offset = connector_clearance + wall_thickness; // total offset from base to outer edge
side_wall_height = (thickness * num_connectors) + top_clearance; // total height of the walls above the base
case_width = connector_bracket_width() + (combined_offset * 2); // width of the case (along X)
case_width_per = case_width - wall_thickness; // width of each case when in a group (combined wall thickness)
case_length = connector_bracket_length() + (combined_offset * 2); // length of the case (along Y)
case_length_dual_offset = case_length + connector_bracket_length() - wall_thickness; // Y offset for the 'dual' case row
case_length_dual = case_length + case_length_dual_offset; // total case length alokng Y with 'dual' option enabled
module base_outline() {
offset(r=combined_offset, $fn=60) {
connector_bracket_2d();
}
}
module connector_case_cutout(num) {
width = 14 + connector_clearance; // arbitrary
radius = 2.0; // nicely rounded corners
height = (side_wall_height) + radius; // total height of the tool (Z)
depth = connector_bracket_length(); // total depth of the tool (Y)
translate([0, depth, 0])
rotate([90, 0, 0])
linear_extrude(depth, convexity=2)
translate([connector_bracket_width()/2 - width/2, bottom_thickness, 0])
rounded_square([width, height], r=radius, $fn=30);
}
module connector_case_single(num) {
difference() {
// case body
union() {
// pocket
translate([0, 0, bottom_thickness]) {
linear_extrude(side_wall_height, convexity=10) {
difference() {
base_outline();
offset(delta=connector_clearance) {
connector_bracket_2d();
}
}
}
}
// bottom
linear_extrude(bottom_thickness, convexity=2) {
base_outline();
}
}
connector_case_cutout(num);
}
}
module connector_case_row(num_conn, num_cases) {
union() {
for ( i = [0 : num_cases - 1] ) {
translate([case_width_per * i, 0, 0])
connector_case_single(num_conn);
}
}
}
module connector_case(num_conn, num_cases, dual=false) {
union() {
connector_case_row(num_conn, num_cases);
if(dual) {
translate([0, case_length_dual_offset, 0])
mirror([0, 1, 0])
connector_case_row(num_conn, num_cases);
}
}
}
connector_case(num_connectors, cases_per_row, dual_rows);
| OpenSCAD | 4 | chrisdearman/splitflap | 3d/tools/connector_case.scad | [
"Apache-2.0"
] |
#include "script_component.hpp"
/*
Name: TFAR_fnc_setAdditionalSwStereo
Author: NKey
Sets the stereo setting for additional channel the SW radio
Arguments:
0: Radio <STRING>
1: Stereo Range (0,2) (0 - Both, 1 - Left, 2 - Right) <NUMBER>
Return Value:
None
Example:
[(call TFAR_fnc_activeSWRadio), 2] call TFAR_fnc_setAdditionalSwStereo;
Public: Yes
*/
params [["_radio", "", [""]], ["_value", 0, [0]]];
private _settings = _radio call TFAR_fnc_getSwSettings;
_settings set [TFAR_ADDITIONAL_STEREO_OFFSET, _value];
[_radio, _settings] call TFAR_fnc_setSwSettings;
// unit, radio ID, stero, additional
["OnSWstereoSet", [TFAR_currentUnit, _radio, _value, true]] call TFAR_fnc_fireEventHandlers;
| SQF | 4 | MrDj200/task-force-arma-3-radio | addons/core/functions/fnc_setAdditionalSwStereo.sqf | [
"RSA-MD"
] |
load'jd'
jdadminx'corona'
CSVFOLDER =:'/development/j/coronavirus'
NB. https://www.census.gov/quickfacts/fact/table/chicagocityillinois/POP010210
chi_pop =: 2695598
NB. build dbs
jd'csvprobe /replace chicago-cases.csv'
jd'csvcdefs /replace /h 1 /v 30 chicago-cases.csv'
jd'csvscan chicago-cases.csv'
jd'csvrd chicago-cases.csv chicagoCases'
jd'csvprobe /replace chicago-hospitalized.csv'
jd'csvcdefs /replace /h 1 /v 30 chicago-hospitalized.csv'
jd'csvscan chicago-hospitalized.csv'
jd'csvrd chicago-hospitalized.csv chicagoHospitalized'
jd'csvprobe /replace chicago-tested.csv'
jd'csvcdefs /replace /h 1 /v 30 chicago-tested.csv'
jd'csvscan chicago-tested.csv'
jd'csvrd chicago-tested.csv chicagoTested'
week_mean =: 7 (+/%#)\]
NB. chicago_smooth =: week_mean , > (< 1 0) { jd'reads cases_total from chicagoCases where not date = "?"'
hospitalized_plot =: , > (<1 1) { jd'reads date,combined_hospital_beds_in_use_covid_19 from chicagoHospitalized where combined_hospital_beds_in_use_covid_19 > _1 order by date'
NB. icu_plot =: , > (<1 1) { jd'reads date,icu_beds_in_use_covid_19 from chicagoHospitalized order by date'
tested =: ,> (< 1 1) { jd'reads date,people_tested_total from chicagoTested where not date = "?" order by date'
positive =: ,> (< 1 1) { jd'reads date,people_positive_total from chicagoTested where not date = "?" order by date'
chicago_smooth =: week_mean positive
NB. higher than reported rate on chicago website b/c those are unique
pp =: positive % tested
NB. https://www.bmj.com/content/bmj/369/bmj.m1808.full.pdf
| J | 3 | vmchale/coronavirus | chicago-db.ijs | [
"BSD-3-Clause"
] |
= ugc
Describe your project here
:include:ugc.rdoc
| RDoc | 0 | snoopdave/incubator-usergrid | ugc/README.rdoc | [
"Apache-2.0"
] |
tests/cases/compiler/extBaseClass2.ts(2,31): error TS2339: Property 'B' does not exist on type 'typeof M'.
tests/cases/compiler/extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'.
==== tests/cases/compiler/extBaseClass2.ts (2 errors) ====
module N {
export class C4 extends M.B {
~
!!! error TS2339: Property 'B' does not exist on type 'typeof M'.
}
}
module M {
export class C5 extends B {
~
!!! error TS2304: Cannot find name 'B'.
}
}
| Text | 2 | nilamjadhav/TypeScript | tests/baselines/reference/extBaseClass2.errors.txt | [
"Apache-2.0"
] |
#!/usr/bin/env bash
###############################################################################
# Copyright 2018 The Apollo Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
# Fail on first error.
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
. ./installer_base.sh
# Notes on Protobuf Installer:
# 1) protobuf for cpp didn't need to be pre-installed into system
# 2) protobuf for python should be provided for cyber testcases
VERSION="3.14.0"
PKG_NAME="protobuf-${VERSION}.tar.gz"
CHECKSUM="d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113"
DOWNLOAD_LINK="https://github.com/protocolbuffers/protobuf/archive/v${VERSION}.tar.gz"
#PKG_NAME="protobuf-cpp-${VERSION}.tar.gz"
#CHECKSUM="4ef97ec6a8e0570d22ad8c57c99d2055a61ea2643b8e1a0998d2c844916c4968"
#DOWNLOAD_LINK="https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/protobuf-cpp-${VERSION}.tar.gz"
download_if_not_cached "$PKG_NAME" "$CHECKSUM" "$DOWNLOAD_LINK"
tar xzf ${PKG_NAME}
# https://developers.google.com/protocol-buffers/docs/reference/python-generated#cpp_impl
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
pushd protobuf-${VERSION}
mkdir cmake/build && cd cmake/build
cmake .. \
-DBUILD_SHARED_LIBS=ON \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
-DCMAKE_BUILD_TYPE=Release
# ./configure --prefix=/usr
make -j$(nproc)
make install
ldconfig
cd ../../python
# Cf. https://github.com/protocolbuffers/protobuf/tree/master/python
python setup.py install --cpp_implementation
popd
echo -e "\nexport PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp" | tee -a "${APOLLO_PROFILE}"
ok "Successfully installed protobuf, VERSION=${VERSION}"
# Clean up.
rm -fr ${PKG_NAME} protobuf-${VERSION}
| Shell | 4 | jzjonah/apollo | docker/build/installers/install_protobuf.sh | [
"Apache-2.0"
] |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#include "precomp.h"
#include "WexTestClass.h"
using namespace WEX::Logging;
class EnumSetTests
{
TEST_CLASS(EnumSetTests);
TEST_METHOD(Constructors)
{
enum class Flags
{
Zero,
One,
Two,
Three,
Four
};
{
Log::Comment(L"Default constructor with no bits set");
til::enumset<Flags> flags;
VERIFY_ARE_EQUAL(0b00000u, flags.bits());
}
{
Log::Comment(L"Constructor with bit 3 set");
til::enumset<Flags> flags{ Flags::Three };
VERIFY_ARE_EQUAL(0b01000u, flags.bits());
}
{
Log::Comment(L"Constructor with bits 0, 2, and 4 set");
til::enumset<Flags> flags{ Flags::Zero, Flags::Two, Flags::Four };
VERIFY_ARE_EQUAL(0b10101u, flags.bits());
}
}
TEST_METHOD(SetResetFlipMethods)
{
enum class Flags
{
Zero,
One,
Two,
Three,
Four
};
Log::Comment(L"Start with no bits set");
til::enumset<Flags> flags;
VERIFY_ARE_EQUAL(0b00000u, flags.bits());
Log::Comment(L"Set bit 2 to true");
flags.set(Flags::Two);
VERIFY_ARE_EQUAL(0b00100u, flags.bits());
Log::Comment(L"Flip bit 4 to true");
flags.flip(Flags::Four);
VERIFY_ARE_EQUAL(0b10100u, flags.bits());
Log::Comment(L"Set bit 0 to true");
flags.set(Flags::Zero, true);
VERIFY_ARE_EQUAL(0b10101u, flags.bits());
Log::Comment(L"Reset bit 2 to false, leaving 0 and 4 true");
flags.reset(Flags::Two);
VERIFY_ARE_EQUAL(0b10001u, flags.bits());
Log::Comment(L"Set bit 0 to false, leaving 4 true");
flags.set(Flags::Zero, false);
VERIFY_ARE_EQUAL(0b10000u, flags.bits());
Log::Comment(L"Flip bit 4, leaving all bits false ");
flags.flip(Flags::Four);
VERIFY_ARE_EQUAL(0b00000u, flags.bits());
Log::Comment(L"Set bits 0, 3, and 2");
flags.set(Flags::Zero, Flags::Three, Flags::Two);
VERIFY_ARE_EQUAL(0b01101u, flags.bits());
Log::Comment(L"Reset bits 3, 4 (already reset), and 0, leaving 2 true");
flags.reset(Flags::Three, Flags::Four, Flags::Zero);
VERIFY_ARE_EQUAL(0b00100u, flags.bits());
}
TEST_METHOD(TestMethods)
{
enum class Flags
{
Zero,
One,
Two,
Three,
Four
};
Log::Comment(L"Start with bits 0, 2, and 4 set");
til::enumset<Flags> flags{ Flags::Zero, Flags::Two, Flags::Four };
VERIFY_ARE_EQUAL(0b10101u, flags.bits());
Log::Comment(L"Test bits 1 through 4 with the test method");
VERIFY_IS_FALSE(flags.test(Flags::One));
VERIFY_IS_TRUE(flags.test(Flags::Two));
VERIFY_IS_FALSE(flags.test(Flags::Three));
VERIFY_IS_TRUE(flags.test(Flags::Four));
Log::Comment(L"Test if any bits are set");
VERIFY_IS_TRUE(flags.any());
Log::Comment(L"Test if either bit 1 or 3 are set");
VERIFY_IS_FALSE(flags.any(Flags::One, Flags::Three));
Log::Comment(L"Test if either bit 1 or 4 are set");
VERIFY_IS_TRUE(flags.any(Flags::One, Flags::Four));
Log::Comment(L"Test if all bits are set");
VERIFY_IS_FALSE(flags.all());
Log::Comment(L"Test if both bits 0 and 4 are set");
VERIFY_IS_TRUE(flags.all(Flags::Zero, Flags::Four));
Log::Comment(L"Test if both bits 0 and 3 are set");
VERIFY_IS_FALSE(flags.all(Flags::Zero, Flags::Three));
}
};
| C++ | 5 | memcpy-rand-rand-rand/terminal | src/til/ut_til/EnumSetTests.cpp | [
"MIT"
] |
#!/bin/sh
set -e
# this script will take the CA cert from @packages/https-proxy/ca
# and regenerate all the certs in this directory from it
# folders:
# ca contains a mock CA
# client contains public info that a client would have
# server contains private info that a server would have
CA_PATH=../../../ca
rm -rf $CA_PATH
# ensure regular root CA exists
node -e "require('@packages/https-proxy/lib/ca').create('$CA_PATH')"
echo "remove and relink test CA pems"
for f in ca client server
do
rm -f $f/my-root-ca.crt.pem
cp $CA_PATH/certs/ca.pem $f/my-root-ca.crt.pem
done
echo "remove and relink test CA key"
rm -f ca/my-root-ca.key.pem
cp $CA_PATH/keys/ca.private.key ca/my-root-ca.key.pem
echo "reuse existing key and crt to generate a new server csr"
openssl x509 -in server/my-server.crt.pem -signkey server/my-server.key.pem -x509toreq -out server/my-server.csr
rm -f server/my-server.crt.pem ca/*.srl
echo "now use that CSR with the CA to sign a new certificate"
openssl x509 -req -in server/my-server.csr -CA ca/my-root-ca.crt.pem -CAkey ca/my-root-ca.key.pem -CAcreateserial -out server/my-server.crt.pem
echo "get rid of CSR, we don't need it"
rm -f server/my-server.csr
echo "regenerate public key"
rm -f client/my-server.pub
openssl rsa -in server/my-server.key.pem -pubout -out client/my-server.pub
| Shell | 4 | bkucera2/cypress | packages/https-proxy/test/helpers/certs/regenerate-certs.sh | [
"MIT"
] |
interface Animal { animal }
interface Dog extends Animal { dog }
interface Cat extends Animal { cat }
function foo1(bar: { a:number }[]): Dog;
function foo1(bar: { a:string }[]): Animal;
function foo1([x]: { a:number | string }[]): Dog {
return undefined;
}
function foo2(bar: { a:number }[]): Cat;
function foo2(bar: { a:string }[]): Cat | Dog;
function foo2([x]: { a:number | string }[]): Cat {
return undefined;
}
var x1 = foo1([{a: "str"}]);
var y1 = foo1([{a: 100}]);
var x2 = foo2([{a: "str"}]);
var y2 = foo2([{a: 100}]); | TypeScript | 3 | nilamjadhav/TypeScript | tests/cases/compiler/functionOverloads44.ts | [
"Apache-2.0"
] |
import { deferred } from "../unit/test_util.ts";
const promise = deferred();
const listener = Deno.listen({ port: 4319 });
console.log("READY");
const conn = await listener.accept();
const httpConn = Deno.serveHttp(conn);
const { request, respondWith } = (await httpConn.nextRequest())!;
const {
response,
socket,
} = Deno.upgradeWebSocket(request);
socket.onerror = () => Deno.exit(1);
socket.onopen = () => socket.close();
socket.onclose = () => promise.resolve();
await respondWith(response);
await promise;
| TypeScript | 3 | petamoriken/deno | cli/tests/testdata/websocket_server_multi_field_connection_header_test.ts | [
"MIT"
] |
CREATE TABLE `tb_ezaysnxloa` (
`col_koftcyrhcl` int(233) DEFAULT '1',
`col_nacwazcyzi` varbinary(12),
UNIQUE `col_koftcyrhcl` (`col_koftcyrhcl`)
) DEFAULT CHARSET=utf8;
RENAME TABLE `tb_ezaysnxloa` TO `tb_wsxpqlbxhr`;
ALTER TABLE `tb_wsxpqlbxhr` ADD COLUMN (`col_nnckvjhnnd` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci, `col_sxwmoaghtk` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0');
ALTER TABLE `tb_wsxpqlbxhr` ADD `col_btyjfvfohb` double(18,12);
ALTER TABLE `tb_wsxpqlbxhr` ADD (`col_udrjznhpgf` tinytext, `col_ynwgneexdq` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci);
ALTER TABLE `tb_wsxpqlbxhr` ADD COLUMN `col_kkdtlacxiy` char NOT NULL FIRST;
ALTER TABLE `tb_wsxpqlbxhr` ADD `col_xlcidwqtlg` tinytext CHARACTER SET utf8;
ALTER TABLE `tb_wsxpqlbxhr` ADD COLUMN (`col_huxsdgntaw` numeric(27,14) NOT NULL, `col_siklbsrsfa` date NOT NULL);
ALTER TABLE `tb_wsxpqlbxhr` ADD PRIMARY KEY (`col_kkdtlacxiy`,`col_huxsdgntaw`);
ALTER TABLE `tb_wsxpqlbxhr` ADD UNIQUE INDEX `uk_cpzrxvccoo` (`col_nacwazcyzi`(7),`col_xlcidwqtlg`(9));
ALTER TABLE `tb_wsxpqlbxhr` CHANGE COLUMN `col_udrjznhpgf` `col_qpusrblupw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0';
ALTER TABLE `tb_wsxpqlbxhr` DROP COLUMN `col_huxsdgntaw`;
ALTER TABLE `tb_wsxpqlbxhr` DROP `col_siklbsrsfa`, DROP `col_ynwgneexdq`;
ALTER TABLE `tb_wsxpqlbxhr` DROP `col_xlcidwqtlg`;
ALTER TABLE `tb_wsxpqlbxhr` DROP KEY `uk_cpzrxvccoo`;
ALTER TABLE `tb_wsxpqlbxhr` DROP KEY `col_koftcyrhcl`;
| SQL | 1 | yuanweikang2020/canal | parse/src/test/resources/ddl/alter/test_58.sql | [
"Apache-2.0"
] |
'Hello World' printLine | Self | 0 | conorpreid/hello-world | s/Self.self | [
"MIT"
] |
# Method - controller of functions
## Class Method
Property = require('./property')
class Method extends Property
logger: require('debug')('yang:method')
@property 'data',
set: (value) -> @set value, { force: true }
get: -> switch
when @binding? then @do.bind this
else @value
### do ()
A convenience wrap to a Property instance that holds a function to
perform a Promise-based execution.
Always returns a Promise.
do: (input={}, opts={}) ->
unless (@binding instanceof Function) or (@data instanceof Function)
return Promise.reject @error "cannot perform action on a property without function"
@debug "[do] executing method: #{@name}"
@debug input
ctx = @parent?.context ? @context
ctx = ctx.with opts, path: @path
try
# calling context is the parent node of the method
input = @schema.input.apply input, this, force: true
# first apply schema bound function (if availble), otherwise
# execute assigned function (if available and not 'missing')
if @binding?
@debug "[do] calling bound function with: #{Object.keys(input)}" if typeof input is 'object'
@debug @binding.toString()
output = @binding? ctx, input
else
@debug "[do] calling assigned function: #{@data.name}"
@debug => @value
@debug => @data
output = @data.call @parent.data, input, ctx
output = await output
{ output } = @schema.output.eval { output }, this, force: true
return output
catch e
@debug e
return Promise.reject(e)
update: (value, opts) ->
super value, opts unless value instanceof Property
### toJSON
This call always returns undefined for the Method node.
toJSON: (key) ->
value = undefined
value = "#{@name}": value if key is true
return value
module.exports = Method
| Literate CoffeeScript | 5 | EnesKilicaslan/yang-js | src/method.litcoffee | [
"Apache-2.0"
] |
<script src="shared.js"></script>
<link rel="stylesheet" href="shared.css" />
<style>
html, body {
min-width: 460px;
min-height: 133px;
}
hr {
width: 100%;
}
</style>
<p>
<b>This page includes an extra development build of React. 🚧</b>
</p>
<p>
The React build on this page includes both development and production versions because dead code elimination has not been applied correctly.
<br />
<br />
This makes its size larger, and causes React to run slower.
<br />
<br />
Make sure to <a href="https://reactjs.org/docs/optimizing-performance.html#use-the-production-build">set up dead code elimination</a> before deployment.
</p>
<hr />
<p>
Open the developer tools, and "Components" and "Profiler" tabs will appear to the right.
</p>
| HTML | 3 | GBKstc/react-analysis | packages/react-devtools-extensions/popups/deadcode.html | [
"MIT"
] |
:mod:`http.cookiejar` --- Cookie handling for HTTP clients
==========================================================
.. module:: http.cookiejar
:synopsis: Classes for automatic handling of HTTP cookies.
.. moduleauthor:: John J. Lee <[email protected]>
.. sectionauthor:: John J. Lee <[email protected]>
**Source code:** :source:`Lib/http/cookiejar.py`
--------------
The :mod:`http.cookiejar` module defines classes for automatic handling of HTTP
cookies. It is useful for accessing web sites that require small pieces of data
-- :dfn:`cookies` -- to be set on the client machine by an HTTP response from a
web server, and then returned to the server in later HTTP requests.
Both the regular Netscape cookie protocol and the protocol defined by
:rfc:`2965` are handled. RFC 2965 handling is switched off by default.
:rfc:`2109` cookies are parsed as Netscape cookies and subsequently treated
either as Netscape or RFC 2965 cookies according to the 'policy' in effect.
Note that the great majority of cookies on the internet are Netscape cookies.
:mod:`http.cookiejar` attempts to follow the de-facto Netscape cookie protocol (which
differs substantially from that set out in the original Netscape specification),
including taking note of the ``max-age`` and ``port`` cookie-attributes
introduced with RFC 2965.
.. note::
The various named parameters found in :mailheader:`Set-Cookie` and
:mailheader:`Set-Cookie2` headers (eg. ``domain`` and ``expires``) are
conventionally referred to as :dfn:`attributes`. To distinguish them from
Python attributes, the documentation for this module uses the term
:dfn:`cookie-attribute` instead.
The module defines the following exception:
.. exception:: LoadError
Instances of :class:`FileCookieJar` raise this exception on failure to load
cookies from a file. :exc:`LoadError` is a subclass of :exc:`OSError`.
.. versionchanged:: 3.3
LoadError was made a subclass of :exc:`OSError` instead of
:exc:`IOError`.
The following classes are provided:
.. class:: CookieJar(policy=None)
*policy* is an object implementing the :class:`CookiePolicy` interface.
The :class:`CookieJar` class stores HTTP cookies. It extracts cookies from HTTP
requests, and returns them in HTTP responses. :class:`CookieJar` instances
automatically expire contained cookies when necessary. Subclasses are also
responsible for storing and retrieving cookies from a file or database.
.. class:: FileCookieJar(filename, delayload=None, policy=None)
*policy* is an object implementing the :class:`CookiePolicy` interface. For the
other arguments, see the documentation for the corresponding attributes.
A :class:`CookieJar` which can load cookies from, and perhaps save cookies to, a
file on disk. Cookies are **NOT** loaded from the named file until either the
:meth:`load` or :meth:`revert` method is called. Subclasses of this class are
documented in section :ref:`file-cookie-jar-classes`.
.. versionchanged:: 3.8
The filename parameter supports a :term:`path-like object`.
.. class:: CookiePolicy()
This class is responsible for deciding whether each cookie should be accepted
from / returned to the server.
.. class:: DefaultCookiePolicy( blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=DefaultCookiePolicy.DomainLiberal, strict_ns_set_initial_dollar=False, strict_ns_set_path=False, secure_protocols=("https", "wss") )
Constructor arguments should be passed as keyword arguments only.
*blocked_domains* is a sequence of domain names that we never accept cookies
from, nor return cookies to. *allowed_domains* if not :const:`None`, this is a
sequence of the only domains for which we accept and return cookies.
*secure_protocols* is a sequence of protocols for which secure cookies can be
added to. By default *https* and *wss* (secure websocket) are considered
secure protocols. For all other arguments, see the documentation for
:class:`CookiePolicy` and :class:`DefaultCookiePolicy` objects.
:class:`DefaultCookiePolicy` implements the standard accept / reject rules for
Netscape and :rfc:`2965` cookies. By default, :rfc:`2109` cookies (ie. cookies
received in a :mailheader:`Set-Cookie` header with a version cookie-attribute of
1) are treated according to the RFC 2965 rules. However, if RFC 2965 handling
is turned off or :attr:`rfc2109_as_netscape` is ``True``, RFC 2109 cookies are
'downgraded' by the :class:`CookieJar` instance to Netscape cookies, by
setting the :attr:`version` attribute of the :class:`Cookie` instance to 0.
:class:`DefaultCookiePolicy` also provides some parameters to allow some
fine-tuning of policy.
.. class:: Cookie()
This class represents Netscape, :rfc:`2109` and :rfc:`2965` cookies. It is not
expected that users of :mod:`http.cookiejar` construct their own :class:`Cookie`
instances. Instead, if necessary, call :meth:`make_cookies` on a
:class:`CookieJar` instance.
.. seealso::
Module :mod:`urllib.request`
URL opening with automatic cookie handling.
Module :mod:`http.cookies`
HTTP cookie classes, principally useful for server-side code. The
:mod:`http.cookiejar` and :mod:`http.cookies` modules do not depend on each
other.
https://curl.se/rfc/cookie_spec.html
The specification of the original Netscape cookie protocol. Though this is
still the dominant protocol, the 'Netscape cookie protocol' implemented by all
the major browsers (and :mod:`http.cookiejar`) only bears a passing resemblance to
the one sketched out in ``cookie_spec.html``.
:rfc:`2109` - HTTP State Management Mechanism
Obsoleted by :rfc:`2965`. Uses :mailheader:`Set-Cookie` with version=1.
:rfc:`2965` - HTTP State Management Mechanism
The Netscape protocol with the bugs fixed. Uses :mailheader:`Set-Cookie2` in
place of :mailheader:`Set-Cookie`. Not widely used.
http://kristol.org/cookie/errata.html
Unfinished errata to :rfc:`2965`.
:rfc:`2964` - Use of HTTP State Management
.. _cookie-jar-objects:
CookieJar and FileCookieJar Objects
-----------------------------------
:class:`CookieJar` objects support the :term:`iterator` protocol for iterating over
contained :class:`Cookie` objects.
:class:`CookieJar` has the following methods:
.. method:: CookieJar.add_cookie_header(request)
Add correct :mailheader:`Cookie` header to *request*.
If policy allows (ie. the :attr:`rfc2965` and :attr:`hide_cookie2` attributes of
the :class:`CookieJar`'s :class:`CookiePolicy` instance are true and false
respectively), the :mailheader:`Cookie2` header is also added when appropriate.
The *request* object (usually a :class:`urllib.request.Request` instance)
must support the methods :meth:`get_full_url`, :meth:`get_host`,
:meth:`get_type`, :meth:`unverifiable`, :meth:`has_header`,
:meth:`get_header`, :meth:`header_items`, :meth:`add_unredirected_header`
and :attr:`origin_req_host` attribute as documented by
:mod:`urllib.request`.
.. versionchanged:: 3.3
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
deprecated method :meth:`get_origin_req_host` has been removed.
.. method:: CookieJar.extract_cookies(response, request)
Extract cookies from HTTP *response* and store them in the :class:`CookieJar`,
where allowed by policy.
The :class:`CookieJar` will look for allowable :mailheader:`Set-Cookie` and
:mailheader:`Set-Cookie2` headers in the *response* argument, and store cookies
as appropriate (subject to the :meth:`CookiePolicy.set_ok` method's approval).
The *response* object (usually the result of a call to
:meth:`urllib.request.urlopen`, or similar) should support an :meth:`info`
method, which returns an :class:`email.message.Message` instance.
The *request* object (usually a :class:`urllib.request.Request` instance)
must support the methods :meth:`get_full_url`, :meth:`get_host`,
:meth:`unverifiable`, and :attr:`origin_req_host` attribute, as documented
by :mod:`urllib.request`. The request is used to set default values for
cookie-attributes as well as for checking that the cookie is allowed to be
set.
.. versionchanged:: 3.3
*request* object needs :attr:`origin_req_host` attribute. Dependency on a
deprecated method :meth:`get_origin_req_host` has been removed.
.. method:: CookieJar.set_policy(policy)
Set the :class:`CookiePolicy` instance to be used.
.. method:: CookieJar.make_cookies(response, request)
Return sequence of :class:`Cookie` objects extracted from *response* object.
See the documentation for :meth:`extract_cookies` for the interfaces required of
the *response* and *request* arguments.
.. method:: CookieJar.set_cookie_if_ok(cookie, request)
Set a :class:`Cookie` if policy says it's OK to do so.
.. method:: CookieJar.set_cookie(cookie)
Set a :class:`Cookie`, without checking with policy to see whether or not it
should be set.
.. method:: CookieJar.clear([domain[, path[, name]]])
Clear some cookies.
If invoked without arguments, clear all cookies. If given a single argument,
only cookies belonging to that *domain* will be removed. If given two arguments,
cookies belonging to the specified *domain* and URL *path* are removed. If
given three arguments, then the cookie with the specified *domain*, *path* and
*name* is removed.
Raises :exc:`KeyError` if no matching cookie exists.
.. method:: CookieJar.clear_session_cookies()
Discard all session cookies.
Discards all contained cookies that have a true :attr:`discard` attribute
(usually because they had either no ``max-age`` or ``expires`` cookie-attribute,
or an explicit ``discard`` cookie-attribute). For interactive browsers, the end
of a session usually corresponds to closing the browser window.
Note that the :meth:`save` method won't save session cookies anyway, unless you
ask otherwise by passing a true *ignore_discard* argument.
:class:`FileCookieJar` implements the following additional methods:
.. method:: FileCookieJar.save(filename=None, ignore_discard=False, ignore_expires=False)
Save cookies to a file.
This base class raises :exc:`NotImplementedError`. Subclasses may leave this
method unimplemented.
*filename* is the name of file in which to save cookies. If *filename* is not
specified, :attr:`self.filename` is used (whose default is the value passed to
the constructor, if any); if :attr:`self.filename` is :const:`None`,
:exc:`ValueError` is raised.
*ignore_discard*: save even cookies set to be discarded. *ignore_expires*: save
even cookies that have expired
The file is overwritten if it already exists, thus wiping all the cookies it
contains. Saved cookies can be restored later using the :meth:`load` or
:meth:`revert` methods.
.. method:: FileCookieJar.load(filename=None, ignore_discard=False, ignore_expires=False)
Load cookies from a file.
Old cookies are kept unless overwritten by newly loaded ones.
Arguments are as for :meth:`save`.
The named file must be in the format understood by the class, or
:exc:`LoadError` will be raised. Also, :exc:`OSError` may be raised, for
example if the file does not exist.
.. versionchanged:: 3.3
:exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`.
.. method:: FileCookieJar.revert(filename=None, ignore_discard=False, ignore_expires=False)
Clear all cookies and reload cookies from a saved file.
:meth:`revert` can raise the same exceptions as :meth:`load`. If there is a
failure, the object's state will not be altered.
:class:`FileCookieJar` instances have the following public attributes:
.. attribute:: FileCookieJar.filename
Filename of default file in which to keep cookies. This attribute may be
assigned to.
.. attribute:: FileCookieJar.delayload
If true, load cookies lazily from disk. This attribute should not be assigned
to. This is only a hint, since this only affects performance, not behaviour
(unless the cookies on disk are changing). A :class:`CookieJar` object may
ignore it. None of the :class:`FileCookieJar` classes included in the standard
library lazily loads cookies.
.. _file-cookie-jar-classes:
FileCookieJar subclasses and co-operation with web browsers
-----------------------------------------------------------
The following :class:`CookieJar` subclasses are provided for reading and
writing.
.. class:: MozillaCookieJar(filename, delayload=None, policy=None)
A :class:`FileCookieJar` that can load from and save cookies to disk in the
Mozilla ``cookies.txt`` file format (which is also used by the Lynx and Netscape
browsers).
.. note::
This loses information about :rfc:`2965` cookies, and also about newer or
non-standard cookie-attributes such as ``port``.
.. warning::
Back up your cookies before saving if you have cookies whose loss / corruption
would be inconvenient (there are some subtleties which may lead to slight
changes in the file over a load / save round-trip).
Also note that cookies saved while Mozilla is running will get clobbered by
Mozilla.
.. class:: LWPCookieJar(filename, delayload=None, policy=None)
A :class:`FileCookieJar` that can load from and save cookies to disk in format
compatible with the libwww-perl library's ``Set-Cookie3`` file format. This is
convenient if you want to store cookies in a human-readable file.
.. versionchanged:: 3.8
The filename parameter supports a :term:`path-like object`.
.. _cookie-policy-objects:
CookiePolicy Objects
--------------------
Objects implementing the :class:`CookiePolicy` interface have the following
methods:
.. method:: CookiePolicy.set_ok(cookie, request)
Return boolean value indicating whether cookie should be accepted from server.
*cookie* is a :class:`Cookie` instance. *request* is an object
implementing the interface defined by the documentation for
:meth:`CookieJar.extract_cookies`.
.. method:: CookiePolicy.return_ok(cookie, request)
Return boolean value indicating whether cookie should be returned to server.
*cookie* is a :class:`Cookie` instance. *request* is an object
implementing the interface defined by the documentation for
:meth:`CookieJar.add_cookie_header`.
.. method:: CookiePolicy.domain_return_ok(domain, request)
Return ``False`` if cookies should not be returned, given cookie domain.
This method is an optimization. It removes the need for checking every cookie
with a particular domain (which might involve reading many files). Returning
true from :meth:`domain_return_ok` and :meth:`path_return_ok` leaves all the
work to :meth:`return_ok`.
If :meth:`domain_return_ok` returns true for the cookie domain,
:meth:`path_return_ok` is called for the cookie path. Otherwise,
:meth:`path_return_ok` and :meth:`return_ok` are never called for that cookie
domain. If :meth:`path_return_ok` returns true, :meth:`return_ok` is called
with the :class:`Cookie` object itself for a full check. Otherwise,
:meth:`return_ok` is never called for that cookie path.
Note that :meth:`domain_return_ok` is called for every *cookie* domain, not just
for the *request* domain. For example, the function might be called with both
``".example.com"`` and ``"www.example.com"`` if the request domain is
``"www.example.com"``. The same goes for :meth:`path_return_ok`.
The *request* argument is as documented for :meth:`return_ok`.
.. method:: CookiePolicy.path_return_ok(path, request)
Return ``False`` if cookies should not be returned, given cookie path.
See the documentation for :meth:`domain_return_ok`.
In addition to implementing the methods above, implementations of the
:class:`CookiePolicy` interface must also supply the following attributes,
indicating which protocols should be used, and how. All of these attributes may
be assigned to.
.. attribute:: CookiePolicy.netscape
Implement Netscape protocol.
.. attribute:: CookiePolicy.rfc2965
Implement :rfc:`2965` protocol.
.. attribute:: CookiePolicy.hide_cookie2
Don't add :mailheader:`Cookie2` header to requests (the presence of this header
indicates to the server that we understand :rfc:`2965` cookies).
The most useful way to define a :class:`CookiePolicy` class is by subclassing
from :class:`DefaultCookiePolicy` and overriding some or all of the methods
above. :class:`CookiePolicy` itself may be used as a 'null policy' to allow
setting and receiving any and all cookies (this is unlikely to be useful).
.. _default-cookie-policy-objects:
DefaultCookiePolicy Objects
---------------------------
Implements the standard rules for accepting and returning cookies.
Both :rfc:`2965` and Netscape cookies are covered. RFC 2965 handling is switched
off by default.
The easiest way to provide your own policy is to override this class and call
its methods in your overridden implementations before adding your own additional
checks::
import http.cookiejar
class MyCookiePolicy(http.cookiejar.DefaultCookiePolicy):
def set_ok(self, cookie, request):
if not http.cookiejar.DefaultCookiePolicy.set_ok(self, cookie, request):
return False
if i_dont_want_to_store_this_cookie(cookie):
return False
return True
In addition to the features required to implement the :class:`CookiePolicy`
interface, this class allows you to block and allow domains from setting and
receiving cookies. There are also some strictness switches that allow you to
tighten up the rather loose Netscape protocol rules a little bit (at the cost of
blocking some benign cookies).
A domain blocklist and allowlist is provided (both off by default). Only domains
not in the blocklist and present in the allowlist (if the allowlist is active)
participate in cookie setting and returning. Use the *blocked_domains*
constructor argument, and :meth:`blocked_domains` and
:meth:`set_blocked_domains` methods (and the corresponding argument and methods
for *allowed_domains*). If you set an allowlist, you can turn it off again by
setting it to :const:`None`.
Domains in block or allow lists that do not start with a dot must equal the
cookie domain to be matched. For example, ``"example.com"`` matches a blocklist
entry of ``"example.com"``, but ``"www.example.com"`` does not. Domains that do
start with a dot are matched by more specific domains too. For example, both
``"www.example.com"`` and ``"www.coyote.example.com"`` match ``".example.com"``
(but ``"example.com"`` itself does not). IP addresses are an exception, and
must match exactly. For example, if blocked_domains contains ``"192.168.1.2"``
and ``".168.1.2"``, 192.168.1.2 is blocked, but 193.168.1.2 is not.
:class:`DefaultCookiePolicy` implements the following additional methods:
.. method:: DefaultCookiePolicy.blocked_domains()
Return the sequence of blocked domains (as a tuple).
.. method:: DefaultCookiePolicy.set_blocked_domains(blocked_domains)
Set the sequence of blocked domains.
.. method:: DefaultCookiePolicy.is_blocked(domain)
Return ``True`` if *domain* is on the blocklist for setting or receiving
cookies.
.. method:: DefaultCookiePolicy.allowed_domains()
Return :const:`None`, or the sequence of allowed domains (as a tuple).
.. method:: DefaultCookiePolicy.set_allowed_domains(allowed_domains)
Set the sequence of allowed domains, or :const:`None`.
.. method:: DefaultCookiePolicy.is_not_allowed(domain)
Return ``True`` if *domain* is not on the allowlist for setting or receiving
cookies.
:class:`DefaultCookiePolicy` instances have the following attributes, which are
all initialised from the constructor arguments of the same name, and which may
all be assigned to.
.. attribute:: DefaultCookiePolicy.rfc2109_as_netscape
If true, request that the :class:`CookieJar` instance downgrade :rfc:`2109` cookies
(ie. cookies received in a :mailheader:`Set-Cookie` header with a version
cookie-attribute of 1) to Netscape cookies by setting the version attribute of
the :class:`Cookie` instance to 0. The default value is :const:`None`, in which
case RFC 2109 cookies are downgraded if and only if :rfc:`2965` handling is turned
off. Therefore, RFC 2109 cookies are downgraded by default.
General strictness switches:
.. attribute:: DefaultCookiePolicy.strict_domain
Don't allow sites to set two-component domains with country-code top-level
domains like ``.co.uk``, ``.gov.uk``, ``.co.nz``.etc. This is far from perfect
and isn't guaranteed to work!
:rfc:`2965` protocol strictness switches:
.. attribute:: DefaultCookiePolicy.strict_rfc2965_unverifiable
Follow :rfc:`2965` rules on unverifiable transactions (usually, an unverifiable
transaction is one resulting from a redirect or a request for an image hosted on
another site). If this is false, cookies are *never* blocked on the basis of
verifiability
Netscape protocol strictness switches:
.. attribute:: DefaultCookiePolicy.strict_ns_unverifiable
Apply :rfc:`2965` rules on unverifiable transactions even to Netscape cookies.
.. attribute:: DefaultCookiePolicy.strict_ns_domain
Flags indicating how strict to be with domain-matching rules for Netscape
cookies. See below for acceptable values.
.. attribute:: DefaultCookiePolicy.strict_ns_set_initial_dollar
Ignore cookies in Set-Cookie: headers that have names starting with ``'$'``.
.. attribute:: DefaultCookiePolicy.strict_ns_set_path
Don't allow setting cookies whose path doesn't path-match request URI.
:attr:`strict_ns_domain` is a collection of flags. Its value is constructed by
or-ing together (for example, ``DomainStrictNoDots|DomainStrictNonDomain`` means
both flags are set).
.. attribute:: DefaultCookiePolicy.DomainStrictNoDots
When setting cookies, the 'host prefix' must not contain a dot (eg.
``www.foo.bar.com`` can't set a cookie for ``.bar.com``, because ``www.foo``
contains a dot).
.. attribute:: DefaultCookiePolicy.DomainStrictNonDomain
Cookies that did not explicitly specify a ``domain`` cookie-attribute can only
be returned to a domain equal to the domain that set the cookie (eg.
``spam.example.com`` won't be returned cookies from ``example.com`` that had no
``domain`` cookie-attribute).
.. attribute:: DefaultCookiePolicy.DomainRFC2965Match
When setting cookies, require a full :rfc:`2965` domain-match.
The following attributes are provided for convenience, and are the most useful
combinations of the above flags:
.. attribute:: DefaultCookiePolicy.DomainLiberal
Equivalent to 0 (ie. all of the above Netscape domain strictness flags switched
off).
.. attribute:: DefaultCookiePolicy.DomainStrict
Equivalent to ``DomainStrictNoDots|DomainStrictNonDomain``.
Cookie Objects
--------------
:class:`Cookie` instances have Python attributes roughly corresponding to the
standard cookie-attributes specified in the various cookie standards. The
correspondence is not one-to-one, because there are complicated rules for
assigning default values, because the ``max-age`` and ``expires``
cookie-attributes contain equivalent information, and because :rfc:`2109` cookies
may be 'downgraded' by :mod:`http.cookiejar` from version 1 to version 0 (Netscape)
cookies.
Assignment to these attributes should not be necessary other than in rare
circumstances in a :class:`CookiePolicy` method. The class does not enforce
internal consistency, so you should know what you're doing if you do that.
.. attribute:: Cookie.version
Integer or :const:`None`. Netscape cookies have :attr:`version` 0. :rfc:`2965` and
:rfc:`2109` cookies have a ``version`` cookie-attribute of 1. However, note that
:mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape cookies, in which
case :attr:`version` is 0.
.. attribute:: Cookie.name
Cookie name (a string).
.. attribute:: Cookie.value
Cookie value (a string), or :const:`None`.
.. attribute:: Cookie.port
String representing a port or a set of ports (eg. '80', or '80,8080'), or
:const:`None`.
.. attribute:: Cookie.path
Cookie path (a string, eg. ``'/acme/rocket_launchers'``).
.. attribute:: Cookie.secure
``True`` if cookie should only be returned over a secure connection.
.. attribute:: Cookie.expires
Integer expiry date in seconds since epoch, or :const:`None`. See also the
:meth:`is_expired` method.
.. attribute:: Cookie.discard
``True`` if this is a session cookie.
.. attribute:: Cookie.comment
String comment from the server explaining the function of this cookie, or
:const:`None`.
.. attribute:: Cookie.comment_url
URL linking to a comment from the server explaining the function of this cookie,
or :const:`None`.
.. attribute:: Cookie.rfc2109
``True`` if this cookie was received as an :rfc:`2109` cookie (ie. the cookie
arrived in a :mailheader:`Set-Cookie` header, and the value of the Version
cookie-attribute in that header was 1). This attribute is provided because
:mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape cookies, in
which case :attr:`version` is 0.
.. attribute:: Cookie.port_specified
``True`` if a port or set of ports was explicitly specified by the server (in the
:mailheader:`Set-Cookie` / :mailheader:`Set-Cookie2` header).
.. attribute:: Cookie.domain_specified
``True`` if a domain was explicitly specified by the server.
.. attribute:: Cookie.domain_initial_dot
``True`` if the domain explicitly specified by the server began with a dot
(``'.'``).
Cookies may have additional non-standard cookie-attributes. These may be
accessed using the following methods:
.. method:: Cookie.has_nonstandard_attr(name)
Return ``True`` if cookie has the named cookie-attribute.
.. method:: Cookie.get_nonstandard_attr(name, default=None)
If cookie has the named cookie-attribute, return its value. Otherwise, return
*default*.
.. method:: Cookie.set_nonstandard_attr(name, value)
Set the value of the named cookie-attribute.
The :class:`Cookie` class also defines the following method:
.. method:: Cookie.is_expired(now=None)
``True`` if cookie has passed the time at which the server requested it should
expire. If *now* is given (in seconds since the epoch), return whether the
cookie has expired at the specified time.
Examples
--------
The first example shows the most common usage of :mod:`http.cookiejar`::
import http.cookiejar, urllib.request
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
r = opener.open("http://example.com/")
This example illustrates how to open a URL using your Netscape, Mozilla, or Lynx
cookies (assumes Unix/Netscape convention for location of the cookies file)::
import os, http.cookiejar, urllib.request
cj = http.cookiejar.MozillaCookieJar()
cj.load(os.path.join(os.path.expanduser("~"), ".netscape", "cookies.txt"))
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
r = opener.open("http://example.com/")
The next example illustrates the use of :class:`DefaultCookiePolicy`. Turn on
:rfc:`2965` cookies, be more strict about domains when setting and returning
Netscape cookies, and block some domains from setting cookies or having them
returned::
import urllib.request
from http.cookiejar import CookieJar, DefaultCookiePolicy
policy = DefaultCookiePolicy(
rfc2965=True, strict_ns_domain=Policy.DomainStrict,
blocked_domains=["ads.net", ".ads.net"])
cj = CookieJar(policy)
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
r = opener.open("http://example.com/")
| reStructuredText | 5 | oleksandr-pavlyk/cpython | Doc/library/http.cookiejar.rst | [
"0BSD"
] |
# Check the handling of generator commands, which are not rerun when they change.
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: cp %s %t.build/build.ninja
# RUN: touch %t.build/config.ninja
# RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build &> %t1.out
# RUN: %{FileCheck} --check-prefix CHECK-FIRST --input-file %t1.out %s
#
# CHECK-FIRST-NOT: echo
# CHECK-FIRST: date
# Running again after changing the generator flags should not rebuild.
#
# RUN: echo "echo_flags = foo" > %t.build/config.ninja
# RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build &> %t2.out
# RUN: %{FileCheck} --check-prefix CHECK-SECOND --input-file %t2.out %s
#
# CHECK-SECOND-NOT: echo
# CHECK-SECOND: date
echo_flags =
include config.ninja
rule GENERATOR
command = echo ${echo_flags}
generator = 1
rule DATE
command = date
build build.ninja: GENERATOR
build output: DATE
| Ninja | 4 | trombonehero/swift-llbuild | tests/Ninja/Build/changed-generator-commands.ninja | [
"Apache-2.0"
] |
export { named } from "./a";
| JavaScript | 2 | 1shenxi/webpack | test/cases/scope-hoisting/reexport-star-exposed-cjs/b.js | [
"MIT"
] |
#%RAML 1.0 DataType
properties:
code: integer
message: string
| RAML | 3 | zeesh49/tutorials | raml/resource-types-and-traits/types/Error.raml | [
"MIT"
] |
Logger.configure_backend(:console, colors: [enabled: false])
ExUnit.start()
| Elixir | 2 | doughsay/elixir | lib/ex_unit/test/test_helper.exs | [
"Apache-2.0"
] |
// Created by Mathias Leppich on 03/02/14.
// Copyright (c) 2014 Bit Bar. All rights reserved.
// Copyright (c) 2017 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/ui/cocoa/NSColor+Hex.h"
@implementation NSColor (Hex)
- (NSString*)RGBAValue {
double redFloatValue, greenFloatValue, blueFloatValue, alphaFloatValue;
NSColor* convertedColor =
[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
if (convertedColor) {
[convertedColor getRed:&redFloatValue
green:&greenFloatValue
blue:&blueFloatValue
alpha:&alphaFloatValue];
int redIntValue = redFloatValue * 255.99999f;
int greenIntValue = greenFloatValue * 255.99999f;
int blueIntValue = blueFloatValue * 255.99999f;
int alphaIntValue = alphaFloatValue * 255.99999f;
return
[NSString stringWithFormat:@"%02x%02x%02x%02x", redIntValue,
greenIntValue, blueIntValue, alphaIntValue];
}
return nil;
}
- (NSString*)hexadecimalValue {
double redFloatValue, greenFloatValue, blueFloatValue;
NSColor* convertedColor =
[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
if (convertedColor) {
[convertedColor getRed:&redFloatValue
green:&greenFloatValue
blue:&blueFloatValue
alpha:NULL];
int redIntValue = redFloatValue * 255.99999f;
int greenIntValue = greenFloatValue * 255.99999f;
int blueIntValue = blueFloatValue * 255.99999f;
return [NSString stringWithFormat:@"#%02x%02x%02x", redIntValue,
greenIntValue, blueIntValue];
}
return nil;
}
+ (NSColor*)colorWithHexColorString:(NSString*)inColorString {
unsigned colorCode = 0;
if (inColorString) {
NSScanner* scanner = [NSScanner scannerWithString:inColorString];
(void)[scanner scanHexInt:&colorCode]; // ignore error
}
unsigned char redByte = (unsigned char)(colorCode >> 16);
unsigned char greenByte = (unsigned char)(colorCode >> 8);
unsigned char blueByte = (unsigned char)(colorCode); // masks off high bits
return [NSColor colorWithCalibratedRed:(CGFloat)redByte / 0xff
green:(CGFloat)greenByte / 0xff
blue:(CGFloat)blueByte / 0xff
alpha:1.0];
}
@end
| Objective-C++ | 4 | lingxiao-Zhu/electron | shell/browser/ui/cocoa/NSColor+Hex.mm | [
"MIT"
] |
#!/bin/bash
if [ "${SKIP_EXEC_RC_LOCAL}" = "YES" ] ; then
echo "skip /etc/rc.local: SKIP_EXEC_RC_LOCAL=${SKIP_EXEC_RC_LOCAL}"
exit
fi
if [ "${DOCKER_DEPLOY_TYPE}" = "HOST" ] ; then
echo "skip /etc/rc.local: DOCKER_DEPLOY_TYPE=${DOCKER_DEPLOY_TYPE}"
exit
fi | Shell | 3 | yuanweikang2020/canal | docker/image/alidata/bin/exec_rc_local.sh | [
"Apache-2.0"
] |
# Check that we emulate -t clean
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: cp %s %t.build/build.ninja
# RUN: touch %t.build/input
# RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build > %t1.out
# RUN: test -f %t.build/build.db
# RUN: %{FileCheck} --check-prefix=CHECK-BEFORE-CLEAN < %t1.out %s
#
# RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build -t clean > %t2.out
# RUN: test ! -f %t.build/build.db
# RUN: %{FileCheck} --check-prefix=CHECK-AFTER-CLEAN < %t2.out %s
#
# RUN: %{llbuild} ninja build --jobs 1 --chdir %t.build > %t3.out
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD < %t3.out %s
# CHECK-BEFORE-CLEAN: [1/{{.*}}] cp
# CHECK-AFTER-CLEAN-NOT: [1/{{.*}}]
# CHECK-REBUILD: [1/{{.*}}] cp
rule CP
command = cp $in $out
build output: CP input
default output
| Ninja | 5 | allevato/swift-llbuild | tests/Ninja/Build/t-clean.ninja | [
"Apache-2.0"
] |
$$ MODE tuscript
SET nr1=RANDOM_NUMBERS (1,9,1)
LOOP
SET nr2=RANDOM_NUMBERS (1,9,1)
IF (nr2!=nr1) EXIT
ENDLOOP
LOOP
SET nr3=RANDOM_NUMBERS (1,9,1)
IF (nr3!=nr1,nr2) EXIT
ENDLOOP
LOOP
SET nr4=RANDOM_NUMBERS (1,9,1)
IF (nr4!=nr1,nr2,nr3) EXIT
ENDLOOP
SET nr=JOIN(nr1,"'",nr2,nr3,nr4), limit=10
LOOP r=1,limit
SET bulls=cows=0
ASK "round {r} insert a number":guessnr=""
SET length=LENGTH(guessnr), checknr=STRINGS (guessnr,":>/:")
LOOP n=nr,y=checknr
IF (length!=4) THEN
PRINT "4-letter digit required"
EXIT
ELSEIF (n==y) THEN
SET bulls=bulls+1
ELSEIF (nr.ct.":{y}:") THEN
SET cows=cows+1
ENDIF
ENDLOOP
PRINT "bulls=",bulls," cows=",cows
IF (bulls==4) THEN
PRINT "BINGO"
EXIT
ELSEIF (r==limit) THEN
PRINT "BETTER NEXT TIME"
EXIT
ENDIF
ENDLOOP
| Turing | 3 | LaudateCorpus1/RosettaCodeData | Task/Bulls-and-cows/TUSCRIPT/bulls-and-cows.tu | [
"Info-ZIP"
] |
/*
* Copyright (c) 2001-2002 Michael David Adams.
* All rights reserved.
*/
/* __START_OF_JASPER_LICENSE__
*
* JasPer License Version 2.0
*
* Copyright (c) 2001-2006 Michael David Adams
* Copyright (c) 1999-2000 Image Power, Inc.
* Copyright (c) 1999-2000 The University of British Columbia
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person (the
* "User") 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, 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:
*
* 1. The above copyright notices and this permission notice (which
* includes the disclaimer below) shall be included in all copies or
* substantial portions of the Software.
*
* 2. The name of a copyright holder shall not be used to endorse or
* promote products derived from the Software without specific prior
* written permission.
*
* THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
* LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
* THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
* "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 OF THIRD PARTY RIGHTS. IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE
* PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE
* THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.
* EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS
* BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL
* PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS
* GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE
* ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE
* IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL
* SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,
* AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL
* SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH
* THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,
* PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
* RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
* EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
*
* __END_OF_JASPER_LICENSE__
*/
/*
* Tag-Value Parser Library
*
* $Id: jas_tvp.c,v 1.2 2008-05-26 09:40:52 vp153 Exp $
*/
/******************************************************************************\
* Includes.
\******************************************************************************/
#include <assert.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include "jasper/jas_malloc.h"
#include "jasper/jas_string.h"
#include "jasper/jas_tvp.h"
/******************************************************************************\
* Macros.
\******************************************************************************/
/* Is the specified character valid for a tag name? */
#define JAS_TVP_ISTAG(x) \
(isalpha(x) || (x) == '_' || isdigit(x))
/******************************************************************************\
* Code for creating and destroying a tag-value parser.
\******************************************************************************/
jas_tvparser_t *jas_tvparser_create(const char *s)
{
jas_tvparser_t *tvp;
if (!(tvp = jas_malloc(sizeof(jas_tvparser_t)))) {
return 0;
}
if (!(tvp->buf = jas_strdup(s))) {
jas_tvparser_destroy(tvp);
return 0;
}
tvp->pos = tvp->buf;
tvp->tag = 0;
tvp->val = 0;
return tvp;
}
void jas_tvparser_destroy(jas_tvparser_t *tvp)
{
if (tvp->buf) {
jas_free(tvp->buf);
}
jas_free(tvp);
}
/******************************************************************************\
* Main parsing code.
\******************************************************************************/
/* Get the next tag-value pair. */
int jas_tvparser_next(jas_tvparser_t *tvp)
{
char *p;
char *tag;
char *val;
/* Skip any leading whitespace. */
p = tvp->pos;
while (*p != '\0' && isspace(*p)) {
++p;
}
/* Has the end of the input data been reached? */
if (*p == '\0') {
/* No more tags are present. */
tvp->pos = p;
return 1;
}
/* Does the tag name begin with a valid character? */
if (!JAS_TVP_ISTAG(*p)) {
return -1;
}
/* Remember where the tag name begins. */
tag = p;
/* Find the end of the tag name. */
while (*p != '\0' && JAS_TVP_ISTAG(*p)) {
++p;
}
/* Has the end of the input data been reached? */
if (*p == '\0') {
/* The value field is empty. */
tvp->tag = tag;
tvp->val = "";
tvp->pos = p;
return 0;
}
/* Is a value field not present? */
if (*p != '=') {
if (*p != '\0' && !isspace(*p)) {
return -1;
}
*p++ = '\0';
tvp->tag = tag;
tvp->val = "";
tvp->pos = p;
return 0;
}
*p++ = '\0';
val = p;
while (*p != '\0' && !isspace(*p)) {
++p;
}
if (*p != '\0') {
*p++ = '\0';
}
tvp->pos = p;
tvp->tag = tag;
tvp->val = val;
return 0;
}
/******************************************************************************\
* Code for querying the current tag/value.
\******************************************************************************/
/* Get the current tag. */
char *jas_tvparser_gettag(jas_tvparser_t *tvp)
{
return tvp->tag;
}
/* Get the current value. */
char *jas_tvparser_getval(jas_tvparser_t *tvp)
{
return tvp->val;
}
/******************************************************************************\
* Miscellaneous code.
\******************************************************************************/
/* Lookup a tag by name. */
jas_taginfo_t *jas_taginfos_lookup(jas_taginfo_t *taginfos, const char *name)
{
jas_taginfo_t *taginfo;
taginfo = taginfos;
while (taginfo->id >= 0) {
if (!strcmp(taginfo->name, name)) {
return taginfo;
}
++taginfo;
}
return 0;
}
/* This function is simply for convenience. */
/* One can avoid testing for the special case of a null pointer, by
using this function. This function never returns a null pointer. */
jas_taginfo_t *jas_taginfo_nonull(jas_taginfo_t *taginfo)
{
static jas_taginfo_t invalidtaginfo = {
-1, 0
};
return taginfo ? taginfo : &invalidtaginfo;
}
| C | 5 | thisisgopalmandal/opencv | 3rdparty/libjasper/jas_tvp.c | [
"BSD-3-Clause"
] |
--TEST--
sapi_windows_cp_conv basic functionality
--SKIPIF--
<?php
if (PHP_OS_FAMILY !== 'Windows') die('skip for Windows only');
if (!sapi_windows_cp_set(1252) || !sapi_windows_cp_set(65001)) die('skip codepage not available');
?>
--FILE--
<?php
var_dump(
bin2hex(sapi_windows_cp_conv(65001, 1252, 'äöü')),
bin2hex(sapi_windows_cp_conv('utf-8', 1252, 'äöü')),
bin2hex(sapi_windows_cp_conv(65001, 'windows-1252', 'äöü')),
bin2hex(sapi_windows_cp_conv('utf-8', 'windows-1252', 'äöü')),
);
?>
--EXPECT--
string(6) "e4f6fc"
string(6) "e4f6fc"
string(6) "e4f6fc"
string(6) "e4f6fc"
| PHP | 4 | NathanFreeman/php-src | ext/standard/tests/strings/sapi_windows_cp_conv.phpt | [
"PHP-3.01"
] |
@import url("foo.css") screen and (orientation:landscape); | CSS | 1 | mengxy/swc | crates/swc_css_parser/tests/fixture/esbuild/misc/OEG8DCXSJeDTU7pt4fTE-g/input.css | [
"Apache-2.0"
] |
<div class="ui inverted divided equal height stackable grid">
{{ sylius_template_event('sylius.shop.layout.footer.grid') }}
</div>
<div class="ui hidden divider"></div>
| Twig | 0 | titomtd/Sylius | src/Sylius/Bundle/ShopBundle/Resources/views/Layout/Footer/_grid.html.twig | [
"MIT"
] |
// print-pings.click
// This configuration reads packets from a device, and prints out any ICMP
// echo requests it receives.
// You can run it at user level (as root) as
// 'userlevel/click < conf/print-pings.click'
// or in the kernel with
// 'click-install conf/print-pings.click'
FromDevice(eth1) // read packets from device
// (assume Ethernet device)
-> Classifier(12/0800) // select IP-in-Ethernet
-> Strip(14) // strip Ethernet header
-> CheckIPHeader // check IP header, mark as IP
-> IPFilter(allow icmp && icmp type echo) // select ICMP echo requests
-> IPPrint // print them out
-> Discard;
| Click | 4 | MacWR/Click-changed-for-ParaGraph | conf/print-pings.click | [
"Apache-2.0"
] |
/*
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
#ifndef RUNTIME_POINTER_BITS_H
#define RUNTIME_POINTER_BITS_H
#include <cstdint>
#include "Common.h"
template <typename T>
ALWAYS_INLINE T* setPointerBits(T* ptr, unsigned bits) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(ptr) | bits);
}
template <typename T>
ALWAYS_INLINE T* clearPointerBits(T* ptr, unsigned bits) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(ptr) & ~static_cast<uintptr_t>(bits));
}
template <typename T>
ALWAYS_INLINE unsigned getPointerBits(T* ptr, unsigned bits) {
return reinterpret_cast<uintptr_t>(ptr) & static_cast<uintptr_t>(bits);
}
template <typename T>
ALWAYS_INLINE bool hasPointerBits(T* ptr, unsigned bits) {
return getPointerBits(ptr, bits) != 0;
}
#endif // RUNTIME_POINTER_BITS_H
| C | 4 | Mu-L/kotlin | kotlin-native/runtime/src/main/cpp/PointerBits.h | [
"ECL-2.0",
"Apache-2.0"
] |
/--------//--------//--------//--------//--------//--------//--------/
z=100y=10w=z*y
r=:i%8:i-=r:i/=8o+=r*y^p b+=w^p++*((r>3)*z+(r%4>1)*y+r%2)x/=:i>7 goto2
:o=(:i*y^p)+o+"":b=b+w^p*((:i>3)*z+(:i%4>1)*y+:i%2)+""o=0b=0p=0:done=1
goto2
:b=b+w^p*((:i>3)*z+(:i%4>1)*y+:i%2)+""
/--------//--------//--------//--------//--------//--------//--------/
z/=:i>7r=:i%8:i-=r:i/=8o=r+""+o b=(r>3)+""+(r%4>1)+r%2+b goto(:i<8)+1
:o=""+:i+o-0:b=(:i>3)*100+(:i%4>1)*10+:i%2+""+b-0o=0b=0goto:done++
:b=(:i>3)*100+(:i%4>1)*10+:i%2+b-0
goto(:i<8)+1
x/=:i>7goto2
/--------//--------//--------//--------//--------//--------//--------/
o=""b=o
z/=:i>7r=:i%8o=r+o:i-=r:i/=8b=""+(r>3)+(r%4>1)+r%2+b goto2/(:i>7)
:o=:i+o:b=(:i>3)*100+(:i%4>++:done)*10+:i%2+b o=""b=""goto2
# ^^ Current best
goto(:i<8)+2
goto2/(:i>7)
z/=:i>7r=:i%8
r=:i%8z/=r<:i
r=:i%8/(:i>7)
z/=:i>7r=:i%8
:i=(:i-r)/8
:i=:i/8-r/8
:i-=r:i/=8
k=8000:i=:i/k*k
:o=:i+o
:i+=o:o=i
o=r+o
r+=o o=r
/--------//--------//--------//--------//--------//--------//--------/
o=""b=""z=100y=10
z/=:i>7r=:i%8:i=(:i-r)/8o=r+o b=""+(r>3)+(r%4>1)+r%2+b goto(:i<8)+2
r=:i%8:i=(:i-r)/8:o=r+o:b=(r>3)*z+(r%4>1)*y+r%2+b o=""b="":done=1goto2
/--------//--------//--------//--------//--------//--------//--------/
o=""b=""
r=:i%8:i=(:i-r)/8o=r+o b=""+(r>3)+(r%4>1)+r%2+b goto(:i<1)+2
:b=8+b-800-80-8:o=o:done++o=""b=""goto2
/--------//--------//--------//--------//--------//--------//--------/
j=8000c=""o=c b=c
r=:i-:i/j*j:i=(:i-r)/8o=r+o b=c+(r>3)+(r%4>1)+r%2+b goto(:i<1)+2
:b=("."+b)-".000"-".00"-".0"-"."b=c:o=o:done++o=c goto2
/--------//--------//--------//--------//--------//--------//--------/
i=:i k=1000 :o="" :b="" c=""
if1>i then goto:done++end r=i-((i/8)/k*k)*8 i=(i-r)/8 :o=r+:o goto3+r
:b=c+:b c="000" goto 2
:b=1+c+:b c="00" goto 2
:b=10+c+:b c="0" goto 2
:b=11+c+:b c="0" goto 2
:b=100+c+:b c="" goto 2
:b=101+c+:b c="" goto 2
:b=110+c+:b c="" goto 2
:b=111+c+:b c="" goto 2
/--------//--------//--------//--------//--------//--------//--------/
i=:i k=1000 :o="" :b="" c=""
r=i-((i/8)/k*k)*8 i=(i-r)/8 :o=r+:o goto3+r
:b=c+:b c="000" goto 11
:b="1"+c+:b c="00" goto 11
:b="10"+c+:b c="0" goto 11
:b="11"+c+:b c="0" goto 11
:b="100"+c+:b c="" goto 11
:b="101"+c+:b c="" goto 11
:b="110"+c+:b c="" goto 11
:b="111"+c+:b c="" goto 11
if i<1 then goto:done++ end goto 2
/--------//--------//--------//--------//--------//--------//--------/ | LOLCODE | 1 | Dude112113/Yolol | YololEmulator/Scripts/OctalAndBinaryConversion.lol | [
"MIT"
] |