Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
09fd782
w/o prog
stephenwaite May 9, 2026
b159353
w/o prog
stephenwaite May 9, 2026
b9db864
debug
stephenwaite May 9, 2026
f38236b
payments are stored negative so add them
stephenwaite May 9, 2026
3117a44
add create a negative pd-amount
stephenwaite May 9, 2026
db38ec1
wo002 to adj to zero by dos range
stephenwaite May 10, 2026
9ee775e
wo001 changes for credit bals
stephenwaite May 10, 2026
6e91c1a
indent
stephenwaite May 10, 2026
e04afcb
use date of charge as payment date
stephenwaite May 10, 2026
6162727
wo004 walk charcur for garfile archive
stephenwaite May 10, 2026
d20a501
indent
stephenwaite May 10, 2026
8a06eb8
per charge filter for archival
stephenwaite May 10, 2026
9498495
write to hisfile
stephenwaite May 11, 2026
47a2609
use copybook
stephenwaite May 11, 2026
6a646c8
use copybook
stephenwaite May 11, 2026
e860c5e
missing pays
stephenwaite May 11, 2026
bf284af
truncate for icd9
stephenwaite May 11, 2026
7d39082
perform thru
stephenwaite May 11, 2026
0822064
2ndary 026
stephenwaite May 11, 2026
50d0c11
Adj nm1 size
stephenwaite May 11, 2026
63b666c
MC ins type
stephenwaite May 11, 2026
6e6b03c
MB for prim payer ins type
stephenwaite May 11, 2026
3a569c6
fix memory leak
stephenwaite May 12, 2026
acf7bb5
0M4
stephenwaite May 12, 2026
8546587
prior total for paid flag
stephenwaite May 13, 2026
78b49d0
capture auth
stephenwaite May 13, 2026
b7f1ef2
remove ambigous ref01
stephenwaite May 13, 2026
242bf35
hra and 02 fixes
stephenwaite May 13, 2026
11091df
bump to sonnet 4-6
stephenwaite May 15, 2026
448d5be
update sonnet 4-6
stephenwaite May 15, 2026
1a7039f
debug cache
stephenwaite May 15, 2026
164469c
remove debug
stephenwaite May 15, 2026
386502c
over paid out in ef-auth
stephenwaite May 16, 2026
0cd04be
fix logic g-delete
stephenwaite May 20, 2026
4bf2d32
fix no valid record position
stephenwaite May 20, 2026
6ee2308
GARFILE I-O
stephenwaite May 20, 2026
9aff35d
CHARCUR I-O
stephenwaite May 20, 2026
a4ac580
Fix gdelete logic
stephenwaite May 20, 2026
3a3ec12
debug
stephenwaite May 20, 2026
05833e7
remove debug
stephenwaite May 20, 2026
f63dfac
chcrr uppercase
stephenwaite May 21, 2026
ad9b0e0
unique isa gs for aggregated remits
stephenwaite May 29, 2026
4137698
fix mtime warning
stephenwaite May 29, 2026
f1c4058
fix mtime warning
stephenwaite May 29, 2026
6c8e581
debug
stephenwaite May 29, 2026
0b3fd67
claudes fix
stephenwaite May 29, 2026
a9cb9fb
python update
stephenwaite Jun 1, 2026
7fa5b5d
+x for python scripts
stephenwaite Jun 1, 2026
3c147c2
prompt for specificity
stephenwaite Jun 3, 2026
5e5bd6f
prompt for specificity
stephenwaite Jun 3, 2026
4584eb9
prompt meniscus tear table
stephenwaite Jun 3, 2026
59e0522
symptom codes
stephenwaite Jun 3, 2026
c948a4c
suppress read when ask claude
stephenwaite Jun 3, 2026
85157d3
prompt for specificity
stephenwaite Jun 3, 2026
9f56cfa
bump max_tokens
stephenwaite Jun 3, 2026
1973cf3
check it's a valid code
stephenwaite Jun 3, 2026
efd5ad3
debug valid icd10
stephenwaite Jun 3, 2026
1e947b6
only load icd10s for claude
stephenwaite Jun 3, 2026
4586e80
debug valid icd10
stephenwaite Jun 3, 2026
d26c7a7
debug valid icd10
stephenwaite Jun 3, 2026
ff29b29
move g1 auth capture to svc loop
stephenwaite Jun 5, 2026
7d574c7
REVERT move g1 auth capture to svc loop
stephenwaite Jun 5, 2026
833cf58
debug
stephenwaite Jun 5, 2026
4d39ed6
debug
stephenwaite Jun 5, 2026
3250e02
debug
stephenwaite Jun 5, 2026
c1f40e5
debug
stephenwaite Jun 5, 2026
03dde46
SAVE-AUTH
stephenwaite Jun 5, 2026
fa19826
remove accept omitted
stephenwaite Jun 5, 2026
bc8c020
debug
stephenwaite Jun 5, 2026
daf19e1
debug
stephenwaite Jun 5, 2026
5171b7c
use clp-1 for garno invalid read
stephenwaite Jun 6, 2026
ddcbf0d
nsa flag and co-131
stephenwaite Jun 6, 2026
edb7b84
medfile from csv
stephenwaite Jun 6, 2026
6943c24
197 report
stephenwaite Jun 6, 2026
0f54a21
separate col for adj and correct due col
stephenwaite Jun 6, 2026
67ff015
use cash paid instead of total pay for comparison with med allow
stephenwaite Jun 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 35 additions & 23 deletions bcbsvt/check_x12s.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
<?php

use phpseclib3\Net\SFTP;

require_once(dirname(__FILE__) . '/../vendor/autoload.php');


$cms_user = getenv('MOVEIT_USERNAME');
$cms_pass = getenv('MOVEIT_PASSWORD');

$sftp = new SFTP('moveit.bcbsvt.com');
$sftp->setTimeout(300); // 5 minutes instead of default
$sftp->setKeepAlive(30); // Send keep-alive every 30 seconds
$sftp->setTimeout(300); // 5 minutes instead of default
$sftp->setKeepAlive(30); // send keep-alive every 30 seconds

if (!$sftp->login($cms_user, $cms_pass)) {
echo "login failed" . "\n";
echo "login failed\n";
exit;
};
}

$path = '/Home/cms';

$files = $sftp->rawlist($path, true);
if (!is_array($files)) {
$raw = $sftp->rawlist($path);
if (!is_array($raw)) {
throw new RuntimeException("rawlist failed: " . $sftp->getLastError());
}
usort($files, fn($a, $b) => $a->mtime <=> $b->mtime);

if (!empty($files)) {
foreach ($files as $file) {
if (!empty($file)) {
$dt_utc = new DateTimeImmutable('@' . $file->mtime); // unix timestamp directly
$date = $dt_utc->setTimezone(new DateTimeZone('America/New_York'));
echo "file: " . $file->filename . " uploaded to 02 on " .
$date->format('Y-m-d h:i:s a') . "\n";
}
}
} else {
// there's a test directory

// read a field whether the entry is an object or an associative array
$prop = function ($entry, $key) {
if (is_object($entry)) return $entry->$key ?? null;
if (is_array($entry)) return $entry[$key] ?? null;
return null;
};

$files = [];
foreach ($raw as $name => $entry) {
if ($name === '.' || $name === '..') continue;
if ($prop($entry, 'type') === NET_SFTP_TYPE_DIRECTORY) continue; // 2
$mtime = $prop($entry, 'mtime');
if (!$mtime) continue;
$files[] = [
'filename' => $prop($entry, 'filename') ?? $name,
'mtime' => $mtime,
];
}

usort($files, fn($a, $b) => $a['mtime'] <=> $b['mtime']);

foreach ($files as $file) {
$dt_utc = new DateTimeImmutable('@' . $file['mtime']);
$date = $dt_utc->setTimezone(new DateTimeZone('America/New_York'));
echo "file: {$file['filename']} uploaded to 02 on "
. $date->format('Y-m-d h:i:s a') . "\n";
}
41 changes: 41 additions & 0 deletions copylib/rri/hisfile.cpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
01 HISFILE01.
02 HISFILE-KEY.
03 HS-KEY8 PIC X(8).
03 HS-CLAIM PIC X(6).
03 HS-REC-TYPE PIC X.
03 HS-KEY4 PIC XXXX.
02 HS-PATID.
03 HS-PATID7 PIC X(7).
03 HS-PATID1 PIC X.
02 HS-SERVICE PIC X.
02 HS-DIAG PIC X(5).
02 HS-PROC PIC X(11).
02 HS-MOD2 PIC XX.
02 HS-MOD3 PIC XX.
02 HS-MOD4 PIC XX.
02 HS-AMOUNT PIC X(6).
02 HS-DOCR PIC X(3).
02 HS-DOCP PIC X(2).
02 HS-PAYCODE PIC XXX.
02 HS-STUD PIC X.
02 HS-WORK PIC XX.
02 HS-DAT1 PIC X(8).
02 HS-RESULT PIC X.
02 HS-ACT PIC X.
02 HS-SORCREF PIC X.
02 HS-COLLT PIC X.
02 HS-AGE PIC X.
02 HS-PAPER PIC X.
02 HS-PLACE PIC X.
02 HS-EPSDT PIC X.
02 HS-DATE-T PIC X(8).
02 HS-DATE-A PIC X(8).
02 HS-DATE-E PIC X(8).
02 HS-REC-STAT PIC X.
02 HS-DX2 PIC X(5).
02 HS-DX3 PIC X(5).
02 HS-ACC-TYPE PIC X.
02 HS-DATE-M PIC X(8).
02 HS-ASSIGN PIC X.
02 HS-NEIC-ASSIGN PIC X.
02 HS-FUTURE PIC X(6).
Loading